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

Side by Side Diff: tests/GpuDrawPathTest.cpp

Issue 1463493002: Fix GpuDrawPathTest on ANGLE and enable it (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | no next file » | 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 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" 8 #include "SkTypes.h"
9 9
10 #if SK_SUPPORT_GPU 10 #if SK_SUPPORT_GPU
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 oval2.addOval(rect, SkPath::kCCW_Direction); 68 oval2.addOval(rect, SkPath::kCCW_Direction);
69 69
70 fill_and_stroke(canvas, oval1, oval2, nullptr); 70 fill_and_stroke(canvas, oval1, oval2, nullptr);
71 71
72 const SkScalar intervals[] = { 1, 1 }; 72 const SkScalar intervals[] = { 1, 1 };
73 SkAutoTUnref<SkPathEffect> dashEffect(SkDashPathEffect::Create(intervals, 2, 0)); 73 SkAutoTUnref<SkPathEffect> dashEffect(SkDashPathEffect::Create(intervals, 2, 0));
74 fill_and_stroke(canvas, oval1, oval2, dashEffect); 74 fill_and_stroke(canvas, oval1, oval2, dashEffect);
75 } 75 }
76 76
77 DEF_GPUTEST(GpuDrawPath, reporter, factory) { 77 DEF_GPUTEST(GpuDrawPath, reporter, factory) {
78 // https://bugs.chromium.org/p/skia/issues/detail?id=4581
79 return;
80
81 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { 78 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) {
82 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G LContextType>(type); 79 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G LContextType>(type);
83 80
84 GrContext* grContext = factory->get(glType); 81 GrContext* grContext = factory->get(glType);
85 if (nullptr == grContext) { 82 if (nullptr == grContext) {
86 continue; 83 continue;
87 } 84 }
88 static const int sampleCounts[] = { 0, 4, 16 }; 85 static const int sampleCounts[] = { 0, 4, 16 };
89 86
90 for (size_t i = 0; i < SK_ARRAY_COUNT(sampleCounts); ++i) { 87 for (size_t i = 0; i < SK_ARRAY_COUNT(sampleCounts); ++i) {
91 SkImageInfo info = SkImageInfo::MakeN32Premul(255, 255); 88 SkImageInfo info = SkImageInfo::MakeN32Premul(255, 255);
92 89
93 SkAutoTUnref<SkSurface> surface( 90 SkAutoTUnref<SkSurface> surface(
94 SkSurface::NewRenderTarget(grContext, SkSurface::kNo_Budgeted, i nfo, 91 SkSurface::NewRenderTarget(grContext, SkSurface::kNo_Budgeted, i nfo,
95 sampleCounts[i], nullptr)); 92 sampleCounts[i], nullptr));
93 if (!surface) {
94 continue;
95 }
96 test_drawPathEmpty(reporter, surface->getCanvas()); 96 test_drawPathEmpty(reporter, surface->getCanvas());
97 } 97 }
98 } 98 }
99 } 99 }
100 100
101 DEF_GPUTEST(GpuDrawPathSameRectOvals, reporter, factory) { 101 DEF_GPUTEST(GpuDrawPathSameRectOvals, reporter, factory) {
102 GrContext* grContext = factory->get(GrContextFactory::kNVPR_GLContextType); 102 GrContext* grContext = factory->get(GrContextFactory::kNVPR_GLContextType);
103 if (!grContext) { 103 if (!grContext) {
104 return; 104 return;
105 } 105 }
106 106
107 SkAutoTUnref<SkSurface> surface( 107 SkAutoTUnref<SkSurface> surface(
108 SkSurface::NewRenderTarget(grContext, SkSurface::kNo_Budgeted, 108 SkSurface::NewRenderTarget(grContext, SkSurface::kNo_Budgeted,
109 SkImageInfo::MakeN32Premul(255, 255), 4)); 109 SkImageInfo::MakeN32Premul(255, 255), 4));
110 test_drawSameRectOvals(reporter, surface->getCanvas()); 110 test_drawSameRectOvals(reporter, surface->getCanvas());
111 } 111 }
112 112
113 #endif 113 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698