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

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

Issue 815553003: Move ViewMatrix off of drawstate (Closed) Base URL: https://skia.googlesource.com/skia.git@remove-fragment-stage
Patch Set: more claenup Created 5 years, 11 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
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
(...skipping 27 matching lines...) Expand all
38 ~GrAARectRenderer() { 38 ~GrAARectRenderer() {
39 this->reset(); 39 this->reset();
40 } 40 }
41 41
42 // TODO: potentialy fuse the fill & stroke methods and differentiate 42 // TODO: potentialy fuse the fill & stroke methods and differentiate
43 // between them by passing in stroke (==NULL means fill). 43 // between them by passing in stroke (==NULL means fill).
44 44
45 void fillAARect(GrDrawTarget* target, 45 void fillAARect(GrDrawTarget* target,
46 GrDrawState* ds, 46 GrDrawState* ds,
47 GrColor color, 47 GrColor color,
48 const SkMatrix& viewMatrix,
48 const SkMatrix& localMatrix, 49 const SkMatrix& localMatrix,
49 const SkRect& rect, 50 const SkRect& rect,
50 const SkMatrix& combinedMatrix,
51 const SkRect& devRect) { 51 const SkRect& devRect) {
52 this->geometryFillAARect(target, ds, color, localMatrix, rect, combinedM atrix, devRect); 52 this->geometryFillAARect(target, ds, color, viewMatrix, localMatrix, rec t, devRect);
53 } 53 }
54 54
55 void strokeAARect(GrDrawTarget*, 55 void strokeAARect(GrDrawTarget*,
56 GrDrawState*, 56 GrDrawState*,
57 GrColor, 57 GrColor,
58 const SkMatrix& viewMatrix,
58 const SkMatrix& localMatrix, 59 const SkMatrix& localMatrix,
59 const SkRect& rect, 60 const SkRect& rect,
60 const SkMatrix& combinedMatrix,
61 const SkRect& devRect, 61 const SkRect& devRect,
62 const SkStrokeRec& stroke); 62 const SkStrokeRec& stroke);
63 63
64 // First rect is outer; second rect is inner 64 // First rect is outer; second rect is inner
65 void fillAANestedRects(GrDrawTarget*, 65 void fillAANestedRects(GrDrawTarget*,
66 GrDrawState*, 66 GrDrawState*,
67 GrColor, 67 GrColor,
68 const SkMatrix& viewMatrix,
68 const SkMatrix& localMatrix, 69 const SkMatrix& localMatrix,
69 const SkRect rects[2], 70 const SkRect rects[2]);
70 const SkMatrix& combinedMatrix);
71 71
72 private: 72 private:
73 GrIndexBuffer* aaStrokeRectIndexBuffer(bool miterStroke); 73 GrIndexBuffer* aaStrokeRectIndexBuffer(bool miterStroke);
74 74
75 void geometryFillAARect(GrDrawTarget*, 75 void geometryFillAARect(GrDrawTarget*,
76 GrDrawState*, 76 GrDrawState*,
77 GrColor, 77 GrColor,
78 const SkMatrix& viewMatrix,
78 const SkMatrix& localMatrix, 79 const SkMatrix& localMatrix,
79 const SkRect& rect, 80 const SkRect& rect,
80 const SkMatrix& combinedMatrix,
81 const SkRect& devRect); 81 const SkRect& devRect);
82 82
83 void geometryStrokeAARect(GrDrawTarget*, 83 void geometryStrokeAARect(GrDrawTarget*,
84 GrDrawState*, 84 GrDrawState*,
85 GrColor, 85 GrColor,
86 const SkMatrix& localMatrix, 86 const SkMatrix& localMatrix,
87 const SkRect& devOutside, 87 const SkRect& devOutside,
88 const SkRect& devOutsideAssist, 88 const SkRect& devOutsideAssist,
89 const SkRect& devInside, 89 const SkRect& devInside,
90 bool miterStroke); 90 bool miterStroke);
91 91
92 GrGpu* fGpu; 92 GrGpu* fGpu;
93 GrIndexBuffer* fAAFillRectIndexBuffer; 93 GrIndexBuffer* fAAFillRectIndexBuffer;
94 GrIndexBuffer* fAAMiterStrokeRectIndexBuffer; 94 GrIndexBuffer* fAAMiterStrokeRectIndexBuffer;
95 GrIndexBuffer* fAABevelStrokeRectIndexBuffer; 95 GrIndexBuffer* fAABevelStrokeRectIndexBuffer;
96 96
97 typedef SkRefCnt INHERITED; 97 typedef SkRefCnt INHERITED;
98 }; 98 };
99 99
100 #endif // GrAARectRenderer_DEFINED 100 #endif // GrAARectRenderer_DEFINED
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698