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

Unified Diff: tests/SerializationTest.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
Index: tests/SerializationTest.cpp
===================================================================
--- tests/SerializationTest.cpp (revision 14159)
+++ tests/SerializationTest.cpp (working copy)
@@ -369,11 +369,10 @@
// Test simple SkPicture serialization
{
- SkPicture* pict = new SkPicture;
- SkAutoUnref aur(pict);
- bool didDraw = drawSomething(pict->beginRecording(kBitmapSize, kBitmapSize));
+ SkPictureRecorder recorder;
+ bool didDraw = drawSomething(recorder.beginRecording(kBitmapSize, kBitmapSize));
REPORTER_ASSERT(reporter, didDraw);
- pict->endRecording();
+ SkAutoTUnref<SkPicture> pict(recorder.endRecording());
// Serialize picture
SkWriteBuffer writer(SkWriteBuffer::kValidation_Flag);
« samplecode/SampleTiling.cpp ('K') | « tests/PictureTest.cpp ('k') | tests/TileGridTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698