Move lastRenderTask into drawing manager
Bug: skia:10320
Change-Id: I5a25d8c0bf00b379a37c479e79d4ff16403e9dfe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294339
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrCopyRenderTask.cpp b/src/gpu/GrCopyRenderTask.cpp
index 0f46e69..46b102c 100644
--- a/src/gpu/GrCopyRenderTask.cpp
+++ b/src/gpu/GrCopyRenderTask.cpp
@@ -11,7 +11,8 @@
#include "src/gpu/GrOpFlushState.h"
#include "src/gpu/GrResourceAllocator.h"
-sk_sp<GrRenderTask> GrCopyRenderTask::Make(GrSurfaceProxyView srcView,
+sk_sp<GrRenderTask> GrCopyRenderTask::Make(GrDrawingManager* drawingMgr,
+ GrSurfaceProxyView srcView,
const SkIRect& srcRect,
GrSurfaceProxyView dstView,
const SkIPoint& dstPoint,
@@ -41,11 +42,12 @@
}
sk_sp<GrCopyRenderTask> task(new GrCopyRenderTask(
- std::move(srcView), clippedSrcRect, std::move(dstView), clippedDstPoint));
+ drawingMgr, std::move(srcView), clippedSrcRect, std::move(dstView), clippedDstPoint));
return std::move(task);
}
-GrCopyRenderTask::GrCopyRenderTask(GrSurfaceProxyView srcView,
+GrCopyRenderTask::GrCopyRenderTask(GrDrawingManager* drawingMgr,
+ GrSurfaceProxyView srcView,
const SkIRect& srcRect,
GrSurfaceProxyView dstView,
const SkIPoint& dstPoint)
@@ -53,7 +55,7 @@
, fSrcView(std::move(srcView))
, fSrcRect(srcRect)
, fDstPoint(dstPoint) {
- fTargetView.proxy()->setLastRenderTask(this);
+ drawingMgr->setLastRenderTask(fTargetView.proxy(), this);
}
void GrCopyRenderTask::gatherProxyIntervals(GrResourceAllocator* alloc) const {