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

Unified Diff: src/core/SkPictureRecorder.cpp

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 | « src/core/SkPictureData.h ('k') | src/core/SkPictureShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureRecorder.cpp
diff --git a/src/core/SkPictureRecorder.cpp b/src/core/SkPictureRecorder.cpp
index d90f8852f8f3c9a55bb63a4f7ec42a15761ed662..fadb937110750b55080a99ddca97c770f0c93c7c 100644
--- a/src/core/SkPictureRecorder.cpp
+++ b/src/core/SkPictureRecorder.cpp
@@ -17,7 +17,7 @@ SkPictureRecorder::SkPictureRecorder() {}
SkPictureRecorder::~SkPictureRecorder() {}
-SkCanvas* SkPictureRecorder::beginRecording(int width, int height,
+SkCanvas* SkPictureRecorder::beginRecording(SkScalar width, SkScalar height,
SkBBHFactory* bbhFactory /* = NULL */,
uint32_t recordFlags /* = 0 */) {
#ifdef SK_PICTURE_USE_SK_RECORD
@@ -27,11 +27,11 @@ SkCanvas* SkPictureRecorder::beginRecording(int width, int height,
#endif
}
-SkCanvas* SkPictureRecorder::DEPRECATED_beginRecording(int width, int height,
+SkCanvas* SkPictureRecorder::DEPRECATED_beginRecording(SkScalar width, SkScalar height,
SkBBHFactory* bbhFactory /* = NULL */,
uint32_t recordFlags /* = 0 */) {
- fWidth = width;
- fHeight = height;
+ fCullWidth = width;
+ fCullHeight = height;
const SkISize size = SkISize::Make(width, height);
@@ -49,10 +49,10 @@ SkCanvas* SkPictureRecorder::DEPRECATED_beginRecording(int width, int height,
return this->getRecordingCanvas();
}
-SkCanvas* SkPictureRecorder::EXPERIMENTAL_beginRecording(int width, int height,
+SkCanvas* SkPictureRecorder::EXPERIMENTAL_beginRecording(SkScalar width, SkScalar height,
SkBBHFactory* bbhFactory /* = NULL */) {
- fWidth = width;
- fHeight = height;
+ fCullWidth = width;
+ fCullHeight = height;
if (NULL != bbhFactory) {
fBBH.reset((*bbhFactory)(width, height));
@@ -75,13 +75,15 @@ SkPicture* SkPictureRecorder::endRecording() {
SkPicture* picture = NULL;
if (NULL != fRecord.get()) {
- picture = SkNEW_ARGS(SkPicture, (fWidth, fHeight, fRecord.detach(), fBBH.get()));
+ picture = SkNEW_ARGS(SkPicture, (fCullWidth, fCullHeight,
+ fRecord.detach(), fBBH.get()));
}
if (NULL != fPictureRecord.get()) {
fPictureRecord->endRecording();
const bool deepCopyOps = false;
- picture = SkNEW_ARGS(SkPicture, (fWidth, fHeight, *fPictureRecord.get(), deepCopyOps));
+ picture = SkNEW_ARGS(SkPicture, (fCullWidth, fCullHeight,
+ *fPictureRecord.get(), deepCopyOps));
}
return picture;
@@ -104,7 +106,8 @@ void SkPictureRecorder::partialReplay(SkCanvas* canvas) const {
if (NULL != fPictureRecord.get()) {
const bool deepCopyOps = true;
- SkPicture picture(fWidth, fHeight, *fPictureRecord.get(), deepCopyOps);
+ SkPicture picture(fCullWidth, fCullHeight,
+ *fPictureRecord.get(), deepCopyOps);
picture.draw(canvas);
}
}
« no previous file with comments | « src/core/SkPictureData.h ('k') | src/core/SkPictureShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698