From 3a7492fc04d83ed2729d2ba226d5277459536b74 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Wed, 30 Nov 2016 10:52:10 -0500 Subject: Remove GrBatch::renderTarget() and use GrBatch::renderTargetUniqueID() instead. Change-Id: I621ed38955e374c79a4d44c0020f9bae9655f001 Reviewed-on: https://skia-review.googlesource.com/5344 Reviewed-by: Robert Phillips Commit-Queue: Brian Salomon --- src/gpu/GrRenderTargetOpList.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gpu/GrRenderTargetOpList.cpp') 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 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 }; -- cgit v1.2.3