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

Side by Side Diff: tests/GpuDrawPathTest.cpp

Issue 1869503002: Make existing unit tests only run on GL contexts (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 4 years, 8 months 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/GpuColorFilterTest.cpp ('k') | tests/GpuLayerCacheTest.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 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 const SkRect rect = SkRect::MakeWH(100, 50); 69 const SkRect rect = SkRect::MakeWH(100, 50);
70 oval1.addOval(rect, SkPath::kCW_Direction); 70 oval1.addOval(rect, SkPath::kCW_Direction);
71 oval2.addOval(rect, SkPath::kCCW_Direction); 71 oval2.addOval(rect, SkPath::kCCW_Direction);
72 72
73 fill_and_stroke(canvas, oval1, oval2, nullptr); 73 fill_and_stroke(canvas, oval1, oval2, nullptr);
74 74
75 const SkScalar intervals[] = { 1, 1 }; 75 const SkScalar intervals[] = { 1, 1 };
76 fill_and_stroke(canvas, oval1, oval2, SkDashPathEffect::Make(intervals, 2, 0 )); 76 fill_and_stroke(canvas, oval1, oval2, SkDashPathEffect::Make(intervals, 2, 0 ));
77 } 77 }
78 78
79 DEF_GPUTEST_FOR_ALL_CONTEXTS(GpuDrawPath, reporter, ctxInfo) { 79 DEF_GPUTEST_FOR_ALL_GL_CONTEXTS(GpuDrawPath, reporter, ctxInfo) {
80 for (auto& test_func : { &test_drawPathEmpty, &test_drawSameRectOvals }) { 80 for (auto& test_func : { &test_drawPathEmpty, &test_drawSameRectOvals }) {
81 for (auto& sampleCount : {0, 4, 16}) { 81 for (auto& sampleCount : {0, 4, 16}) {
82 SkImageInfo info = SkImageInfo::MakeN32Premul(255, 255); 82 SkImageInfo info = SkImageInfo::MakeN32Premul(255, 255);
83 auto surface( 83 auto surface(
84 SkSurface::MakeRenderTarget(ctxInfo.fGrContext, SkBudgeted::kNo, info, sampleCount, 84 SkSurface::MakeRenderTarget(ctxInfo.fGrContext, SkBudgeted::kNo, info, sampleCount,
85 nullptr)); 85 nullptr));
86 if (!surface) { 86 if (!surface) {
87 continue; 87 continue;
88 } 88 }
89 test_func(reporter, surface->getCanvas()); 89 test_func(reporter, surface->getCanvas());
(...skipping 14 matching lines...) Expand all
104 104
105 bool isVolatile; 105 bool isVolatile;
106 GrUniqueKey key1, key2; 106 GrUniqueKey key1, key2;
107 GrStrokeInfo stroke(SkStrokeRec::kFill_InitStyle); 107 GrStrokeInfo stroke(SkStrokeRec::kFill_InitStyle);
108 GrPath::ComputeKey(path1, stroke, &key1, &isVolatile); 108 GrPath::ComputeKey(path1, stroke, &key1, &isVolatile);
109 GrPath::ComputeKey(path2, stroke, &key2, &isVolatile); 109 GrPath::ComputeKey(path2, stroke, &key2, &isVolatile);
110 REPORTER_ASSERT(reporter, key1 != key2); 110 REPORTER_ASSERT(reporter, key1 != key2);
111 } 111 }
112 112
113 #endif 113 #endif
OLDNEW
« no previous file with comments | « tests/GpuColorFilterTest.cpp ('k') | tests/GpuLayerCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698