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>
This commit is contained in:
Matt Sarett 2016-11-28 18:28:07 -05:00 committed by Skia Commit-Bot
parent 25d6c8325a
commit e11b614795
3 changed files with 3 additions and 15 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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;