diff options
author | Brian Salomon <bsalomon@google.com> | 2016-11-30 10:52:10 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-30 22:11:50 +0000 |
commit | 3a7492fc04d83ed2729d2ba226d5277459536b74 (patch) | |
tree | eea42a61e2ea132e3880614ec5633c884054da4d /src/gpu/GrRenderTargetOpList.cpp | |
parent | fa565847fe0eb8c931f9dfc7ee08b295ac5db3b2 (diff) |
Remove GrBatch::renderTarget() and use GrBatch::renderTargetUniqueID() instead.
Change-Id: I621ed38955e374c79a4d44c0020f9bae9655f001
Reviewed-on: https://skia-review.googlesource.com/5344
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrRenderTargetOpList.cpp')
-rw-r--r-- | src/gpu/GrRenderTargetOpList.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/GrRenderTargetOpList.cpp b/src/gpu/GrRenderTargetOpList.cpp index 40c543d361..7b16a55c9d 100644 --- a/src/gpu/GrRenderTargetOpList.cpp +++ b/src/gpu/GrRenderTargetOpList.cpp @@ -186,20 +186,20 @@ bool GrRenderTargetOpList::drawBatches(GrBatchFlushState* flushState) { } // Draw all the generated geometry. SkRandom random; - GrRenderTarget* currentRT = nullptr; + GrGpuResource::UniqueID currentRTID = GrGpuResource::UniqueID::InvalidID(); std::unique_ptr<GrGpuCommandBuffer> commandBuffer; for (int i = 0; i < fRecordedBatches.count(); ++i) { if (!fRecordedBatches[i].fBatch) { continue; } - if (fRecordedBatches[i].fBatch->renderTarget() != currentRT) { + if (fRecordedBatches[i].fBatch->renderTargetUniqueID() != currentRTID) { if (commandBuffer) { commandBuffer->end(); commandBuffer->submit(); commandBuffer.reset(); } - currentRT = fRecordedBatches[i].fBatch->renderTarget(); - if (currentRT) { + currentRTID = fRecordedBatches[i].fBatch->renderTargetUniqueID(); + if (!currentRTID.isInvalid()) { static const GrGpuCommandBuffer::LoadAndStoreInfo kBasicLoadStoreInfo { GrGpuCommandBuffer::LoadOp::kLoad,GrGpuCommandBuffer::StoreOp::kStore, GrColor_ILLEGAL }; |