aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkBitmapDevice.h5
-rw-r--r--include/core/SkCanvas.h22
-rw-r--r--include/core/SkDevice.h3
-rw-r--r--include/core/SkPicture.h2
4 files changed, 8 insertions, 24 deletions
diff --git a/include/core/SkBitmapDevice.h b/include/core/SkBitmapDevice.h
index dff5e65bc8..03fd014d45 100644
--- a/include/core/SkBitmapDevice.h
+++ b/include/core/SkBitmapDevice.h
@@ -40,11 +40,6 @@ public:
protected:
bool onShouldDisableLCD(const SkPaint&) const SK_OVERRIDE;
- /** Clears the entire device to the specified color (including alpha).
- * Ignores the clip.
- */
- virtual void clear(SkColor color) SK_OVERRIDE;
-
/** These are called inside the per-device-layer loop for each draw call.
When these are called, we have already applied any saveLayer operations,
and are handling any looping from the paint, and any effects from the
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 0685b6a8e6..ee539c4244 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -619,24 +619,12 @@ public:
@param color the color to draw with
@param mode the mode to apply the color in (defaults to SrcOver)
*/
- void drawColor(SkColor color,
- SkXfermode::Mode mode = SkXfermode::kSrcOver_Mode);
+ void drawColor(SkColor color, SkXfermode::Mode mode = SkXfermode::kSrcOver_Mode);
- /**
- * This erases the entire drawing surface to the specified color,
- * irrespective of the clip. It does not blend with the previous pixels,
- * but always overwrites them.
- *
- * It is roughly equivalent to the following:
- * canvas.save();
- * canvas.clipRect(hugeRect, kReplace_Op);
- * paint.setColor(color);
- * paint.setXfermodeMode(kSrc_Mode);
- * canvas.drawPaint(paint);
- * canvas.restore();
- * though it is almost always much more efficient.
- */
- virtual void clear(SkColor);
+ // TODO: remove virtual when chrome subclass stop overriding this.
+ virtual void clear(SkColor color) {
+ this->drawColor(color, SkXfermode::kSrc_Mode);
+ }
/**
* This makes the contents of the canvas undefined. Subsequent calls that
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h
index 3c26baca5b..f20ebf719a 100644
--- a/include/core/SkDevice.h
+++ b/include/core/SkDevice.h
@@ -163,8 +163,9 @@ protected:
/** Clears the entire device to the specified color (including alpha).
* Ignores the clip.
+ * DEPRECATED : will go away when chrome subclasses have been updated
*/
- virtual void clear(SkColor color) = 0;
+ virtual void clear(SkColor color);
SK_ATTR_DEPRECATED("use clear() instead")
void eraseColor(SkColor eraseColor) { this->clear(eraseColor); }
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index c63a201cd8..b3bdda1354 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -245,7 +245,7 @@ private:
// V34: Add SkTextBlob serialization.
// V35: Store SkRect (rather then width & height) in header
// V36: Remove (obsolete) alphatype from SkColorTable
- // V37: Added shadow only option to SkDropShadowImageFilter
+ // V37: Added shadow only option to SkDropShadowImageFilter (last version to record CLEAR)
// Note: If the picture version needs to be increased then please follow the
// steps to generate new SKPs in (only accessible to Googlers): http://goo.gl/qATVcw