From 08c357c9142c68e1ec9493eb3d5aeacb41ccd7b5 Mon Sep 17 00:00:00 2001 From: reed Date: Mon, 8 Dec 2014 08:00:29 -0800 Subject: [PATCH] remove device::clear -- no longer called BUG=skia: Review URL: https://codereview.chromium.org/778373003 --- include/core/SkDevice.h | 2 ++ include/device/xps/SkXPSDevice.h | 2 -- src/core/SkDevice.cpp | 2 ++ src/device/xps/SkXPSDevice.cpp | 5 ----- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h index dc5e32b..fbb5339 100644 --- a/include/core/SkDevice.h +++ b/include/core/SkDevice.h @@ -161,6 +161,7 @@ protected: virtual void setMatrixClip(const SkMatrix&, const SkRegion&, const SkClipStack&) {}; +#ifdef SK_SUPPORT_LEGACY_DEVICE_CLEAR private: /** Clears the entire device to the specified color (including alpha). * Ignores the clip. @@ -168,6 +169,7 @@ private: */ virtual void clear(SkColor color); public: +#endif /** These are called inside the per-device-layer loop for each draw call. When these are called, we have already applied any saveLayer operations, diff --git a/include/device/xps/SkXPSDevice.h b/include/device/xps/SkXPSDevice.h index 6dddb99..8fa7e51 100644 --- a/include/device/xps/SkXPSDevice.h +++ b/include/device/xps/SkXPSDevice.h @@ -70,8 +70,6 @@ public: virtual bool endPortfolio(); protected: - virtual void clear(SkColor color) SK_OVERRIDE; - virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE; virtual void drawPoints( diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp index 570cea4..f428851 100644 --- a/src/core/SkDevice.cpp +++ b/src/core/SkDevice.cpp @@ -90,10 +90,12 @@ SkSurface* SkBaseDevice::newSurface(const SkImageInfo&, const SkSurfaceProps&) { const void* SkBaseDevice::peekPixels(SkImageInfo*, size_t*) { return NULL; } +#ifdef SK_SUPPORT_LEGACY_DEVICE_CLEAR // DEPRECATED : remove when chrome subclass have been updated to not override clear() void SkBaseDevice::clear(SkColor color) { SkFAIL("SkDevice::clear() should not be called"); } +#endif void SkBaseDevice::drawDRRect(const SkDraw& draw, const SkRRect& outer, const SkRRect& inner, const SkPaint& paint) { diff --git a/src/device/xps/SkXPSDevice.cpp b/src/device/xps/SkXPSDevice.cpp index 94d9c98..5f24c12 100644 --- a/src/device/xps/SkXPSDevice.cpp +++ b/src/device/xps/SkXPSDevice.cpp @@ -1159,11 +1159,6 @@ HRESULT SkXPSDevice::createXpsQuad(const SkPoint (&points)[4], return S_OK; } -void SkXPSDevice::clear(SkColor color) { - //TODO: override this for XPS - SkDEBUGF(("XPS clear not yet implemented.")); -} - void SkXPSDevice::drawPoints(const SkDraw& d, SkCanvas::PointMode mode, size_t count, const SkPoint points[], const SkPaint& paint) { -- 2.7.4