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

Unified Diff: src/core/SkPicture.cpp

Issue 168983003: change PictureRecord (and its private subclasses) to take size instead of device (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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/SkBBoxRecord.h ('k') | src/core/SkPictureRecord.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPicture.cpp
diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp
index 7762939c5d512a22b15e2e130086867f0f325e2b..b9b2442ecd9b3b0ef47f7ae4e365c862fa0f7bd3 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -193,21 +193,19 @@ SkCanvas* SkPicture::beginRecording(int width, int height,
SkSafeSetNull(fRecord);
- SkBitmap bm;
- bm.setConfig(SkBitmap::kNo_Config, width, height);
- SkAutoTUnref<SkBaseDevice> dev(SkNEW_ARGS(SkBitmapDevice, (bm)));
-
// Must be set before calling createBBoxHierarchy
fWidth = width;
fHeight = height;
+ const SkISize size = SkISize::Make(width, height);
+
if (recordingFlags & kOptimizeForClippedPlayback_RecordingFlag) {
SkBBoxHierarchy* tree = this->createBBoxHierarchy();
SkASSERT(NULL != tree);
- fRecord = SkNEW_ARGS(SkBBoxHierarchyRecord, (recordingFlags, tree, dev));
+ fRecord = SkNEW_ARGS(SkBBoxHierarchyRecord, (size, recordingFlags, tree));
tree->unref();
} else {
- fRecord = SkNEW_ARGS(SkPictureRecord, (recordingFlags, dev));
+ fRecord = SkNEW_ARGS(SkPictureRecord, (size, recordingFlags));
}
fRecord->beginRecording();
« no previous file with comments | « src/core/SkBBoxRecord.h ('k') | src/core/SkPictureRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698