blob: c76be6826e510c3ba401ee3b2472200a71c1e1cd [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) {
return commandBuffer->synchronizeBufferToCpu(std::move(fBuffer));
}
} // namespace skgpu::graphite