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

Side by Side Diff: tests/PictureTest.cpp

Issue 1780933003: Use std::unique_ptr. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: once more, all together Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « tests/ImageTest.cpp ('k') | tests/ResourceCacheTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBBoxHierarchy.h" 8 #include "SkBBoxHierarchy.h"
9 #include "SkBlurImageFilter.h" 9 #include "SkBlurImageFilter.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 SkCanvas* c = recorder.beginRecording(SkRect::MakeLTRB(1, 2, 3, 4)); 1401 SkCanvas* c = recorder.beginRecording(SkRect::MakeLTRB(1, 2, 3, 4));
1402 c->clear(SK_ColorCYAN); 1402 c->clear(SK_ColorCYAN);
1403 1403
1404 SkAutoTUnref<SkPicture> picture(recorder.endRecording()); 1404 SkAutoTUnref<SkPicture> picture(recorder.endRecording());
1405 SkDynamicMemoryWStream wstream; 1405 SkDynamicMemoryWStream wstream;
1406 picture->serialize(&wstream); 1406 picture->serialize(&wstream);
1407 1407
1408 SkAutoTDelete<SkStream> rstream(wstream.detachAsStream()); 1408 SkAutoTDelete<SkStream> rstream(wstream.detachAsStream());
1409 SkAutoTUnref<SkPicture> deserializedPicture(SkPicture::CreateFromStream(rstr eam)); 1409 SkAutoTUnref<SkPicture> deserializedPicture(SkPicture::CreateFromStream(rstr eam));
1410 1410
1411 REPORTER_ASSERT(r, SkToBool(deserializedPicture)); 1411 REPORTER_ASSERT(r, deserializedPicture != nullptr);
1412 REPORTER_ASSERT(r, deserializedPicture->cullRect().left() == 1); 1412 REPORTER_ASSERT(r, deserializedPicture->cullRect().left() == 1);
1413 REPORTER_ASSERT(r, deserializedPicture->cullRect().top() == 2); 1413 REPORTER_ASSERT(r, deserializedPicture->cullRect().top() == 2);
1414 REPORTER_ASSERT(r, deserializedPicture->cullRect().right() == 3); 1414 REPORTER_ASSERT(r, deserializedPicture->cullRect().right() == 3);
1415 REPORTER_ASSERT(r, deserializedPicture->cullRect().bottom() == 4); 1415 REPORTER_ASSERT(r, deserializedPicture->cullRect().bottom() == 4);
1416 } 1416 }
OLDNEW
« no previous file with comments | « tests/ImageTest.cpp ('k') | tests/ResourceCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698