diff options
-rw-r--r-- | src/image/SkSurface.cpp | 5 | ||||
-rw-r--r-- | src/image/SkSurface_Base.h | 7 | ||||
-rw-r--r-- | tests/SurfaceTest.cpp | 6 |
3 files changed, 3 insertions, 15 deletions
diff --git a/src/image/SkSurface.cpp b/src/image/SkSurface.cpp index 47583a1d64..3d6670f169 100644 --- a/src/image/SkSurface.cpp +++ b/src/image/SkSurface.cpp @@ -9,7 +9,6 @@ #include "SkSurface_Base.h" #include "SkImagePriv.h" #include "SkCanvas.h" -#include "SkOverdrawCanvas.h" #include "SkFontLCDConfig.h" static SkPixelGeometry compute_default_geometry() { @@ -118,10 +117,6 @@ void SkSurface_Base::aboutToDraw(ContentChangeMode mode) { } } -std::unique_ptr<SkCanvas> SkSurface_Base::onMakeOverdrawCanvas() { - return std::unique_ptr<SkCanvas>(new SkOverdrawCanvas(this->getCachedCanvas())); -} - uint32_t SkSurface_Base::newGenerationID() { SkASSERT(!fCachedCanvas || fCachedCanvas->getSurfaceBase() == this); static int32_t gID; diff --git a/src/image/SkSurface_Base.h b/src/image/SkSurface_Base.h index f824bbbc4d..a8c1d8f0a4 100644 --- a/src/image/SkSurface_Base.h +++ b/src/image/SkSurface_Base.h @@ -80,13 +80,6 @@ public: */ virtual void onPrepareForExternalIO() {} - /** - * Creates an overdraw debugging canvas. - * Draws to this canvas will not actually draw any content. Instead, they will - * increment the alpha channel each time a pixel would have been touched. - * It may be efficient to use kAlpha8 as the color type on the surface. - */ - std::unique_ptr<SkCanvas> onMakeOverdrawCanvas(); inline SkCanvas* getCachedCanvas(); inline sk_sp<SkImage> refCachedImage(SkBudgeted, ForceUnique); diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp index e08b86657e..ec8e4a9059 100644 --- a/tests/SurfaceTest.cpp +++ b/tests/SurfaceTest.cpp @@ -11,10 +11,10 @@ #include "SkData.h" #include "SkDevice.h" #include "SkImage_Base.h" +#include "SkOverdrawCanvas.h" #include "SkPath.h" #include "SkRRect.h" #include "SkSurface.h" -#include "SkSurface_Base.h" #include "SkUtils.h" #include "Test.h" @@ -1024,8 +1024,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SurfaceCreationWithColorSpace_Gpu, reporter, #endif static void test_overdraw_surface(skiatest::Reporter* r, SkSurface* surface) { - std::unique_ptr<SkCanvas> canvas = ((SkSurface_Base*) surface)->onMakeOverdrawCanvas(); - canvas->drawPaint(SkPaint()); + SkOverdrawCanvas canvas(surface->getCanvas()); + canvas.drawPaint(SkPaint()); sk_sp<SkImage> image = surface->makeImageSnapshot(); SkBitmap bitmap; |