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

Unified Diff: dm/DMUtil.cpp

Issue 214953003: split SkPictureRecorder out of SkPicture (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: update to ToT (again) Created 6 years, 8 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 | « dm/DMUtil.h ('k') | gm/distantclip.cpp » ('j') | samplecode/SampleTiling.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMUtil.cpp
===================================================================
--- dm/DMUtil.cpp (revision 14159)
+++ dm/DMUtil.cpp (working copy)
@@ -10,13 +10,14 @@
return s;
}
-void RecordPicture(skiagm::GM* gm, SkPicture* picture, uint32_t recordFlags) {
+SkPicture* RecordPicture(skiagm::GM* gm, uint32_t recordFlags, SkPictureFactory* factory) {
const SkISize size = gm->getISize();
- SkCanvas* canvas = picture->beginRecording(size.width(), size.height(), recordFlags);
+ SkPictureRecorder recorder(factory);
+ SkCanvas* canvas = recorder.beginRecording(size.width(), size.height(), recordFlags);
canvas->concat(gm->getInitialTransform());
gm->draw(canvas);
canvas->flush();
- picture->endRecording();
+ return recorder.endRecording();
}
static void setup_bitmap(SkColorType ct, int width, int height, SkBitmap* bitmap) {
« no previous file with comments | « dm/DMUtil.h ('k') | gm/distantclip.cpp » ('j') | samplecode/SampleTiling.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698