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/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 723c635..f89d4b1 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -323,7 +323,7 @@
     convert_matrixclip(fContext, matrix, clipStack, clip, this->getOrigin());
 
     if (fNeedClear) {
-        fContext->eraseColor(0x0);
+        fContext->clear(0x0);
         fNeedClear = false;
     }
 }
@@ -591,6 +591,10 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
+void SkGpuDevice::clear(SkColor color) {
+    fContext->clear(color);
+}
+
 void SkGpuDevice::drawPaint(const SkDraw& draw, const SkPaint& paint) {
     CHECK_SHOULD_DRAW(draw);