Clean up SK_PICTURE_USE_SK_RECORD and SK_PICTURE_OPTIMIZE_SK_RECORD.

This folds the code through as if they were defined, which is the explicit
state in both our build and Chrome's.

This leaves the EXPERIMENTAL_ and DEPRECATED_ hooks in to be cleaned up or
privatized later.

CQ_EXTRA_TRYBOTS=tryserver.skia:Canary-Chrome-Ubuntu13.10-Ninja-x86_64-ToT-Trybot

BUG=skia:
R=reed@google.com, robertphillips@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/616033002
This commit is contained in:
mtklein 2014-09-30 11:43:53 -07:00 committed by Commit bot
parent b5a97154f8
commit 8de02f4bf3
4 changed files with 4 additions and 14 deletions

View File

@ -6,8 +6,6 @@
'SK_SUPPORT_GPU=<(skia_gpu)',
'SK_SUPPORT_OPENCL=<(skia_opencl)',
'SK_FORCE_DISTANCEFIELD_FONTS=<(skia_force_distancefield_fonts)',
'SK_PICTURE_USE_SK_RECORD',
'SK_PICTURE_OPTIMIZE_SK_RECORD',
],
'conditions' : [
['skia_pic', {

View File

@ -49,9 +49,7 @@ public:
uint32_t recordFlags = 0);
// As usual, we have a deprecated old version and a maybe almost working
// new version. We currently point beginRecording() to
// DEPRECATED_beginRecording() unless SK_PICTURE_USE_SK_RECORD is defined,
// then we use EXPERIMENTAL_beginRecording().
// new version. We currently point beginRecording() to EXPERIMENTAL_beginRecording().
// Old slower backend.
SkCanvas* DEPRECATED_beginRecording(SkScalar width, SkScalar height,

View File

@ -631,9 +631,7 @@ uint32_t SkPicture::uniqueID() const {
static SkRecord* optimized(SkRecord* r) {
#ifdef SK_PICTURE_OPTIMIZE_SK_RECORD
SkRecordOptimize(r);
#endif
return r;
}

View File

@ -20,11 +20,7 @@ SkPictureRecorder::~SkPictureRecorder() {}
SkCanvas* SkPictureRecorder::beginRecording(SkScalar width, SkScalar height,
SkBBHFactory* bbhFactory /* = NULL */,
uint32_t recordFlags /* = 0 */) {
#ifdef SK_PICTURE_USE_SK_RECORD
return EXPERIMENTAL_beginRecording(width, height, bbhFactory);
#else
return DEPRECATED_beginRecording(width, height, bbhFactory, recordFlags);
#endif
}
SkCanvas* SkPictureRecorder::DEPRECATED_beginRecording(SkScalar width, SkScalar height,
@ -75,14 +71,14 @@ SkPicture* SkPictureRecorder::endRecording() {
SkPicture* picture = NULL;
if (fRecord.get()) {
picture = SkNEW_ARGS(SkPicture, (fCullWidth, fCullHeight,
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,
picture = SkNEW_ARGS(SkPicture, (fCullWidth, fCullHeight,
*fPictureRecord.get(), deepCopyOps));
}
@ -106,7 +102,7 @@ void SkPictureRecorder::partialReplay(SkCanvas* canvas) const {
if (fPictureRecord.get()) {
const bool deepCopyOps = true;
SkPicture picture(fCullWidth, fCullHeight,
SkPicture picture(fCullWidth, fCullHeight,
*fPictureRecord.get(), deepCopyOps);
picture.playback(canvas);
}