| 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 |
| 11 #include "GrContext.h" | 11 #include "GrContext.h" |
| 12 #include "GrPaint.h" | 12 #include "GrPaint.h" |
| 13 #include "GrRefCnt.h" | |
| 14 | 13 |
| 15 class GrContext; | 14 class GrContext; |
| 16 class GrDrawTarget; | 15 class GrDrawTarget; |
| 17 class GrPaint; | 16 class GrPaint; |
| 18 struct SkRect; | 17 struct SkRect; |
| 19 class SkStrokeRec; | 18 class SkStrokeRec; |
| 20 | 19 |
| 21 /* | 20 /* |
| 22 * This class wraps helper functions that draw ovals and roundrects (filled & st
roked) | 21 * This class wraps helper functions that draw ovals and roundrects (filled & st
roked) |
| 23 */ | 22 */ |
| 24 class GrOvalRenderer : public GrRefCnt { | 23 class GrOvalRenderer : public SkRefCnt { |
| 25 public: | 24 public: |
| 26 SK_DECLARE_INST_COUNT(GrOvalRenderer) | 25 SK_DECLARE_INST_COUNT(GrOvalRenderer) |
| 27 | 26 |
| 28 GrOvalRenderer() : fRRectIndexBuffer(NULL) {} | 27 GrOvalRenderer() : fRRectIndexBuffer(NULL) {} |
| 29 ~GrOvalRenderer() { | 28 ~GrOvalRenderer() { |
| 30 this->reset(); | 29 this->reset(); |
| 31 } | 30 } |
| 32 | 31 |
| 33 void reset(); | 32 void reset(); |
| 34 | 33 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 45 const SkRect& ellipse, | 44 const SkRect& ellipse, |
| 46 const SkStrokeRec& stroke); | 45 const SkStrokeRec& stroke); |
| 47 void drawCircle(GrDrawTarget* target, bool useAA, | 46 void drawCircle(GrDrawTarget* target, bool useAA, |
| 48 const SkRect& circle, | 47 const SkRect& circle, |
| 49 const SkStrokeRec& stroke); | 48 const SkStrokeRec& stroke); |
| 50 | 49 |
| 51 GrIndexBuffer* rRectIndexBuffer(GrGpu* gpu); | 50 GrIndexBuffer* rRectIndexBuffer(GrGpu* gpu); |
| 52 | 51 |
| 53 GrIndexBuffer* fRRectIndexBuffer; | 52 GrIndexBuffer* fRRectIndexBuffer; |
| 54 | 53 |
| 55 typedef GrRefCnt INHERITED; | 54 typedef SkRefCnt INHERITED; |
| 56 }; | 55 }; |
| 57 | 56 |
| 58 #endif // GrOvalRenderer_DEFINED | 57 #endif // GrOvalRenderer_DEFINED |
| OLD | NEW |