aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2014-10-01 09:29:35 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-01 09:29:35 -0700
commit8e12656096fceeed8b3cc4284d57dea04893b455 (patch)
tree43b0ae13764b93af263e01d89d269c7bfec84370 /include
parent23cd4d2d1adecff9c88fa06b7a0a74d52c11fc75 (diff)
Remove DEPRECATED_beginRecording().
This removes: 1) ability to record old pictures with SkPictureRecorder; 2) a couple tests specific to the old backend. The functionality of DEPRECATED_beginRecording() now lives in (private) SkPicture::Backport(), which is the only place we need it now. BUG=skia: TBR=reed@google.com Review URL: https://codereview.chromium.org/618303002
Diffstat (limited to 'include')
-rw-r--r--include/core/SkPicture.h4
-rw-r--r--include/core/SkPictureRecorder.h21
2 files changed, 5 insertions, 20 deletions
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index c23c5fa2fb..ddf4551c67 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -272,7 +272,7 @@ private:
void createHeader(SkPictInfo* info) const;
static bool IsValidPictInfo(const SkPictInfo& info);
- friend class SkPictureRecorder; // just for SkPicture-based constructor
+ friend class SkPictureRecorder; // SkRecord-based constructor.
friend class SkGpuDevice; // for fData access
friend class GrLayerHoister; // access to fRecord
friend class CollectLayers; // access to fRecord
@@ -285,6 +285,8 @@ private:
SkPicture(SkScalar width, SkScalar height, SkRecord*, SkBBoxHierarchy*);
// Return as a new SkPicture that's backed by SkRecord.
static SkPicture* Forwardport(const SkPicture&);
+ // Return as a new SkPicture that's backed by the old backend.
+ static SkPicture* Backport(const SkRecord& src, const SkRect& cullRect);
SkAutoTDelete<SkRecord> fRecord;
SkAutoTUnref<SkBBoxHierarchy> fBBH;
diff --git a/include/core/SkPictureRecorder.h b/include/core/SkPictureRecorder.h
index 8f3afb3a76..c48f35de6d 100644
--- a/include/core/SkPictureRecorder.h
+++ b/include/core/SkPictureRecorder.h
@@ -48,18 +48,6 @@ public:
SkBBHFactory* bbhFactory = NULL,
uint32_t recordFlags = 0);
- // As usual, we have a deprecated old version and a maybe almost working
- // new version. We currently point beginRecording() to EXPERIMENTAL_beginRecording().
-
- // Old slower backend.
- SkCanvas* DEPRECATED_beginRecording(SkScalar width, SkScalar height,
- SkBBHFactory* bbhFactory = NULL,
- uint32_t recordFlags = 0);
-
- // New faster backend.
- SkCanvas* EXPERIMENTAL_beginRecording(SkScalar width, SkScalar height,
- SkBBHFactory* bbhFactory = NULL);
-
/** Returns the recording canvas if one is active, or NULL if recording is
not active. This does not alter the refcnt on the canvas (if present).
*/
@@ -87,13 +75,8 @@ private:
SkScalar fCullWidth;
SkScalar fCullHeight;
SkAutoTUnref<SkBBoxHierarchy> fBBH;
-
- // One of these two canvases will be non-NULL.
- SkAutoTUnref<SkPictureRecord> fPictureRecord; // beginRecording()
- SkAutoTUnref<SkRecorder> fRecorder; // EXPERIMENTAL_beginRecording()
-
- // Used by EXPERIMENTAL_beginRecording().
- SkAutoTDelete<SkRecord> fRecord;
+ SkAutoTUnref<SkRecorder> fRecorder;
+ SkAutoTDelete<SkRecord> fRecord;
typedef SkNoncopyable INHERITED;
};