Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(914)

Unified Diff: src/gpu/batches/GrCopySurfaceBatch.h

Issue 2078483002: Start using GrGpuCommandBuffer in GrDrawTarget. (Closed) Base URL: https://skia.googlesource.com/skia.git@memoryWAR
Patch Set: remove errant lines Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/batches/GrClearBatch.h ('k') | src/gpu/batches/GrDiscardBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrCopySurfaceBatch.h
diff --git a/src/gpu/batches/GrCopySurfaceBatch.h b/src/gpu/batches/GrCopySurfaceBatch.h
index 3926643f8aedff441e2c36aece565a267c3d9ba8..900bcf3fda9d3e728e94f88f028f9f11b08553a5 100644
--- a/src/gpu/batches/GrCopySurfaceBatch.h
+++ b/src/gpu/batches/GrCopySurfaceBatch.h
@@ -36,7 +36,7 @@ public:
GrRenderTarget* rt = fDst.get()->asRenderTarget();
return rt ? rt->getUniqueID() : 0;
}
- GrRenderTarget* renderTarget() const override { return fDst.get()->asRenderTarget(); }
+ GrRenderTarget* renderTarget() const override { return nullptr; }
SkString dumpInfo() const override {
SkString string;
@@ -64,7 +64,12 @@ private:
void onPrepare(GrBatchFlushState*) override {}
void onDraw(GrBatchFlushState* state) override {
- state->gpu()->copySurface(fDst.get(), fSrc.get(), fSrcRect, fDstPoint);
+ if (!state->commandBuffer()) {
+ state->gpu()->copySurface(fDst.get(), fSrc.get(), fSrcRect, fDstPoint);
+ } else {
+ // currently we are not sending copies through the GrGpuCommandBuffer
+ SkASSERT(false);
+ }
}
GrPendingIOResource<GrSurface, kWrite_GrIOType> fDst;
« no previous file with comments | « src/gpu/batches/GrClearBatch.h ('k') | src/gpu/batches/GrDiscardBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698