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

Side by Side Diff: tests/PictureTest.cpp

Issue 1540203002: Revert of change all factories to return their base-class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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/DrawPathTest.cpp ('k') | tests/SerializationTest.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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 static void test_gpu_veto(skiatest::Reporter* reporter) { 139 static void test_gpu_veto(skiatest::Reporter* reporter) {
140 SkPictureRecorder recorder; 140 SkPictureRecorder recorder;
141 141
142 SkCanvas* canvas = recorder.beginRecording(100, 100); 142 SkCanvas* canvas = recorder.beginRecording(100, 100);
143 { 143 {
144 SkPath path; 144 SkPath path;
145 path.moveTo(0, 0); 145 path.moveTo(0, 0);
146 path.lineTo(50, 50); 146 path.lineTo(50, 50);
147 147
148 SkScalar intervals[] = { 1.0f, 1.0f }; 148 SkScalar intervals[] = { 1.0f, 1.0f };
149 SkAutoTUnref<SkPathEffect> dash(SkDashPathEffect::Create(intervals, 2, 0 )); 149 SkAutoTUnref<SkDashPathEffect> dash(SkDashPathEffect::Create(intervals, 2, 0));
150 150
151 SkPaint paint; 151 SkPaint paint;
152 paint.setStyle(SkPaint::kStroke_Style); 152 paint.setStyle(SkPaint::kStroke_Style);
153 paint.setPathEffect(dash); 153 paint.setPathEffect(dash);
154 154
155 for (int i = 0; i < 50; ++i) { 155 for (int i = 0; i < 50; ++i) {
156 canvas->drawPath(path, paint); 156 canvas->drawPath(path, paint);
157 } 157 }
158 } 158 }
159 SkAutoTUnref<SkPicture> picture(recorder.endRecording()); 159 SkAutoTUnref<SkPicture> picture(recorder.endRecording());
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1379 1379
1380 SkAutoTDelete<SkStream> rstream(wstream.detachAsStream()); 1380 SkAutoTDelete<SkStream> rstream(wstream.detachAsStream());
1381 SkAutoTUnref<SkPicture> deserializedPicture(SkPicture::CreateFromStream(rstr eam)); 1381 SkAutoTUnref<SkPicture> deserializedPicture(SkPicture::CreateFromStream(rstr eam));
1382 1382
1383 REPORTER_ASSERT(r, SkToBool(deserializedPicture)); 1383 REPORTER_ASSERT(r, SkToBool(deserializedPicture));
1384 REPORTER_ASSERT(r, deserializedPicture->cullRect().left() == 1); 1384 REPORTER_ASSERT(r, deserializedPicture->cullRect().left() == 1);
1385 REPORTER_ASSERT(r, deserializedPicture->cullRect().top() == 2); 1385 REPORTER_ASSERT(r, deserializedPicture->cullRect().top() == 2);
1386 REPORTER_ASSERT(r, deserializedPicture->cullRect().right() == 3); 1386 REPORTER_ASSERT(r, deserializedPicture->cullRect().right() == 3);
1387 REPORTER_ASSERT(r, deserializedPicture->cullRect().bottom() == 4); 1387 REPORTER_ASSERT(r, deserializedPicture->cullRect().bottom() == 4);
1388 } 1388 }
OLDNEW
« no previous file with comments | « tests/DrawPathTest.cpp ('k') | tests/SerializationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698