| Index: src/core/SkRecordDraw.h
|
| diff --git a/src/core/SkRecordDraw.h b/src/core/SkRecordDraw.h
|
| index 9b39dd6adb903ab534ada47194af2ff11a601d07..34d1b6681934cc1869ddbb2c9bcfac15e12003be 100644
|
| --- a/src/core/SkRecordDraw.h
|
| +++ b/src/core/SkRecordDraw.h
|
| @@ -23,7 +23,8 @@ void SkRecordComputeLayers(const SkRect& cullRect, const SkRecord& record,
|
| SkBBoxHierarchy* bbh, SkLayerInfo* data);
|
|
|
| // Draw an SkRecord into an SkCanvas. A convenience wrapper around SkRecords::Draw.
|
| -void SkRecordDraw(const SkRecord&, SkCanvas*, const SkBBoxHierarchy*, SkDrawPictureCallback*);
|
| +void SkRecordDraw(const SkRecord&, SkCanvas*, SkPicture* const drawablePicts[], int drawableCount,
|
| + const SkBBoxHierarchy*, SkDrawPictureCallback*);
|
|
|
| // Draw a portion of an SkRecord into an SkCanvas while replacing clears with drawRects.
|
| // When drawing a portion of an SkRecord the CTM on the passed in canvas must be
|
| @@ -38,9 +39,13 @@ namespace SkRecords {
|
| // This is an SkRecord visitor that will draw that SkRecord to an SkCanvas.
|
| class Draw : SkNoncopyable {
|
| public:
|
| - explicit Draw(SkCanvas* canvas, const SkMatrix* initialCTM = NULL)
|
| + explicit Draw(SkCanvas* canvas, SkPicture* const drawablePicts[], int drawableCount,
|
| + const SkMatrix* initialCTM = NULL)
|
| : fInitialCTM(initialCTM ? *initialCTM : canvas->getTotalMatrix())
|
| - , fCanvas(canvas) {}
|
| + , fCanvas(canvas)
|
| + , fDrawablePicts(drawablePicts)
|
| + , fDrawableCount(drawableCount)
|
| + {}
|
|
|
| // This operator calls methods on the |canvas|. The various draw() wrapper
|
| // methods around SkCanvas are defined by the DRAW() macro in
|
| @@ -49,19 +54,26 @@ public:
|
| this->draw(r);
|
| }
|
|
|
| +protected:
|
| + SkPicture* const* drawablePicts() const { return fDrawablePicts; }
|
| + int drawableCount() const { return fDrawableCount; }
|
| +
|
| private:
|
| // No base case, so we'll be compile-time checked that we implement all possibilities.
|
| template <typename T> void draw(const T&);
|
|
|
| const SkMatrix fInitialCTM;
|
| SkCanvas* fCanvas;
|
| + SkPicture* const* fDrawablePicts;
|
| + int fDrawableCount;
|
| };
|
|
|
| // Used by SkRecordPartialDraw.
|
| class PartialDraw : public Draw {
|
| public:
|
| - PartialDraw(SkCanvas* canvas, const SkRect& clearRect, const SkMatrix& initialCTM)
|
| - : INHERITED(canvas, &initialCTM), fClearRect(clearRect) {}
|
| + PartialDraw(SkCanvas* canvas, SkPicture* const drawablePicts[], int drawableCount,
|
| + const SkRect& clearRect, const SkMatrix& initialCTM)
|
| + : INHERITED(canvas, drawablePicts, drawableCount, &initialCTM), fClearRect(clearRect) {}
|
|
|
| // Same as Draw for all ops except Clear.
|
| template <typename T> void operator()(const T& r) {
|
|
|