Move transferFrom commands from GrOp and into GrRenderTask.
These Ops don't need to go through the GrGpuCommandBuffer.
Change-Id: Ifa9c7d801c97c225989d2542709c89f36ddfdc5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235799
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrDrawingManager.h b/src/gpu/GrDrawingManager.h
index 80f006e..13e2f55 100644
--- a/src/gpu/GrDrawingManager.h
+++ b/src/gpu/GrDrawingManager.h
@@ -59,6 +59,15 @@
GrRenderTask* newTextureResolveRenderTask(
sk_sp<GrTextureProxy>, GrTextureResolveFlags, const GrCaps&);
+ // Create a new render task which copies the pixels from the srcProxy into the dstBuffer. This
+ // is used to support the asynchronous readback API. The srcRect is the region of the srcProxy
+ // to be copied. The surfaceColorType says how we should interpret the data when reading back
+ // from the source. DstColorType describes how the data should be stored in the dstBuffer.
+ // DstOffset is the offset into the dstBuffer where we will start writing data.
+ void newTransferFromRenderTask(sk_sp<GrSurfaceProxy> srcProxy, const SkIRect& srcRect,
+ GrColorType surfaceColorType, GrColorType dstColorType,
+ sk_sp<GrGpuBuffer> dstBuffer, size_t dstOffset);
+
GrRecordingContext* getContext() { return fContext; }
GrTextContext* getTextContext();
@@ -162,7 +171,7 @@
// Closes the target's dependent render tasks (or, if not in sorting/opList-splitting-reduction
// mode, closes fActiveOpList) in preparation for us opening a new opList that will write to
// 'target'.
- void closeRenderTasksForNewOpList(GrSurfaceProxy* target);
+ void closeRenderTasksForNewRenderTask(GrSurfaceProxy* target);
// return true if any opLists were actually executed; false otherwise
bool executeRenderTasks(int startIndex, int stopIndex, GrOpFlushState*,