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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « dm/DMSrcSink.cpp ('k') | src/core/SkPictureRecorder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkPictureRecorder_DEFINED 8 #ifndef SkPictureRecorder_DEFINED
9 #define SkPictureRecorder_DEFINED 9 #define SkPictureRecorder_DEFINED
10 10
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 SkAutoTUnref<SkBBoxHierarchy> fBBH; 133 SkAutoTUnref<SkBBoxHierarchy> fBBH;
134 SkAutoTUnref<SkRecorder> fRecorder; 134 SkAutoTUnref<SkRecorder> fRecorder;
135 SkAutoTUnref<SkRecord> fRecord; 135 SkAutoTUnref<SkRecord> fRecord;
136 SkMiniRecorder fMiniRecorder; 136 SkMiniRecorder fMiniRecorder;
137 137
138 GrContext* fGrContextToOptimizeFor = nullptr; 138 GrContext* fGrContextToOptimizeFor = nullptr;
139 139
140 typedef SkNoncopyable INHERITED; 140 typedef SkNoncopyable INHERITED;
141 }; 141 };
142 142
143 class SkLiteDL;
reed1 2016/08/15 15:52:51 Perhaps we can make this a separate file for now,
144 class SkLiteRecorder;
145
146 // A similar API to SkPictureRecorder, wrapping SkLiteRecorder and SkLiteDL.
147 class SK_API SkPictureRecorder_Lite : SkNoncopyable {
148 public:
149 SkPictureRecorder_Lite();
150 ~SkPictureRecorder_Lite();
151
152 SkCanvas* beginRecording(const SkRect& bounds);
153 SkCanvas* beginRecording(SkScalar w, SkScalar h) {
154 return this->beginRecording(SkRect::MakeWH(w,h));
155 }
156
157 SkCanvas* getRecordingCanvas();
158
159 void optimizeFor(GrContext* ctx) { fGrContextToOptimizeFor = ctx; }
160
161 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
162
163 private:
164 std::unique_ptr<SkLiteRecorder> fRecorder;
165 sk_sp<SkLiteDL> fDL;
166 GrContext* fGrContextToOptimizeFor = nullptr;
167 };
168
143 #endif 169 #endif
OLDNEW
« 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