| 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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 619         SkScalar fInnerRadius; | 619         SkScalar fInnerRadius; | 
| 620         SkScalar fOuterRadius; | 620         SkScalar fOuterRadius; | 
| 621         GrColor fColor; | 621         GrColor fColor; | 
| 622         bool fStroke; | 622         bool fStroke; | 
| 623     }; | 623     }; | 
| 624 | 624 | 
| 625     static GrDrawBatch* Create(const Geometry& geometry) { return new CircleBatc
      h(geometry); } | 625     static GrDrawBatch* Create(const Geometry& geometry) { return new CircleBatc
      h(geometry); } | 
| 626 | 626 | 
| 627     const char* name() const override { return "CircleBatch"; } | 627     const char* name() const override { return "CircleBatch"; } | 
| 628 | 628 | 
|  | 629     SkString dumpInfo() const override { | 
|  | 630         SkString string; | 
|  | 631         for (int i = 0; i < fGeoData.count(); ++i) { | 
|  | 632             string.appendf("Color: 0x%08x Rect [L: %.2f, T: %.2f, R: %.2f, B: %.
      2f]," | 
|  | 633                            "InnerRad: %.2f, OuterRad: %.2f\n", | 
|  | 634                            fGeoData[i].fColor, | 
|  | 635                            fGeoData[i].fDevBounds.fLeft, fGeoData[i].fDevBounds.
      fTop, | 
|  | 636                            fGeoData[i].fDevBounds.fRight, fGeoData[i].fDevBounds
      .fBottom, | 
|  | 637                            fGeoData[i].fInnerRadius, | 
|  | 638                            fGeoData[i].fOuterRadius); | 
|  | 639         } | 
|  | 640         string.append(INHERITED::dumpInfo()); | 
|  | 641         return string; | 
|  | 642     } | 
|  | 643 | 
| 629     void getInvariantOutputColor(GrInitInvariantOutput* out) const override { | 644     void getInvariantOutputColor(GrInitInvariantOutput* out) const override { | 
| 630         // When this is called on a batch, there is only one geometry bundle | 645         // When this is called on a batch, there is only one geometry bundle | 
| 631         out->setKnownFourComponents(fGeoData[0].fColor); | 646         out->setKnownFourComponents(fGeoData[0].fColor); | 
| 632     } | 647     } | 
| 633 | 648 | 
| 634     void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { | 649     void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override { | 
| 635         out->setUnknownSingleComponent(); | 650         out->setUnknownSingleComponent(); | 
| 636     } | 651     } | 
| 637 | 652 | 
| 638 private: | 653 private: | 
| (...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2032 } | 2047 } | 
| 2033 | 2048 | 
| 2034 DRAW_BATCH_TEST_DEFINE(RRectBatch) { | 2049 DRAW_BATCH_TEST_DEFINE(RRectBatch) { | 
| 2035     SkMatrix viewMatrix = GrTest::TestMatrixRectStaysRect(random); | 2050     SkMatrix viewMatrix = GrTest::TestMatrixRectStaysRect(random); | 
| 2036     GrColor color = GrRandomColor(random); | 2051     GrColor color = GrRandomColor(random); | 
| 2037     const SkRRect& rrect = GrTest::TestRRectSimple(random); | 2052     const SkRRect& rrect = GrTest::TestRRectSimple(random); | 
| 2038     return create_rrect_batch(color, viewMatrix, rrect, GrTest::TestStrokeRec(ra
      ndom)); | 2053     return create_rrect_batch(color, viewMatrix, rrect, GrTest::TestStrokeRec(ra
      ndom)); | 
| 2039 } | 2054 } | 
| 2040 | 2055 | 
| 2041 #endif | 2056 #endif | 
| OLD | NEW | 
|---|