diff options
author | reed <reed@google.com> | 2014-12-02 10:08:11 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-02 10:08:11 -0800 |
commit | 3729469d6a12266037b697c2192768545e097ab0 (patch) | |
tree | 3260a913c22c9cbf3a24e78ebfd45f1e73815e02 /src/core/SkRecordDraw.h | |
parent | cc969c4dd936c97670788395c9cbee3f346e87d1 (diff) |
Change clear() to respect the clip
patch from issue 769703002 at patchset 1 (http://crrev.com/769703002#ps1)
BUG=skia:
Review URL: https://codereview.chromium.org/772533004
Diffstat (limited to 'src/core/SkRecordDraw.h')
-rw-r--r-- | src/core/SkRecordDraw.h | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/src/core/SkRecordDraw.h b/src/core/SkRecordDraw.h index e95123bbe6..509f5a6c72 100644 --- a/src/core/SkRecordDraw.h +++ b/src/core/SkRecordDraw.h @@ -29,15 +29,14 @@ void SkRecordDraw(const SkRecord&, SkCanvas*, SkPicture const* const drawablePic SkCanvasDrawable* const drawables[], int drawableCount, const SkBBoxHierarchy*, SkDrawPictureCallback*); -// Draw a portion of an SkRecord into an SkCanvas while replacing clears with drawRects. +// Draw a portion of an SkRecord into an SkCanvas. // When drawing a portion of an SkRecord the CTM on the passed in canvas must be // the composition of the replay matrix with the record-time CTM (for the portion // of the record that is being replayed). For setMatrix calls to behave correctly // the initialCTM parameter must set to just the replay matrix. void SkRecordPartialDraw(const SkRecord&, SkCanvas*, SkPicture const* const drawablePicts[], int drawableCount, - const SkRect&, unsigned start, unsigned stop, - const SkMatrix& initialCTM); + unsigned start, unsigned stop, const SkMatrix& initialCTM); namespace SkRecords { @@ -76,30 +75,6 @@ private: int fDrawableCount; }; -// Used by SkRecordPartialDraw. -class PartialDraw : public Draw { -public: - PartialDraw(SkCanvas* canvas, SkPicture const* const drawablePicts[], int drawableCount, - const SkRect& clearRect, const SkMatrix& initialCTM) - : INHERITED(canvas, drawablePicts, NULL, drawableCount, &initialCTM), fClearRect(clearRect) - {} - - // Same as Draw for all ops except Clear. - template <typename T> void operator()(const T& r) { - this->INHERITED::operator()(r); - } - void operator()(const Clear& c) { - SkPaint p; - p.setColor(c.color); - DrawRect drawRect(p, fClearRect); - this->INHERITED::operator()(drawRect); - } - -private: - const SkRect fClearRect; - typedef Draw INHERITED; -}; - } // namespace SkRecords #endif//SkRecordDraw_DEFINED |