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

Unified Diff: include/core/SkPictureRecorder.h

Issue 2246893002: add parallel public API for recording SkLiteDL. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 | « dm/DMSrcSink.cpp ('k') | src/core/SkPictureRecorder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPictureRecorder.h
diff --git a/include/core/SkPictureRecorder.h b/include/core/SkPictureRecorder.h
index f20a06adf44fa41d3e166f3b7fc2ac3677675006..96e7aa019de212801df8cd5cb8eb8494ea78e946 100644
--- a/include/core/SkPictureRecorder.h
+++ b/include/core/SkPictureRecorder.h
@@ -140,4 +140,30 @@ private:
typedef SkNoncopyable INHERITED;
};
+class SkLiteDL;
reed1 2016/08/15 15:52:51 Perhaps we can make this a separate file for now,
+class SkLiteRecorder;
+
+// A similar API to SkPictureRecorder, wrapping SkLiteRecorder and SkLiteDL.
+class SK_API SkPictureRecorder_Lite : SkNoncopyable {
+public:
+ SkPictureRecorder_Lite();
+ ~SkPictureRecorder_Lite();
+
+ SkCanvas* beginRecording(const SkRect& bounds);
+ SkCanvas* beginRecording(SkScalar w, SkScalar h) {
+ return this->beginRecording(SkRect::MakeWH(w,h));
+ }
+
+ SkCanvas* getRecordingCanvas();
+
+ void optimizeFor(GrContext* ctx) { fGrContextToOptimizeFor = ctx; }
+
+ sk_sp<SkDrawable> finishRecordingAsDrawable(uint32_t ignored = 0);
djsollen 2016/08/15 14:47:43 will this return a nullptr if there were no drawin
+
+private:
+ std::unique_ptr<SkLiteRecorder> fRecorder;
+ sk_sp<SkLiteDL> fDL;
+ GrContext* fGrContextToOptimizeFor = nullptr;
+};
+
#endif
« no previous file with comments | « dm/DMSrcSink.cpp ('k') | src/core/SkPictureRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698