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 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1451 SkMatrix invert; | 1451 SkMatrix invert; |
1452 if (!viewMatrix.invert(&invert)) { | 1452 if (!viewMatrix.invert(&invert)) { |
1453 return false; | 1453 return false; |
1454 } | 1454 } |
1455 | 1455 |
1456 arfps.addCoverageProcessor(effect)->unref(); | 1456 arfps.addCoverageProcessor(effect)->unref(); |
1457 SkRect bounds = outer->getBounds(); | 1457 SkRect bounds = outer->getBounds(); |
1458 if (applyAA) { | 1458 if (applyAA) { |
1459 bounds.outset(SK_ScalarHalf, SK_ScalarHalf); | 1459 bounds.outset(SK_ScalarHalf, SK_ScalarHalf); |
1460 } | 1460 } |
1461 target->drawBWRect(pipelineBuilder, color, SkMatrix::I(), bounds, invert); | 1461 target->drawNonAARect(pipelineBuilder, color, SkMatrix::I(), bounds, invert)
; |
1462 return true; | 1462 return true; |
1463 } | 1463 } |
1464 | 1464 |
1465 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 1465 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
1466 | 1466 |
1467 class RRectCircleRendererBatch : public GrVertexBatch { | 1467 class RRectCircleRendererBatch : public GrVertexBatch { |
1468 public: | 1468 public: |
1469 struct Geometry { | 1469 struct Geometry { |
1470 GrColor fColor; | 1470 GrColor fColor; |
1471 SkMatrix fViewMatrix; | 1471 SkMatrix fViewMatrix; |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2037 } | 2037 } |
2038 | 2038 |
2039 DRAW_BATCH_TEST_DEFINE(RRectBatch) { | 2039 DRAW_BATCH_TEST_DEFINE(RRectBatch) { |
2040 SkMatrix viewMatrix = GrTest::TestMatrixRectStaysRect(random); | 2040 SkMatrix viewMatrix = GrTest::TestMatrixRectStaysRect(random); |
2041 GrColor color = GrRandomColor(random); | 2041 GrColor color = GrRandomColor(random); |
2042 const SkRRect& rrect = GrTest::TestRRectSimple(random); | 2042 const SkRRect& rrect = GrTest::TestRRectSimple(random); |
2043 return create_rrect_batch(color, viewMatrix, rrect, GrTest::TestStrokeRec(ra
ndom)); | 2043 return create_rrect_batch(color, viewMatrix, rrect, GrTest::TestStrokeRec(ra
ndom)); |
2044 } | 2044 } |
2045 | 2045 |
2046 #endif | 2046 #endif |
OLD | NEW |