Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Unified Diff: src/gpu/GrRecordReplaceDraw.cpp

Issue 727363003: wip for drawables (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: make the pictures in the array also const (the array already was const) Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrLayerHoister.cpp ('k') | tests/RecordDrawTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrRecordReplaceDraw.cpp
diff --git a/src/gpu/GrRecordReplaceDraw.cpp b/src/gpu/GrRecordReplaceDraw.cpp
index e4cc00696def6efc77a18ec282c8cbe6ae275642..812584f08cb4c11f5cd988d1810031e0952f1c44 100644
--- a/src/gpu/GrRecordReplaceDraw.cpp
+++ b/src/gpu/GrRecordReplaceDraw.cpp
@@ -56,11 +56,12 @@ static inline void draw_replacement_bitmap(const GrReplacements::ReplacementInfo
class ReplaceDraw : public SkRecords::Draw {
public:
ReplaceDraw(SkCanvas* canvas,
+ SkPicture const* const drawablePicts[], int drawableCount,
const SkPicture* picture,
const GrReplacements* replacements,
const SkMatrix& initialMatrix,
SkDrawPictureCallback* callback)
- : INHERITED(canvas)
+ : INHERITED(canvas, drawablePicts, drawableCount)
, fCanvas(canvas)
, fPicture(picture)
, fReplacements(replacements)
@@ -121,7 +122,8 @@ public:
SkAutoCanvasMatrixPaint acmp(fCanvas, dp.matrix, dp.paint, dp.picture->cullRect());
// Draw sub-pictures with the same replacement list but a different picture
- ReplaceDraw draw(fCanvas, dp.picture, fReplacements, fInitialMatrix, fCallback);
+ ReplaceDraw draw(fCanvas, this->drawablePicts(), this->drawableCount(),
+ dp.picture, fReplacements, fInitialMatrix, fCallback);
fNumReplaced += draw.draw();
}
@@ -182,7 +184,8 @@ int GrRecordReplaceDraw(const SkPicture* picture,
SkDrawPictureCallback* callback) {
SkAutoCanvasRestore saveRestore(canvas, true /*save now, restore at exit*/);
- ReplaceDraw draw(canvas, picture, replacements, initialMatrix, callback);
+ // TODO: drawablePicts?
+ ReplaceDraw draw(canvas, NULL, 0, picture, replacements, initialMatrix, callback);
return draw.draw();
}
« no previous file with comments | « src/gpu/GrLayerHoister.cpp ('k') | tests/RecordDrawTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698