OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #if SK_SUPPORT_GPU | 8 #if SK_SUPPORT_GPU |
9 | 9 |
10 #include "GrContext.h" | 10 #include "GrContext.h" |
11 #include "GrContextFactory.h" | 11 #include "GrContextFactory.h" |
12 #include "SkBitmap.h" | 12 #include "SkBitmap.h" |
13 #include "SkCanvas.h" | 13 #include "SkCanvas.h" |
14 #include "SkColor.h" | 14 #include "SkColor.h" |
15 #include "SkGpuDevice.h" | 15 #include "SkGpuDevice.h" |
16 #include "SkPaint.h" | 16 #include "SkPaint.h" |
| 17 #include "SkRRect.h" |
17 #include "SkRect.h" | 18 #include "SkRect.h" |
18 #include "SkRRect.h" | |
19 #include "Test.h" | 19 #include "Test.h" |
20 | 20 |
21 static void test_drawPathEmpty(skiatest::Reporter*, SkCanvas* canvas) { | 21 static void test_drawPathEmpty(skiatest::Reporter*, SkCanvas* canvas) { |
22 // Filling an empty path should not crash. | 22 // Filling an empty path should not crash. |
23 SkPaint paint; | 23 SkPaint paint; |
24 canvas->drawRect(SkRect(), paint); | 24 canvas->drawRect(SkRect(), paint); |
25 canvas->drawPath(SkPath(), paint); | 25 canvas->drawPath(SkPath(), paint); |
26 canvas->drawOval(SkRect(), paint); | 26 canvas->drawOval(SkRect(), paint); |
27 canvas->drawRect(SkRect(), paint); | 27 canvas->drawRect(SkRect(), paint); |
28 canvas->drawRRect(SkRRect(), paint); | 28 canvas->drawRRect(SkRRect(), paint); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 SkAutoTUnref<GrTexture> texture(grContext->createUncachedTexture(des
c, NULL, 0)); | 66 SkAutoTUnref<GrTexture> texture(grContext->createUncachedTexture(des
c, NULL, 0)); |
67 SkAutoTUnref<SkGpuDevice> device(SkNEW_ARGS(SkGpuDevice, (grContext,
texture.get()))); | 67 SkAutoTUnref<SkGpuDevice> device(SkNEW_ARGS(SkGpuDevice, (grContext,
texture.get()))); |
68 SkCanvas drawingCanvas(device.get()); | 68 SkCanvas drawingCanvas(device.get()); |
69 | 69 |
70 test_drawPathEmpty(reporter, &drawingCanvas); | 70 test_drawPathEmpty(reporter, &drawingCanvas); |
71 } | 71 } |
72 } | 72 } |
73 } | 73 } |
74 | 74 |
75 #endif | 75 #endif |
OLD | NEW |