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

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

Issue 1229143007: Start to propagate constness of GrPipelineBuilder up the stack (Closed) Base URL: https://skia.googlesource.com/skia.git@const-fix
Patch Set: rebase Created 5 years, 5 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/GrAALinearizingConvexPathRenderer.cpp ('k') | src/gpu/GrAARectRenderer.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 2012 Google Inc. 2 * Copyright 2012 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 GrAARectRenderer_DEFINED 8 #ifndef GrAARectRenderer_DEFINED
9 #define GrAARectRenderer_DEFINED 9 #define GrAARectRenderer_DEFINED
10 10
11 #include "GrColor.h" 11 #include "GrColor.h"
12 #include "SkMatrix.h" 12 #include "SkMatrix.h"
13 #include "SkRect.h" 13 #include "SkRect.h"
14 #include "SkStrokeRec.h" 14 #include "SkStrokeRec.h"
15 15
16 class GrClip; 16 class GrClip;
17 class GrDrawTarget; 17 class GrDrawTarget;
18 class GrIndexBuffer; 18 class GrIndexBuffer;
19 class GrPipelineBuilder; 19 class GrPipelineBuilder;
20 20
21 /* 21 /*
22 * This class wraps helper functions that draw AA rects (filled & stroked) 22 * This class wraps helper functions that draw AA rects (filled & stroked)
23 */ 23 */
24 class GrAARectRenderer { 24 class GrAARectRenderer {
25 public: 25 public:
26 // TODO: potentialy fuse the fill & stroke methods and differentiate 26 // TODO: potentialy fuse the fill & stroke methods and differentiate
27 // between them by passing in stroke (==NULL means fill). 27 // between them by passing in stroke (==NULL means fill).
28 28
29 static void FillAARect(GrDrawTarget* target, 29 static void FillAARect(GrDrawTarget* target,
30 GrPipelineBuilder* pipelineBuilder, 30 const GrPipelineBuilder& pipelineBuilder,
31 GrColor color, 31 GrColor color,
32 const SkMatrix& viewMatrix, 32 const SkMatrix& viewMatrix,
33 const SkRect& rect, 33 const SkRect& rect,
34 const SkRect& devRect) { 34 const SkRect& devRect) {
35 GeometryFillAARect(target, pipelineBuilder, color, viewMatrix, rect, dev Rect); 35 GeometryFillAARect(target, pipelineBuilder, color, viewMatrix, rect, dev Rect);
36 } 36 }
37 37
38 static void StrokeAARect(GrDrawTarget*, 38 static void StrokeAARect(GrDrawTarget*,
39 GrPipelineBuilder*, 39 const GrPipelineBuilder&,
40 GrColor, 40 GrColor,
41 const SkMatrix& viewMatrix, 41 const SkMatrix& viewMatrix,
42 const SkRect& rect, 42 const SkRect& rect,
43 const SkRect& devRect, 43 const SkRect& devRect,
44 const SkStrokeRec& stroke); 44 const SkStrokeRec& stroke);
45 45
46 // First rect is outer; second rect is inner 46 // First rect is outer; second rect is inner
47 static void FillAANestedRects(GrDrawTarget*, 47 static void FillAANestedRects(GrDrawTarget*,
48 GrPipelineBuilder*, 48 const GrPipelineBuilder&,
49 GrColor, 49 GrColor,
50 const SkMatrix& viewMatrix, 50 const SkMatrix& viewMatrix,
51 const SkRect rects[2]); 51 const SkRect rects[2]);
52 52
53 private: 53 private:
54 GrAARectRenderer(); 54 GrAARectRenderer();
55 55
56 static void GeometryFillAARect(GrDrawTarget*, 56 static void GeometryFillAARect(GrDrawTarget*,
57 GrPipelineBuilder*, 57 const GrPipelineBuilder&,
58 GrColor, 58 GrColor,
59 const SkMatrix& viewMatrix, 59 const SkMatrix& viewMatrix,
60 const SkRect& rect, 60 const SkRect& rect,
61 const SkRect& devRect); 61 const SkRect& devRect);
62 62
63 static void GeometryStrokeAARect(GrDrawTarget*, 63 static void GeometryStrokeAARect(GrDrawTarget*,
64 GrPipelineBuilder*, 64 const GrPipelineBuilder&,
65 GrColor, 65 GrColor,
66 const SkMatrix& viewMatrix, 66 const SkMatrix& viewMatrix,
67 const SkRect& devOutside, 67 const SkRect& devOutside,
68 const SkRect& devOutsideAssist, 68 const SkRect& devOutsideAssist,
69 const SkRect& devInside, 69 const SkRect& devInside,
70 bool miterStroke); 70 bool miterStroke);
71 }; 71 };
72 72
73 #endif // GrAARectRenderer_DEFINED 73 #endif // GrAARectRenderer_DEFINED
OLDNEW
« no previous file with comments | « src/gpu/GrAALinearizingConvexPathRenderer.cpp ('k') | src/gpu/GrAARectRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698