Index: include/core/SkCanvas.h |
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h |
index 0685b6a8e66dcd08a9081e9ac854debccad10589..ee539c4244864072ac25be34f06c1b01d2d189f0 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) { |
mtklein
2014/12/02 15:27:37
How about we leave ourselves the note here:
// FY
reed1
2014/12/02 16:21:15
Hmmm, that seems like a note better suited for whe
mtklein
2014/12/02 16:29:26
Sure. As long as we leave a note, anywhere sensib
|
+ this->drawColor(color, SkXfermode::kSrc_Mode); |
+ } |
/** |
* This makes the contents of the canvas undefined. Subsequent calls that |