blob: 84abed87ea4f21566239c3e9e8732664d6ba6e3c [file] [log] [blame]
/*
* Copyright 2022 Google LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "src/gpu/graphite/SynchronizeToCpuTask.h"
#include "src/gpu/graphite/Buffer.h"
#include "src/gpu/graphite/CommandBuffer.h"
namespace skgpu::graphite {
sk_sp<SynchronizeToCpuTask> SynchronizeToCpuTask::Make(sk_sp<Buffer> buffer) {
return sk_sp<SynchronizeToCpuTask>(new SynchronizeToCpuTask(std::move(buffer)));
}
SynchronizeToCpuTask::~SynchronizeToCpuTask() {}
bool SynchronizeToCpuTask::addCommands(Context*, CommandBuffer* commandBuffer, ReplayTargetData) {
return commandBuffer->synchronizeBufferToCpu(std::move(fBuffer));
}
} // namespace skgpu::graphite