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/gpu/src/GrContext.cpp b/gpu/src/GrContext.cpp
index 8017f73..f68564a 100644
--- a/gpu/src/GrContext.cpp
+++ b/gpu/src/GrContext.cpp
@@ -325,8 +325,11 @@
////////////////////////////////////////////////////////////////////////////////
-void GrContext::eraseColor(GrColor color) {
- fGpu->eraseColor(color);
+void GrContext::clear(GrColor color) {
+ // gpu flush call is immediate, must flush.
+ // (could in theory skip draws to current render target.)
+ this->flush();
+ fGpu->clear(color);
}
void GrContext::drawPaint(const GrPaint& paint) {