| Index: include/core/SkPictureRecorder.h
|
| diff --git a/include/core/SkPictureRecorder.h b/include/core/SkPictureRecorder.h
|
| index bd8614813b37a3bf57cf07dfdff9677c16d76607..a3f7d483325143e9ef51bff4ae85e3c9a9747f74 100644
|
| --- a/include/core/SkPictureRecorder.h
|
| +++ b/include/core/SkPictureRecorder.h
|
| @@ -28,16 +28,23 @@ public:
|
| SkPictureRecorder();
|
| ~SkPictureRecorder();
|
|
|
| +#ifdef SK_LEGACY_PICTURE_SIZE_API
|
| + SkCanvas* beginRecording(int width, int height,
|
| + SkBBHFactory* bbhFactory = NULL,
|
| + uint32_t recordFlags = 0) {
|
| + return this->beginRecording(SkIntToScalar(width), SkIntToScalar(height),
|
| + bbhFactory, recordFlags);
|
| + }
|
| +#endif
|
| +
|
| /** Returns the canvas that records the drawing commands.
|
| - @param width the base width for the picture, as if the recording
|
| - canvas' bitmap had this width.
|
| - @param height the base width for the picture, as if the recording
|
| - canvas' bitmap had this height.
|
| + @param width the width of the cull rect used when recording this picture.
|
| + @param height the height of the cull rect used when recording this picture.
|
| @param bbhFactory factory to create desired acceleration structure
|
| @param recordFlags optional flags that control recording.
|
| @return the canvas.
|
| */
|
| - SkCanvas* beginRecording(int width, int height,
|
| + SkCanvas* beginRecording(SkScalar width, SkScalar height,
|
| SkBBHFactory* bbhFactory = NULL,
|
| uint32_t recordFlags = 0);
|
|
|
| @@ -47,12 +54,12 @@ public:
|
| // then we use EXPERIMENTAL_beginRecording().
|
|
|
| // Old slower backend.
|
| - SkCanvas* DEPRECATED_beginRecording(int width, int height,
|
| + SkCanvas* DEPRECATED_beginRecording(SkScalar width, SkScalar height,
|
| SkBBHFactory* bbhFactory = NULL,
|
| uint32_t recordFlags = 0);
|
|
|
| // New faster backend.
|
| - SkCanvas* EXPERIMENTAL_beginRecording(int width, int height,
|
| + SkCanvas* EXPERIMENTAL_beginRecording(SkScalar width, SkScalar height,
|
| SkBBHFactory* bbhFactory = NULL);
|
|
|
| /** Returns the recording canvas if one is active, or NULL if recording is
|
| @@ -87,9 +94,8 @@ private:
|
| friend class SkPictureRecorderReplayTester; // for unit testing
|
| void partialReplay(SkCanvas* canvas) const;
|
|
|
| - int fWidth;
|
| - int fHeight;
|
| -
|
| + SkScalar fCullWidth;
|
| + SkScalar fCullHeight;
|
| SkAutoTUnref<SkBBoxHierarchy> fBBH;
|
|
|
| // One of these two canvases will be non-NULL.
|
|
|