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
- // DEPRECATED_beginRecording() unless SK_PICTURE_USE_SK_RECORD is defined,
- // then we use 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).
*/
*/
SkPicture* endRecording();
- /** Enable/disable all the picture recording optimizations (i.e.,
- those in SkPictureRecord). It is mainly intended for testing the
- existing optimizations (i.e., to actually have the pattern
- appear in an .skp we have to disable the optimization). Call right
- after 'beginRecording'.
- */
- void internalOnly_EnableOpts(bool enableOpts);
-
private:
void reset();
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;
};