aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Matt Sarett <msarett@google.com>2016-11-28 18:28:07 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-29 18:53:54 +0000
commite11b614795bbe707d131ad599ead5be452e7c06f (patch)
treeb79231de00fbf952a541eba00a679210c5678a4b
parent25d6c8325a4f8ebca30eb01b91123dfd8c57b87b (diff)
Delete unnecessary SkSurface_Base API
BUG=skia: Change-Id: I1263d390ffc1660a561b03c9dd866390754e59af Reviewed-on: https://skia-review.googlesource.com/5231 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
-rw-r--r--src/image/SkSurface.cpp5
-rw-r--r--src/image/SkSurface_Base.h7
-rw-r--r--tests/SurfaceTest.cpp6
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;