Index: src/pipe/SkGPipeWrite.cpp |
diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp |
index a5af6c71110be482cc29f2a5009e7ff83ecbd686..41b02344805ffceb09c1797367a78355024a7e1d 100644 |
--- a/src/pipe/SkGPipeWrite.cpp |
+++ b/src/pipe/SkGPipeWrite.cpp |
@@ -233,6 +233,7 @@ public: |
// overrides from SkCanvas |
virtual bool isDrawingToLayer() const SK_OVERRIDE; |
+ virtual void clear(SkColor) SK_OVERRIDE; |
virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; |
virtual void drawPoints(PointMode, size_t count, const SkPoint pts[], |
const SkPaint&) SK_OVERRIDE; |
@@ -689,6 +690,20 @@ void SkGPipeCanvas::onClipRegion(const SkRegion& region, SkRegion::Op rgnOp) { |
/////////////////////////////////////////////////////////////////////////////// |
+void SkGPipeCanvas::clear(SkColor color) { |
+ NOTIFY_SETUP(this); |
+ unsigned flags = 0; |
+ if (color) { |
+ flags |= kClear_HasColor_DrawOpFlag; |
+ } |
+ if (this->needOpBytes(sizeof(SkColor))) { |
+ this->writeOp(kDrawClear_DrawOp, flags, 0); |
+ if (color) { |
+ fWriter.write32(color); |
+ } |
+ } |
+} |
+ |
void SkGPipeCanvas::drawPaint(const SkPaint& paint) { |
NOTIFY_SETUP(this); |
this->writePaint(paint); |