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/GrGpu.cpp b/gpu/src/GrGpu.cpp
index 43fe648..c8e2bc7 100644
--- a/gpu/src/GrGpu.cpp
+++ b/gpu/src/GrGpu.cpp
@@ -173,9 +173,9 @@
return this->onCreateIndexBuffer(size, dynamic);
}
-void GrGpu::eraseColor(GrColor color) {
+void GrGpu::clear(GrColor color) {
this->handleDirtyContext();
- this->onEraseColor(color);
+ this->onClear(color);
}
void GrGpu::forceRenderTargetFlush() {
@@ -423,7 +423,7 @@
AutoInternalDrawGeomRestore aidgr(this);
this->setViewMatrix(GrMatrix::I());
- this->eraseStencilClip(clipRect);
+ this->clearStencilClip(clipRect);
this->flushScissor(NULL);
#if !VISUALIZE_COMPLEX_CLIP
this->enableState(kNoColorWrites_StateBit);