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

Unified Diff: include/core/SkMultiPictureDraw.h

Issue 684923002: MultiPictureDraw is taskgroup aware. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: actually call Reset() to free the data in each data Created 6 years, 2 months 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 | « gyp/tools.gyp ('k') | samplecode/SampleApp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkMultiPictureDraw.h
diff --git a/include/core/SkMultiPictureDraw.h b/include/core/SkMultiPictureDraw.h
index d8d9cb7ecdcaa0492ed665e2edd1f240d0a5573b..461d38136b3e6b7055dbc3f54a89321bfb1c8ce8 100644
--- a/include/core/SkMultiPictureDraw.h
+++ b/include/core/SkMultiPictureDraw.h
@@ -56,13 +56,23 @@ public:
private:
struct DrawData {
- SkCanvas* canvas; // reffed
- const SkPicture* picture; // reffed
- SkMatrix matrix;
- SkPaint* paint; // owned
+ SkCanvas* fCanvas; // reffed
+ const SkPicture* fPicture; // reffed
+ SkMatrix fMatrix;
+ SkPaint* fPaint; // owned
+
+ void init(SkCanvas*, const SkPicture*, const SkMatrix*, const SkPaint*);
+ void draw();
+
+ static void Reset(SkTDArray<DrawData>&);
+
+ static void Run(void* ctx) {
+ static_cast<DrawData*>(ctx)->draw();
+ }
};
- SkTDArray<DrawData> fDrawData;
+ SkTDArray<DrawData> fThreadSafeDrawData;
+ SkTDArray<DrawData> fGPUDrawData;
};
#endif
« no previous file with comments | « gyp/tools.gyp ('k') | samplecode/SampleApp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698