| OLD | NEW |
| 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 Loading... |
| 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<SkDashPathEffect> dash(SkDashPathEffect::Create(intervals,
2, 0)); | 149 SkAutoTUnref<SkPathEffect> 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 Loading... |
| 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 } |
| OLD | NEW |