Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: src/gpu/GrOvalRenderer.h

Issue 732693002: Drawstate on stack (Closed) Base URL: https://skia.googlesource.com/skia.git@real_def_gp
Patch Set: tiny fix Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrOptDrawState.h ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 13 matching lines...) Expand all
24 public: 24 public:
25 SK_DECLARE_INST_COUNT(GrOvalRenderer) 25 SK_DECLARE_INST_COUNT(GrOvalRenderer)
26 26
27 GrOvalRenderer() : fRRectIndexBuffer(NULL), fStrokeRRectIndexBuffer(NULL) {} 27 GrOvalRenderer() : fRRectIndexBuffer(NULL), fStrokeRRectIndexBuffer(NULL) {}
28 ~GrOvalRenderer() { 28 ~GrOvalRenderer() {
29 this->reset(); 29 this->reset();
30 } 30 }
31 31
32 void reset(); 32 void reset();
33 33
34 bool drawOval(GrDrawTarget* target, const GrContext* context, bool useAA, 34 bool drawOval(GrDrawTarget*,
35 const SkRect& oval, const SkStrokeRec& stroke); 35 GrDrawState*,
36 bool drawRRect(GrDrawTarget* target, GrContext* context, bool useAA, 36 const GrContext*,
37 const SkRRect& rrect, const SkStrokeRec& stroke); 37 bool useAA,
38 bool drawDRRect(GrDrawTarget* target, GrContext* context, bool useAA, 38 const SkRect& oval,
39 const SkRRect& outer, const SkRRect& inner); 39 const SkStrokeRec& stroke);
40 bool drawRRect(GrDrawTarget*,
41 GrDrawState*,
42 GrContext*,
43 bool useAA,
44 const SkRRect& rrect,
45 const SkStrokeRec& stroke);
46 bool drawDRRect(GrDrawTarget* target,
47 GrDrawState*,
48 GrContext* context,
49 bool useAA,
50 const SkRRect& outer,
51 const SkRRect& inner);
40 52
41 private: 53 private:
42 bool drawEllipse(GrDrawTarget* target, const GrContext* context, bool useCov erageAA, 54 bool drawEllipse(GrDrawTarget* target,
55 GrDrawState*,
56 const GrContext* context,
57 bool useCoverageAA,
43 const SkRect& ellipse, 58 const SkRect& ellipse,
44 const SkStrokeRec& stroke); 59 const SkStrokeRec& stroke);
45 bool drawDIEllipse(GrDrawTarget* target, const GrContext* context, bool useC overageAA, 60 bool drawDIEllipse(GrDrawTarget* target,
61 GrDrawState*,
62 const GrContext* context,
63 bool useCoverageAA,
46 const SkRect& ellipse, 64 const SkRect& ellipse,
47 const SkStrokeRec& stroke); 65 const SkStrokeRec& stroke);
48 void drawCircle(GrDrawTarget* target, const GrContext* context, bool useCove rageAA, 66 void drawCircle(GrDrawTarget* target,
67 GrDrawState*,
68 const GrContext* context,
69 bool useCoverageAA,
49 const SkRect& circle, 70 const SkRect& circle,
50 const SkStrokeRec& stroke); 71 const SkStrokeRec& stroke);
51 72
52 GrIndexBuffer* rRectIndexBuffer(bool isStrokeOnly, GrGpu* gpu); 73 GrIndexBuffer* rRectIndexBuffer(bool isStrokeOnly, GrGpu* gpu);
53 74
54 GrIndexBuffer* fRRectIndexBuffer; 75 GrIndexBuffer* fRRectIndexBuffer;
55 GrIndexBuffer* fStrokeRRectIndexBuffer; 76 GrIndexBuffer* fStrokeRRectIndexBuffer;
56 77
57 typedef SkRefCnt INHERITED; 78 typedef SkRefCnt INHERITED;
58 }; 79 };
59 80
60 #endif // GrOvalRenderer_DEFINED 81 #endif // GrOvalRenderer_DEFINED
OLDNEW
« no previous file with comments | « src/gpu/GrOptDrawState.h ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698