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

Unified Diff: src/core/SkPictureRecorder.cpp

Issue 618303002: Remove DEPRECATED_beginRecording(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix up benches Created 6 years, 3 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 | « src/core/SkPictureRecord.cpp ('k') | tests/CanvasTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureRecorder.cpp
diff --git a/src/core/SkPictureRecorder.cpp b/src/core/SkPictureRecorder.cpp
index 81c39e36f0a44890b452f8d532f3e4fbc67dc530..9ae5c214847315616a71b05a3574bc73b3e9ac65 100644
--- a/src/core/SkPictureRecorder.cpp
+++ b/src/core/SkPictureRecorder.cpp
@@ -5,7 +5,6 @@
* found in the LICENSE file.
*/
-#include "SkPictureRecord.h"
#include "SkPictureRecorder.h"
#include "SkRecord.h"
#include "SkRecordDraw.h"
@@ -19,24 +18,6 @@ SkPictureRecorder::~SkPictureRecorder() {}
SkCanvas* SkPictureRecorder::beginRecording(SkScalar width, SkScalar height,
SkBBHFactory* bbhFactory /* = NULL */,
uint32_t recordFlags /* = 0 */) {
- return EXPERIMENTAL_beginRecording(width, height, bbhFactory);
-}
-
-SkCanvas* SkPictureRecorder::DEPRECATED_beginRecording(SkScalar width, SkScalar height,
- SkBBHFactory* bbhFactory /* = NULL */,
- uint32_t recordFlags /* = 0 */) {
- SkASSERT(!bbhFactory); // No longer suppported with this backend.
-
- fCullWidth = width;
- fCullHeight = height;
- fPictureRecord.reset(SkNEW_ARGS(SkPictureRecord, (SkISize::Make(width, height), recordFlags)));
-
- fPictureRecord->beginRecording();
- return this->getRecordingCanvas();
-}
-
-SkCanvas* SkPictureRecorder::EXPERIMENTAL_beginRecording(SkScalar width, SkScalar height,
- SkBBHFactory* bbhFactory /* = NULL */) {
fCullWidth = width;
fCullHeight = height;
@@ -51,43 +32,16 @@ SkCanvas* SkPictureRecorder::EXPERIMENTAL_beginRecording(SkScalar width, SkScala
}
SkCanvas* SkPictureRecorder::getRecordingCanvas() {
- if (fRecorder.get()) {
- return fRecorder.get();
- }
- return fPictureRecord.get();
+ return fRecorder.get();
}
SkPicture* SkPictureRecorder::endRecording() {
- SkPicture* picture = NULL;
-
- if (fRecord.get()) {
- picture = SkNEW_ARGS(SkPicture, (fCullWidth, fCullHeight,
- fRecord.detach(), fBBH.get()));
- }
-
- if (fPictureRecord.get()) {
- fPictureRecord->endRecording();
- const bool deepCopyOps = false;
- picture = SkNEW_ARGS(SkPicture, (fCullWidth, fCullHeight,
- *fPictureRecord.get(), deepCopyOps));
- }
-
- return picture;
+ return SkNEW_ARGS(SkPicture, (fCullWidth, fCullHeight, fRecord.detach(), fBBH.get()));
}
void SkPictureRecorder::partialReplay(SkCanvas* canvas) const {
if (NULL == canvas) {
return;
}
-
- if (fRecord.get()) {
- SkRecordDraw(*fRecord, canvas, NULL/*bbh*/, NULL/*callback*/);
- }
-
- if (fPictureRecord.get()) {
- const bool deepCopyOps = true;
- SkPicture picture(fCullWidth, fCullHeight,
- *fPictureRecord.get(), deepCopyOps);
- picture.playback(canvas);
- }
+ SkRecordDraw(*fRecord, canvas, NULL/*bbh*/, NULL/*callback*/);
}
« no previous file with comments | « src/core/SkPictureRecord.cpp ('k') | tests/CanvasTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698