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

Side by Side Diff: tests/PictureTest.cpp

Issue 1782973002: Revert of Use std::unique_ptr. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/ClearTest.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 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1402 SkCanvas* c = recorder.beginRecording(SkRect::MakeLTRB(1, 2, 3, 4)); 1402 SkCanvas* c = recorder.beginRecording(SkRect::MakeLTRB(1, 2, 3, 4));
1403 c->clear(SK_ColorCYAN); 1403 c->clear(SK_ColorCYAN);
1404 1404
1405 SkAutoTUnref<SkPicture> picture(recorder.endRecording()); 1405 SkAutoTUnref<SkPicture> picture(recorder.endRecording());
1406 SkDynamicMemoryWStream wstream; 1406 SkDynamicMemoryWStream wstream;
1407 picture->serialize(&wstream); 1407 picture->serialize(&wstream);
1408 1408
1409 SkAutoTDelete<SkStream> rstream(wstream.detachAsStream()); 1409 SkAutoTDelete<SkStream> rstream(wstream.detachAsStream());
1410 SkAutoTUnref<SkPicture> deserializedPicture(SkPicture::CreateFromStream(rstr eam)); 1410 SkAutoTUnref<SkPicture> deserializedPicture(SkPicture::CreateFromStream(rstr eam));
1411 1411
1412 REPORTER_ASSERT(r, deserializedPicture != nullptr); 1412 REPORTER_ASSERT(r, SkToBool(deserializedPicture));
1413 REPORTER_ASSERT(r, deserializedPicture->cullRect().left() == 1); 1413 REPORTER_ASSERT(r, deserializedPicture->cullRect().left() == 1);
1414 REPORTER_ASSERT(r, deserializedPicture->cullRect().top() == 2); 1414 REPORTER_ASSERT(r, deserializedPicture->cullRect().top() == 2);
1415 REPORTER_ASSERT(r, deserializedPicture->cullRect().right() == 3); 1415 REPORTER_ASSERT(r, deserializedPicture->cullRect().right() == 3);
1416 REPORTER_ASSERT(r, deserializedPicture->cullRect().bottom() == 4); 1416 REPORTER_ASSERT(r, deserializedPicture->cullRect().bottom() == 4);
1417 } 1417 }
OLDNEW
« no previous file with comments | « tests/ClearTest.cpp ('k') | tests/ResourceCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698