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

Side by Side Diff: src/core/SkPictureRecorder.cpp

Issue 2243393002: Revert of 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 | « include/core/SkPictureRecorder.h ('k') | no next file » | 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 #include "SkBigPicture.h" 8 #include "SkBigPicture.h"
9 #include "SkData.h" 9 #include "SkData.h"
10 #include "SkDrawable.h" 10 #include "SkDrawable.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 sk_sp<SkDrawable> drawable = 190 sk_sp<SkDrawable> drawable =
191 sk_make_sp<SkRecordedDrawable>(fRecord, fBBH, fRecorder->detachDrawable List(), fCullRect); 191 sk_make_sp<SkRecordedDrawable>(fRecord, fBBH, fRecorder->detachDrawable List(), fCullRect);
192 192
193 // release our refs now, so only the drawable will be the owner. 193 // release our refs now, so only the drawable will be the owner.
194 fRecord.reset(nullptr); 194 fRecord.reset(nullptr);
195 fBBH.reset(nullptr); 195 fBBH.reset(nullptr);
196 196
197 return drawable; 197 return drawable;
198 } 198 }
199
200 #include "SkLiteDL.h"
201 #include "SkLiteRecorder.h"
202
203 SkPictureRecorder_Lite:: SkPictureRecorder_Lite() : fRecorder(new SkLiteRecorder ) {}
204 SkPictureRecorder_Lite::~SkPictureRecorder_Lite() {}
205
206 SkCanvas* SkPictureRecorder_Lite::beginRecording(const SkRect& bounds) {
207 fDL = SkLiteDL::New(bounds);
208 fRecorder->reset(fDL.get());
209 return this->getRecordingCanvas();
210 }
211
212 SkCanvas* SkPictureRecorder_Lite::getRecordingCanvas() {
213 return fDL ? fRecorder.get() : nullptr;
214 }
215
216 sk_sp<SkDrawable> SkPictureRecorder_Lite::finishRecordingAsDrawable(uint32_t) {
217 if (fGrContextToOptimizeFor) {
218 fDL->optimizeFor(fGrContextToOptimizeFor);
219 }
220 return std::move(fDL);
221 }
OLDNEW
« no previous file with comments | « include/core/SkPictureRecorder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698