Chromium Code Reviews| Index: src/gpu/batches/GrCopySurfaceBatch.h |
| diff --git a/src/gpu/batches/GrCopySurfaceBatch.h b/src/gpu/batches/GrCopySurfaceBatch.h |
| index 3926643f8aedff441e2c36aece565a267c3d9ba8..d0269b79bf8c795494f551edf39d0b21e91bcd4d 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; |
| @@ -63,8 +63,13 @@ private: |
| void onPrepare(GrBatchFlushState*) override {} |
| - void onDraw(GrBatchFlushState* state) override { |
| - state->gpu()->copySurface(fDst.get(), fSrc.get(), fSrcRect, fDstPoint); |
| + void onDraw(GrBatchFlushState* state, GrGpuCommandBuffer* buffer) override { |
| + if (!buffer) { |
| + state->gpu()->copySurface(fDst.get(), fSrc.get(), fSrcRect, fDstPoint); |
| + } else { |
| + // currently we are not sending copies through the GrGpuCommandBuffer |
|
bsalomon
2016/06/20 16:51:14
Does this break anything with GL?
egdaniel
2016/06/22 15:26:57
it does not. All copySurfaceBatches return a nullp
bsalomon
2016/06/22 15:41:15
This feels a little gnarly. Is there a different l
egdaniel
2016/06/22 21:13:35
As per discussion, copies should be moved away fro
|
| + SkASSERT(false); |
| + } |
| } |
| GrPendingIOResource<GrSurface, kWrite_GrIOType> fDst; |