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 "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 Loading... |
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 Loading... |
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 |
OLD | NEW |