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 |