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

Side by Side Diff: src/gpu/GrOvalRenderer.cpp

Issue 2288923002: Fix stroked rrects with batching. (Closed)
Patch Set: Created 4 years, 3 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 | « 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 "GrOvalRenderer.h" 8 #include "GrOvalRenderer.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 } 1528 }
1529 1529
1530 void onPrepareDraws(Target* target) const override { 1530 void onPrepareDraws(Target* target) const override {
1531 // Invert the view matrix as a local matrix (if any other processors req uire coords). 1531 // Invert the view matrix as a local matrix (if any other processors req uire coords).
1532 SkMatrix localMatrix; 1532 SkMatrix localMatrix;
1533 if (!fViewMatrixIfUsingLocalCoords.invert(&localMatrix)) { 1533 if (!fViewMatrixIfUsingLocalCoords.invert(&localMatrix)) {
1534 return; 1534 return;
1535 } 1535 }
1536 1536
1537 // Setup geometry processor 1537 // Setup geometry processor
1538 SkAutoTUnref<GrGeometryProcessor> gp(new CircleGeometryProcessor(fAllFil l, 1538 SkAutoTUnref<GrGeometryProcessor> gp(new CircleGeometryProcessor(!fAllFi ll,
1539 false, false, 1539 false, false,
1540 false, localMatrix)); 1540 false, localMatrix));
1541 struct CircleVertex { 1541 struct CircleVertex {
1542 SkPoint fPos; 1542 SkPoint fPos;
1543 GrColor fColor; 1543 GrColor fColor;
1544 SkPoint fOffset; 1544 SkPoint fOffset;
1545 SkScalar fOuterRadius; 1545 SkScalar fOuterRadius;
1546 SkScalar fInnerRadius; 1546 SkScalar fInnerRadius;
1547 // No half plane, we don't use it here. 1547 // No half plane, we don't use it here.
1548 }; 1548 };
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
2173 } 2173 }
2174 2174
2175 DRAW_BATCH_TEST_DEFINE(RRectBatch) { 2175 DRAW_BATCH_TEST_DEFINE(RRectBatch) {
2176 SkMatrix viewMatrix = GrTest::TestMatrixRectStaysRect(random); 2176 SkMatrix viewMatrix = GrTest::TestMatrixRectStaysRect(random);
2177 GrColor color = GrRandomColor(random); 2177 GrColor color = GrRandomColor(random);
2178 const SkRRect& rrect = GrTest::TestRRectSimple(random); 2178 const SkRRect& rrect = GrTest::TestRRectSimple(random);
2179 return create_rrect_batch(color, viewMatrix, rrect, GrTest::TestStrokeRec(ra ndom)); 2179 return create_rrect_batch(color, viewMatrix, rrect, GrTest::TestStrokeRec(ra ndom));
2180 } 2180 }
2181 2181
2182 #endif 2182 #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