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

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

Issue 1310533004: Standardize BW to NonAA (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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/GrDrawTarget.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 2010 Google Inc. 2 * Copyright 2010 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 GrDrawTarget_DEFINED 8 #ifndef GrDrawTarget_DEFINED
9 #define GrDrawTarget_DEFINED 9 #define GrDrawTarget_DEFINED
10 10
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 * Helper function for drawing rects. 113 * Helper function for drawing rects.
114 * 114 *
115 * @param rect the rect to draw 115 * @param rect the rect to draw
116 * @param localRect optional rect that specifies local coords to map onto 116 * @param localRect optional rect that specifies local coords to map onto
117 * rect. If NULL then rect serves as the local coords. 117 * rect. If NULL then rect serves as the local coords.
118 * @param localMatrix Optional local matrix. The local coordinates are speci fied by localRect, 118 * @param localMatrix Optional local matrix. The local coordinates are speci fied by localRect,
119 * or if it is NULL by rect. This matrix applies to the c oordinate implied by 119 * or if it is NULL by rect. This matrix applies to the c oordinate implied by
120 * that rectangle before it is input to GrCoordTransforms that read local 120 * that rectangle before it is input to GrCoordTransforms that read local
121 * coordinates 121 * coordinates
122 */ 122 */
123 void drawBWRect(const GrPipelineBuilder& pipelineBuilder, 123 void drawNonAARect(const GrPipelineBuilder& pipelineBuilder,
124 GrColor color, 124 GrColor color,
125 const SkMatrix& viewMatrix, 125 const SkMatrix& viewMatrix,
126 const SkRect& rect); 126 const SkRect& rect);
127 127
128 void drawBWRect(const GrPipelineBuilder& pipelineBuilder, 128 void drawNonAARect(const GrPipelineBuilder& pipelineBuilder,
129 GrColor color, 129 GrColor color,
130 const SkMatrix& viewMatrix, 130 const SkMatrix& viewMatrix,
131 const SkRect& rect, 131 const SkRect& rect,
132 const SkMatrix& localMatrix); 132 const SkMatrix& localMatrix);
133 133
134 void drawBWRect(const GrPipelineBuilder& pipelineBuilder, 134 void drawNonAARect(const GrPipelineBuilder& pipelineBuilder,
135 GrColor color, 135 GrColor color,
136 const SkMatrix& viewMatrix, 136 const SkMatrix& viewMatrix,
137 const SkRect& rect, 137 const SkRect& rect,
138 const SkRect& localRect); 138 const SkRect& localRect);
139 139
140 /** 140 void drawNonAARect(const GrPipelineBuilder& ds,
141 * Helper for drawRect when the caller doesn't need separate local rects or matrices. 141 GrColor color,
142 */ 142 const SkMatrix& viewM,
143 void drawSimpleRect(const GrPipelineBuilder& ds, GrColor color, const SkMatr ix& viewM, 143 const SkIRect& irect) {
144 const SkRect& rect) {
145 this->drawBWRect(ds, color, viewM, rect);
146 }
147 void drawSimpleRect(const GrPipelineBuilder& ds, GrColor color, const SkMatr ix& viewM,
148 const SkIRect& irect) {
149 SkRect rect = SkRect::Make(irect); 144 SkRect rect = SkRect::Make(irect);
150 this->drawBWRect(ds, color, viewM, rect); 145 this->drawNonAARect(ds, color, viewM, rect);
151 } 146 }
152 147
153 void drawAARect(const GrPipelineBuilder& pipelineBuilder, 148 void drawAARect(const GrPipelineBuilder& pipelineBuilder,
154 GrColor color, 149 GrColor color,
155 const SkMatrix& viewMatrix, 150 const SkMatrix& viewMatrix,
156 const SkRect& rect, 151 const SkRect& rect,
157 const SkRect& devRect); 152 const SkRect& devRect);
158 153
159 /** 154 /**
160 * Clear the passed in render target. Ignores the GrPipelineBuilder and clip . Clears the whole 155 * Clear the passed in render target. Ignores the GrPipelineBuilder and clip . Clears the whole
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 bool setupClip(const GrPipelineBuilder&, 319 bool setupClip(const GrPipelineBuilder&,
325 GrPipelineBuilder::AutoRestoreFragmentProcessorState*, 320 GrPipelineBuilder::AutoRestoreFragmentProcessorState*,
326 GrPipelineBuilder::AutoRestoreStencil*, 321 GrPipelineBuilder::AutoRestoreStencil*,
327 GrScissorState* scissorState, 322 GrScissorState* scissorState,
328 const SkRect* devBounds) override; 323 const SkRect* devBounds) override;
329 324
330 typedef GrDrawTarget INHERITED; 325 typedef GrDrawTarget INHERITED;
331 }; 326 };
332 327
333 #endif 328 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698