aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2014-12-04 07:50:14 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-04 07:50:14 -0800
commit8eddfb50c0c9e4bcba6384a2ce39852b5fb5becb (patch)
treefee1ed25b223ba3e5cd458e351a9899e7179222c /src/utils
parent60f3c657cc0235650b630be78105fc47d37385e7 (diff)
Change clear() to respect the clip
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/SkDeferredCanvas.cpp12
-rw-r--r--src/utils/SkGatherPixelRefsAndRects.h3
-rw-r--r--src/utils/SkNWayCanvas.cpp7
-rw-r--r--src/utils/SkPictureUtils.cpp4
-rw-r--r--src/utils/debugger/SkDebugCanvas.cpp4
-rw-r--r--src/utils/debugger/SkDebugCanvas.h2
6 files changed, 0 insertions, 32 deletions
diff --git a/src/utils/SkDeferredCanvas.cpp b/src/utils/SkDeferredCanvas.cpp
index 3c845b1d65..34b9146996 100644
--- a/src/utils/SkDeferredCanvas.cpp
+++ b/src/utils/SkDeferredCanvas.cpp
@@ -170,8 +170,6 @@ protected:
// None of the following drawing methods should ever get called on the
// deferred device
- virtual void clear(SkColor color) SK_OVERRIDE
- {SkASSERT(0);}
virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE
{SkASSERT(0);}
virtual void drawPoints(const SkDraw&, SkCanvas::PointMode mode,
@@ -741,16 +739,6 @@ void SkDeferredCanvas::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op)
this->recordedDrawCommand();
}
-void SkDeferredCanvas::clear(SkColor color) {
- // purge pending commands
- if (fDeferredDrawing) {
- this->getDeferredDevice()->skipPendingCommands();
- }
-
- this->drawingCanvas()->clear(color);
- this->recordedDrawCommand();
-}
-
void SkDeferredCanvas::drawPaint(const SkPaint& paint) {
if (fDeferredDrawing && this->isFullFrame(NULL, &paint) &&
isPaintOpaque(&paint)) {
diff --git a/src/utils/SkGatherPixelRefsAndRects.h b/src/utils/SkGatherPixelRefsAndRects.h
index 4eeb56c14c..6e11fbe6d5 100644
--- a/src/utils/SkGatherPixelRefsAndRects.h
+++ b/src/utils/SkGatherPixelRefsAndRects.h
@@ -40,9 +40,6 @@ public:
}
protected:
- virtual void clear(SkColor color) SK_OVERRIDE {
- NothingToDo();
- }
virtual void drawPaint(const SkDraw& draw, const SkPaint& paint) SK_OVERRIDE {
SkBitmap bm;
diff --git a/src/utils/SkNWayCanvas.cpp b/src/utils/SkNWayCanvas.cpp
index a6722d8364..ddd9b927fd 100644
--- a/src/utils/SkNWayCanvas.cpp
+++ b/src/utils/SkNWayCanvas.cpp
@@ -134,13 +134,6 @@ void SkNWayCanvas::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
this->INHERITED::onClipRegion(deviceRgn, op);
}
-void SkNWayCanvas::clear(SkColor color) {
- Iter iter(fList);
- while (iter.next()) {
- iter->clear(color);
- }
-}
-
void SkNWayCanvas::drawPaint(const SkPaint& paint) {
Iter iter(fList);
while (iter.next()) {
diff --git a/src/utils/SkPictureUtils.cpp b/src/utils/SkPictureUtils.cpp
index 7f9409adac..2c6b8f56b5 100644
--- a/src/utils/SkPictureUtils.cpp
+++ b/src/utils/SkPictureUtils.cpp
@@ -77,10 +77,6 @@ public:
return false;
}
- virtual void clear(SkColor color) SK_OVERRIDE {
- nothing_to_do();
- }
-
virtual void drawPaint(const SkDraw&, const SkPaint& paint) SK_OVERRIDE {
this->addBitmapFromPaint(paint);
}
diff --git a/src/utils/debugger/SkDebugCanvas.cpp b/src/utils/debugger/SkDebugCanvas.cpp
index 95256e7d13..787cf89299 100644
--- a/src/utils/debugger/SkDebugCanvas.cpp
+++ b/src/utils/debugger/SkDebugCanvas.cpp
@@ -426,10 +426,6 @@ void SkDebugCanvas::overrideTexFiltering(bool overrideTexFiltering, SkPaint::Fil
fTexOverrideFilter->setFilterLevel(level);
}
-void SkDebugCanvas::clear(SkColor color) {
- this->addDrawCommand(new SkClearCommand(color));
-}
-
void SkDebugCanvas::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle edgeStyle) {
this->addDrawCommand(new SkClipPathCommand(path, op, kSoft_ClipEdgeStyle == edgeStyle));
}
diff --git a/src/utils/debugger/SkDebugCanvas.h b/src/utils/debugger/SkDebugCanvas.h
index bdd04aa2db..2c079bd4c3 100644
--- a/src/utils/debugger/SkDebugCanvas.h
+++ b/src/utils/debugger/SkDebugCanvas.h
@@ -158,8 +158,6 @@ public:
// Inherited from SkCanvas
////////////////////////////////////////////////////////////////////////////////
- virtual void clear(SkColor) SK_OVERRIDE;
-
virtual void drawBitmap(const SkBitmap&, SkScalar left, SkScalar top,
const SkPaint*) SK_OVERRIDE;