rename SkDevice::eraseColor to clear and make virtual.
Properly flush in GrContext before calling GrGpu::clear()
Review URL: http://codereview.appspot.com/4419043/
git-svn-id: http://skia.googlecode.com/svn/trunk@1130 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h
index 8889fb4..5755e95 100644
--- a/include/core/SkDevice.h
+++ b/include/core/SkDevice.h
@@ -115,10 +115,15 @@
*/
const SkBitmap& accessBitmap(bool changePixels);
- /** Helper to erase the entire device to the specified color (including
- alpha).
- */
- void eraseColor(SkColor eraseColor);
+ /** Clears the entire device to the specified color (including alpha).
+ * Ignores the clip.
+ */
+ virtual void clear(SkColor color);
+
+ /**
+ * Deprecated name for clear.
+ */
+ void eraseColor(SkColor eraseColor) { this->clear(eraseColor); }
/** Called when this device is installed into a Canvas. Balanaced by a call
to unlockPixels() when the device is removed from a Canvas.
diff --git a/include/gpu/SkGpuDevice.h b/include/gpu/SkGpuDevice.h
index fbe5929..ff1bb0d 100644
--- a/include/gpu/SkGpuDevice.h
+++ b/include/gpu/SkGpuDevice.h
@@ -75,6 +75,7 @@
// overrides from SkDevice
+ virtual void clear(SkColor color);
virtual bool readPixels(const SkIRect& srcRect, SkBitmap* bitmap);
virtual void writePixels(const SkBitmap& bitmap, int x, int y);