diff options
author | reed <reed@google.com> | 2016-03-23 18:59:25 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-23 18:59:25 -0700 |
commit | e8f3062a36d3682f4019309a32b5b84dc9eddf8c (patch) | |
tree | ff5cd50c65edb6e3b77f77327165ad0162557137 /tools/VisualBench/WrappedBenchmark.h | |
parent | 041c870425eb0a3e2b0cbc46581b3da2f50571d9 (diff) |
switch surface to sk_sp
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1817383002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot
Review URL: https://codereview.chromium.org/1817383002
Diffstat (limited to 'tools/VisualBench/WrappedBenchmark.h')
-rw-r--r-- | tools/VisualBench/WrappedBenchmark.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/VisualBench/WrappedBenchmark.h b/tools/VisualBench/WrappedBenchmark.h index 35d64ee182..bd88f13502 100644 --- a/tools/VisualBench/WrappedBenchmark.h +++ b/tools/VisualBench/WrappedBenchmark.h @@ -36,20 +36,20 @@ public: fBench->perCanvasPreDraw(fOffScreen->getCanvas()); } void onPreDraw(SkCanvas* canvas) override { - SkASSERT(fOffScreen.get()); + SkASSERT(fOffScreen); fBench->preDraw(fOffScreen->getCanvas()); } void onPostDraw(SkCanvas* canvas) override { - SkASSERT(fOffScreen.get()); + SkASSERT(fOffScreen); fBench->postDraw(fOffScreen->getCanvas()); } void onPerCanvasPostDraw(SkCanvas* canvas) override { - SkASSERT(fOffScreen.get()); + SkASSERT(fOffScreen); fBench->perCanvasPostDraw(fOffScreen->getCanvas()); } void onDraw(int loops, SkCanvas* canvas) override { - SkASSERT(fOffScreen.get()); + SkASSERT(fOffScreen); fBench->draw(loops, fOffScreen->getCanvas()); this->blitToScreen(canvas); } @@ -68,7 +68,7 @@ protected: virtual void onBlitToScreen(SkCanvas* canvas, int w, int h) = 0; SkSurfaceProps fSurfaceProps; - SkAutoTUnref<SkSurface> fOffScreen; + sk_sp<SkSurface> fOffScreen; SkAutoTUnref<Benchmark> fBench; }; @@ -80,7 +80,7 @@ public: private: void setupOffScreen(SkCanvas* canvas) override { - fOffScreen.reset(SkSurface::NewRaster(canvas->imageInfo(), &this->surfaceProps())); + fOffScreen = SkSurface::MakeRaster(canvas->imageInfo(), &this->surfaceProps()); } void onBlitToScreen(SkCanvas* canvas, int w, int h) override { @@ -104,11 +104,11 @@ public: private: void setupOffScreen(SkCanvas* canvas) override { - fOffScreen.reset(SkSurface::NewRenderTarget(canvas->getGrContext(), + fOffScreen = SkSurface::MakeRenderTarget(canvas->getGrContext(), SkBudgeted::kNo, canvas->imageInfo(), fNumSamples, - &this->surfaceProps())); + &this->surfaceProps()); } void onBlitToScreen(SkCanvas* canvas, int w, int h) override { |