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 #include "SkTypes.h" |
| 9 |
8 #if SK_SUPPORT_GPU | 10 #if SK_SUPPORT_GPU |
9 | 11 |
10 #include "GrContext.h" | 12 #include "GrContext.h" |
11 #include "GrContextFactory.h" | 13 #include "GrContextFactory.h" |
12 #include "SkBitmap.h" | 14 #include "SkBitmap.h" |
13 #include "SkCanvas.h" | 15 #include "SkCanvas.h" |
14 #include "SkColor.h" | 16 #include "SkColor.h" |
15 #include "SkPaint.h" | 17 #include "SkPaint.h" |
16 #include "SkRRect.h" | 18 #include "SkRRect.h" |
17 #include "SkRect.h" | 19 #include "SkRect.h" |
(...skipping 23 matching lines...) Expand all Loading... |
41 } | 43 } |
42 | 44 |
43 | 45 |
44 DEF_GPUTEST(GpuDrawPath, reporter, factory) { | 46 DEF_GPUTEST(GpuDrawPath, reporter, factory) { |
45 return; | 47 return; |
46 | 48 |
47 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { | 49 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { |
48 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G
LContextType>(type); | 50 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G
LContextType>(type); |
49 | 51 |
50 GrContext* grContext = factory->get(glType); | 52 GrContext* grContext = factory->get(glType); |
51 if (NULL == grContext) { | 53 if (nullptr == grContext) { |
52 continue; | 54 continue; |
53 } | 55 } |
54 static const int sampleCounts[] = { 0, 4, 16 }; | 56 static const int sampleCounts[] = { 0, 4, 16 }; |
55 | 57 |
56 for (size_t i = 0; i < SK_ARRAY_COUNT(sampleCounts); ++i) { | 58 for (size_t i = 0; i < SK_ARRAY_COUNT(sampleCounts); ++i) { |
57 SkImageInfo info = SkImageInfo::MakeN32Premul(255, 255); | 59 SkImageInfo info = SkImageInfo::MakeN32Premul(255, 255); |
58 | 60 |
59 SkAutoTUnref<SkSurface> surface( | 61 SkAutoTUnref<SkSurface> surface( |
60 SkSurface::NewRenderTarget(grContext, SkSurface::kNo_Budgeted, i
nfo, | 62 SkSurface::NewRenderTarget(grContext, SkSurface::kNo_Budgeted, i
nfo, |
61 sampleCounts[i], NULL)); | 63 sampleCounts[i], nullptr)); |
62 test_drawPathEmpty(reporter, surface->getCanvas()); | 64 test_drawPathEmpty(reporter, surface->getCanvas()); |
63 } | 65 } |
64 } | 66 } |
65 } | 67 } |
66 | 68 |
67 #endif | 69 #endif |
OLD | NEW |