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

Side by Side Diff: tests/GpuDrawPathTest.cpp

Issue 1454223002: Unit test for conic weight GrPath key collision (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: moar rebase 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
11 11
12 #include "GrContext.h" 12 #include "GrContext.h"
13 #include "GrContextFactory.h" 13 #include "GrContextFactory.h"
14 #include "GrPath.h"
15 #include "GrStrokeInfo.h"
14 #include "SkBitmap.h" 16 #include "SkBitmap.h"
15 #include "SkCanvas.h" 17 #include "SkCanvas.h"
16 #include "SkColor.h" 18 #include "SkColor.h"
17 #include "SkPaint.h" 19 #include "SkPaint.h"
18 #include "SkPath.h" 20 #include "SkPath.h"
19 #include "SkDashPathEffect.h" 21 #include "SkDashPathEffect.h"
20 #include "SkRRect.h" 22 #include "SkRRect.h"
21 #include "SkRect.h" 23 #include "SkRect.h"
22 #include "SkSurface.h" 24 #include "SkSurface.h"
23 #include "Test.h" 25 #include "Test.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 if (!grContext) { 105 if (!grContext) {
104 return; 106 return;
105 } 107 }
106 108
107 SkAutoTUnref<SkSurface> surface( 109 SkAutoTUnref<SkSurface> surface(
108 SkSurface::NewRenderTarget(grContext, SkSurface::kNo_Budgeted, 110 SkSurface::NewRenderTarget(grContext, SkSurface::kNo_Budgeted,
109 SkImageInfo::MakeN32Premul(255, 255), 4)); 111 SkImageInfo::MakeN32Premul(255, 255), 4));
110 test_drawSameRectOvals(reporter, surface->getCanvas()); 112 test_drawSameRectOvals(reporter, surface->getCanvas());
111 } 113 }
112 114
115 DEF_TEST(GrPathKeys, reporter) {
116 // Keys should not ignore conic weights.
117 SkPath path1, path2;
118 path1.setIsVolatile(true);
119 path2.setIsVolatile(true);
120 SkPoint p0 = SkPoint::Make(100, 0);
121 SkPoint p1 = SkPoint::Make(100, 100);
122
123 path1.conicTo(p0, p1, .5f);
124 path2.conicTo(p0, p1, .7f);
125
126 bool isVolatile;
127 GrUniqueKey key1, key2;
128 GrStrokeInfo stroke(SkStrokeRec::kFill_InitStyle);
129 GrPath::ComputeKey(path1, stroke, &key1, &isVolatile);
130 GrPath::ComputeKey(path2, stroke, &key2, &isVolatile);
131
132 // https://bugs.chromium.org/p/skia/issues/detail?id=4580
133 // REPORTER_ASSERT(reporter, key1 != key2);
134 }
135
113 #endif 136 #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