| Index: tools/VisualBench/WrappedBenchmark.h
|
| diff --git a/tools/VisualBench/WrappedBenchmark.h b/tools/VisualBench/WrappedBenchmark.h
|
| index ddf601ddf8331ed80a1b32eccaeafa2d7f43dd05..8939fda319b984b52dc0e34aefd99214ac23112b 100644
|
| --- a/tools/VisualBench/WrappedBenchmark.h
|
| +++ b/tools/VisualBench/WrappedBenchmark.h
|
| @@ -11,6 +11,7 @@
|
| #include "Benchmark.h"
|
| #include "SkSurface.h"
|
| #include "GrContext.h"
|
| +#include "GrDrawContext.h"
|
| #include "GrRenderTarget.h"
|
|
|
| // Wrap some other benchmark to allow specialization to either
|
| @@ -112,15 +113,18 @@ 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 = canvas->internal_private_accessTopLayerRenderTarget();
|
| - SkASSERT(dst);
|
| + GrDrawContext* dstDC = canvas->internal_private_accessTopLayerDrawContext();
|
| + SkASSERT(dstDC);
|
|
|
| - GrRenderTarget* src = fOffScreen->getCanvas()->internal_private_accessTopLayerRenderTarget();
|
| + GrDrawContext* srcDC =
|
| + fOffScreen->getCanvas()->internal_private_accessTopLayerDrawContext();
|
| + SkASSERT(srcDC);
|
| + GrRenderTarget* src = srcDC->accessRenderTarget();
|
| SkASSERT(src);
|
|
|
| - SkASSERT(dst->getContext() == src->getContext());
|
| + SkASSERT(canvas->getGrContext() == fOffScreen->getCanvas()->getGrContext());
|
|
|
| - dst->getContext()->copySurface(dst, src, SkIRect::MakeWH(w, h), SkIPoint::Make(0, 0));
|
| + dstDC->copySurface(src, SkIRect::MakeWH(w, h), SkIPoint::Make(0, 0));
|
| }
|
|
|
| int fNumSamples;
|
|
|