remove device::clear -- no longer called
authorreed <reed@chromium.org>
Mon, 8 Dec 2014 16:00:29 +0000 (08:00 -0800)
committerCommit bot <commit-bot@chromium.org>
Mon, 8 Dec 2014 16:00:29 +0000 (08:00 -0800)
BUG=skia:

Review URL: https://codereview.chromium.org/778373003

include/core/SkDevice.h
include/device/xps/SkXPSDevice.h
src/core/SkDevice.cpp
src/device/xps/SkXPSDevice.cpp

index dc5e32b..fbb5339 100644 (file)
@@ -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,
index 6dddb99..8fa7e51 100644 (file)
@@ -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(
index 570cea4..f428851 100644 (file)
@@ -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) {
index 94d9c98..5f24c12 100644 (file)
@@ -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) {