Index: tools/VisualBench/WrappedBenchmark.h |
diff --git a/tools/VisualBench/WrappedBenchmark.h b/tools/VisualBench/WrappedBenchmark.h |
index bd88f13502ead965cb79cc2a0c182c639a59fd22..ddf601ddf8331ed80a1b32eccaeafa2d7f43dd05 100644 |
--- a/tools/VisualBench/WrappedBenchmark.h |
+++ b/tools/VisualBench/WrappedBenchmark.h |
@@ -9,7 +9,6 @@ |
#define WrappedBenchmark_DEFINED |
#include "Benchmark.h" |
-#include "SkDevice.h" |
#include "SkSurface.h" |
#include "GrContext.h" |
#include "GrRenderTarget.h" |
@@ -113,26 +112,15 @@ private: |
void onBlitToScreen(SkCanvas* canvas, int w, int h) override { |
// We call copySurface directly on the underlying GPU surfaces for a more efficient blit. |
- GrRenderTarget* dst, *src; |
+ GrRenderTarget* dst = canvas->internal_private_accessTopLayerRenderTarget(); |
+ SkASSERT(dst); |
- SkCanvas::LayerIter canvasIter(canvas, false); |
- SkAssertResult((dst = canvasIter.device()->accessRenderTarget())); |
- |
- SkCanvas::LayerIter offscreenIter(fOffScreen->getCanvas(), false); |
- SkAssertResult((src = offscreenIter.device()->accessRenderTarget())); |
+ GrRenderTarget* src = fOffScreen->getCanvas()->internal_private_accessTopLayerRenderTarget(); |
+ SkASSERT(src); |
SkASSERT(dst->getContext() == src->getContext()); |
dst->getContext()->copySurface(dst, src, SkIRect::MakeWH(w, h), SkIPoint::Make(0, 0)); |
- |
-#ifdef SK_DEBUG |
- // This method should not be called while layers are saved. |
- canvasIter.next(); |
- SkASSERT(canvasIter.done()); |
- |
- offscreenIter.next(); |
- SkASSERT(offscreenIter.done()); |
-#endif |
} |
int fNumSamples; |