| 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 #ifndef GrOvalRenderer_DEFINED | 8 #ifndef GrOvalRenderer_DEFINED |
| 9 #define GrOvalRenderer_DEFINED | 9 #define GrOvalRenderer_DEFINED |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 , fStrokeRRectIndexBuffer(NULL) {} | 30 , fStrokeRRectIndexBuffer(NULL) {} |
| 31 ~GrOvalRenderer() { | 31 ~GrOvalRenderer() { |
| 32 this->reset(); | 32 this->reset(); |
| 33 } | 33 } |
| 34 | 34 |
| 35 void reset(); | 35 void reset(); |
| 36 | 36 |
| 37 bool drawOval(GrDrawTarget*, | 37 bool drawOval(GrDrawTarget*, |
| 38 GrDrawState*, | 38 GrDrawState*, |
| 39 GrColor, | 39 GrColor, |
| 40 const SkMatrix& viewMatrix, |
| 40 bool useAA, | 41 bool useAA, |
| 41 const SkRect& oval, | 42 const SkRect& oval, |
| 42 const SkStrokeRec& stroke); | 43 const SkStrokeRec& stroke); |
| 43 bool drawRRect(GrDrawTarget*, | 44 bool drawRRect(GrDrawTarget*, |
| 44 GrDrawState*, | 45 GrDrawState*, |
| 45 GrColor, | 46 GrColor, |
| 47 const SkMatrix& viewMatrix, |
| 46 bool useAA, | 48 bool useAA, |
| 47 const SkRRect& rrect, | 49 const SkRRect& rrect, |
| 48 const SkStrokeRec& stroke); | 50 const SkStrokeRec& stroke); |
| 49 bool drawDRRect(GrDrawTarget* target, | 51 bool drawDRRect(GrDrawTarget* target, |
| 50 GrDrawState*, | 52 GrDrawState*, |
| 51 GrColor, | 53 GrColor, |
| 54 const SkMatrix& viewMatrix, |
| 52 bool useAA, | 55 bool useAA, |
| 53 const SkRRect& outer, | 56 const SkRRect& outer, |
| 54 const SkRRect& inner); | 57 const SkRRect& inner); |
| 55 | 58 |
| 56 private: | 59 private: |
| 57 bool drawEllipse(GrDrawTarget* target, | 60 bool drawEllipse(GrDrawTarget* target, |
| 58 GrDrawState*, | 61 GrDrawState*, |
| 59 GrColor, | 62 GrColor, |
| 63 const SkMatrix& viewMatrix, |
| 60 bool useCoverageAA, | 64 bool useCoverageAA, |
| 61 const SkRect& ellipse, | 65 const SkRect& ellipse, |
| 62 const SkStrokeRec& stroke); | 66 const SkStrokeRec& stroke); |
| 63 bool drawDIEllipse(GrDrawTarget* target, | 67 bool drawDIEllipse(GrDrawTarget* target, |
| 64 GrDrawState*, | 68 GrDrawState*, |
| 65 GrColor, | 69 GrColor, |
| 70 const SkMatrix& viewMatrix, |
| 66 bool useCoverageAA, | 71 bool useCoverageAA, |
| 67 const SkRect& ellipse, | 72 const SkRect& ellipse, |
| 68 const SkStrokeRec& stroke); | 73 const SkStrokeRec& stroke); |
| 69 void drawCircle(GrDrawTarget* target, | 74 void drawCircle(GrDrawTarget* target, |
| 70 GrDrawState*, | 75 GrDrawState*, |
| 71 GrColor, | 76 GrColor, |
| 77 const SkMatrix& viewMatrix, |
| 72 bool useCoverageAA, | 78 bool useCoverageAA, |
| 73 const SkRect& circle, | 79 const SkRect& circle, |
| 74 const SkStrokeRec& stroke); | 80 const SkStrokeRec& stroke); |
| 75 | 81 |
| 76 GrIndexBuffer* rRectIndexBuffer(bool isStrokeOnly); | 82 GrIndexBuffer* rRectIndexBuffer(bool isStrokeOnly); |
| 77 | 83 |
| 78 GrGpu* fGpu; | 84 GrGpu* fGpu; |
| 79 GrIndexBuffer* fRRectIndexBuffer; | 85 GrIndexBuffer* fRRectIndexBuffer; |
| 80 GrIndexBuffer* fStrokeRRectIndexBuffer; | 86 GrIndexBuffer* fStrokeRRectIndexBuffer; |
| 81 | 87 |
| 82 typedef SkRefCnt INHERITED; | 88 typedef SkRefCnt INHERITED; |
| 83 }; | 89 }; |
| 84 | 90 |
| 85 #endif // GrOvalRenderer_DEFINED | 91 #endif // GrOvalRenderer_DEFINED |
| OLD | NEW |