blob: 58288f7f8fe178b13820e173a2c886237a46d274 [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.
#ifndef GrBufferUpdateRenderTask_DEFINED
#define GrBufferUpdateRenderTask_DEFINED
#include "src/gpu/ganesh/GrRenderTask.h"
class GrGpuBuffer;
class GrBufferUpdateRenderTask final : public GrRenderTask {
static sk_sp<GrRenderTask> Make(sk_sp<SkData> src, sk_sp<GrGpuBuffer> dst, size_t dstOffset);
~GrBufferUpdateRenderTask() override;
GrBufferUpdateRenderTask(sk_sp<SkData> src, sk_sp<GrGpuBuffer> dst, size_t dstOffset);
bool onIsUsed(GrSurfaceProxy* proxy) const override { return false; }
void gatherProxyIntervals(GrResourceAllocator*) const override {} // no proxies
ExpectedOutcome onMakeClosed(GrRecordingContext*, SkIRect* targetUpdateBounds) override {
return ExpectedOutcome::kTargetUnchanged; // no target
bool onExecute(GrOpFlushState*) override;
const char* name() const final { return "BufferUpdate"; }
#ifdef SK_DEBUG
void visitProxies_debugOnly(const GrVisitProxyFunc&) const override {}
sk_sp<SkData> fSrc;
sk_sp<GrGpuBuffer> fDst;
size_t fDstOffset;