Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: include/core/SkPictureRecorder.h

Issue 513983002: Try out scalar picture sizes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT again Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkPicture.h ('k') | samplecode/SampleFilterFuzz.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « include/core/SkPicture.h ('k') | samplecode/SampleFilterFuzz.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698