| 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*/);
|
| }
|
|
|