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

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

Issue 1731413002: Hide GrDrawTarget from GrOvalRenderer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: erg! Created 4 years, 9 months 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/GrDrawContext.cpp ('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
11 #include "GrPaint.h" 11 #include "GrPaint.h"
12 12
13 class GrDrawTarget; 13 class GrDrawBatch;
14 class GrPipelineBuilder; 14 class GrPipelineBuilder;
15 class GrShaderCaps;
15 struct SkRect; 16 struct SkRect;
16 class SkStrokeRec; 17 class SkStrokeRec;
17 18
18 /* 19 /*
19 * This class wraps helper functions that draw ovals and roundrects (filled & st roked) 20 * This class wraps helper functions that draw ovals and roundrects (filled & st roked)
20 */ 21 */
21 class GrOvalRenderer { 22 class GrOvalRenderer {
22 public: 23 public:
23 static bool DrawOval(GrDrawTarget*, 24 static GrDrawBatch* CreateOvalBatch(const GrPipelineBuilder&,
24 const GrPipelineBuilder&, 25 GrColor,
25 GrColor, 26 const SkMatrix& viewMatrix,
26 const SkMatrix& viewMatrix, 27 bool useAA,
27 bool useAA, 28 const SkRect& oval,
28 const SkRect& oval, 29 const SkStrokeRec& stroke,
29 const SkStrokeRec& stroke); 30 GrShaderCaps* shaderCaps);
30 static bool DrawRRect(GrDrawTarget*, 31 static GrDrawBatch* CreateRRectBatch(const GrPipelineBuilder&,
31 const GrPipelineBuilder&, 32 GrColor,
32 GrColor, 33 const SkMatrix& viewMatrix,
33 const SkMatrix& viewMatrix, 34 bool useAA,
34 bool useAA, 35 const SkRRect& rrect,
35 const SkRRect& rrect, 36 const SkStrokeRec& stroke,
36 const SkStrokeRec& stroke); 37 GrShaderCaps* shaderCaps);
37 static bool DrawDRRect(GrDrawTarget* target,
38 const GrPipelineBuilder&,
39 GrColor,
40 const SkMatrix& viewMatrix,
41 bool useAA,
42 const SkRRect& outer,
43 const SkRRect& inner);
44 38
45 private: 39 private:
46 GrOvalRenderer(); 40 GrOvalRenderer();
47 41
48 static bool DrawEllipse(GrDrawTarget* target, 42 static GrDrawBatch* CreateEllipseBatch(GrColor,
49 const GrPipelineBuilder&, 43 const SkMatrix& viewMatrix,
50 GrColor, 44 const SkRect& ellipse,
51 const SkMatrix& viewMatrix, 45 const SkStrokeRec& stroke);
52 bool useCoverageAA, 46 static GrDrawBatch* CreateDIEllipseBatch(GrColor,
53 const SkRect& ellipse, 47 const SkMatrix& viewMatrix,
54 const SkStrokeRec& stroke); 48 const SkRect& ellipse,
55 static bool DrawDIEllipse(GrDrawTarget* target, 49 const SkStrokeRec& stroke);
56 const GrPipelineBuilder&, 50 static GrDrawBatch* CreateCircleBatch(GrColor,
57 GrColor, 51 const SkMatrix& viewMatrix,
58 const SkMatrix& viewMatrix, 52 const SkRect& circle,
59 bool useCoverageAA, 53 const SkStrokeRec& stroke);
60 const SkRect& ellipse,
61 const SkStrokeRec& stroke);
62 static void DrawCircle(GrDrawTarget* target,
63 const GrPipelineBuilder&,
64 GrColor,
65 const SkMatrix& viewMatrix,
66 bool useCoverageAA,
67 const SkRect& circle,
68 const SkStrokeRec& stroke);
69 }; 54 };
70 55
71 #endif // GrOvalRenderer_DEFINED 56 #endif // GrOvalRenderer_DEFINED
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698