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

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

Issue 1579223003: Remove remaining users of draw*Rect calls (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 /** 115 /**
116 * Draws a path batch. Fill must not be a hairline. It will respect the HW a ntialias flag on 116 * Draws a path batch. Fill must not be a hairline. It will respect the HW a ntialias flag on
117 * the GrPipelineBuilder (if possible in the 3D API). This needs to be separ ate from drawBatch 117 * the GrPipelineBuilder (if possible in the 3D API). This needs to be separ ate from drawBatch
118 * because we install path stencil settings late. 118 * because we install path stencil settings late.
119 * 119 *
120 * TODO: Figure out a better model that allows us to roll this method into d rawBatch. 120 * TODO: Figure out a better model that allows us to roll this method into d rawBatch.
121 */ 121 */
122 void drawPathBatch(const GrPipelineBuilder& pipelineBuilder, GrDrawPathBatch Base* batch); 122 void drawPathBatch(const GrPipelineBuilder& pipelineBuilder, GrDrawPathBatch Base* batch);
123 123
124 /** 124 /**
125 * Helper function for drawing rects.
126 *
127 * @param rect the rect to draw
128 * @param localRect optional rect that specifies local coords to map onto
129 * rect. If nullptr then rect serves as the local coords.
130 * @param localMatrix Optional local matrix. The local coordinates are speci fied by localRect,
131 * or if it is nullptr by rect. This matrix applies to th e coordinate implied by
132 * that rectangle before it is input to GrCoordTransforms that read local
133 * coordinates
134 */
135 void drawNonAARect(const GrPipelineBuilder& pipelineBuilder,
136 GrColor color,
137 const SkMatrix& viewMatrix,
138 const SkRect& rect);
139
140 void drawNonAARect(const GrPipelineBuilder& ds,
141 GrColor color,
142 const SkMatrix& viewM,
143 const SkIRect& irect) {
144 SkRect rect = SkRect::Make(irect);
145 this->drawNonAARect(ds, color, viewM, rect);
146 }
147
148 void drawAARect(const GrPipelineBuilder& pipelineBuilder,
149 GrColor color,
150 const SkMatrix& viewMatrix,
151 const SkRect& rect,
152 const SkRect& devRect);
153
154 /**
155 * Clear the passed in render target. Ignores the GrPipelineBuilder and clip . Clears the whole 125 * Clear the passed in render target. Ignores the GrPipelineBuilder and clip . Clears the whole
156 * thing if rect is nullptr, otherwise just the rect. If canIgnoreRect is se t then the entire 126 * thing if rect is nullptr, otherwise just the rect. If canIgnoreRect is se t then the entire
157 * render target can be optionally cleared. 127 * render target can be optionally cleared.
158 */ 128 */
159 void clear(const SkIRect* rect, 129 void clear(const SkIRect* rect,
160 GrColor color, 130 GrColor color,
161 bool canIgnoreRect, 131 bool canIgnoreRect,
162 GrRenderTarget* renderTarget); 132 GrRenderTarget* renderTarget);
163 133
164 /** Discards the contents render target. */ 134 /** Discards the contents render target. */
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 SkTDArray<GrDrawTarget*> fDependencies; 256 SkTDArray<GrDrawTarget*> fDependencies;
287 GrRenderTarget* fRenderTarget; 257 GrRenderTarget* fRenderTarget;
288 258
289 bool fDrawBatchBounds; 259 bool fDrawBatchBounds;
290 int fMaxBatchLookback; 260 int fMaxBatchLookback;
291 261
292 typedef SkRefCnt INHERITED; 262 typedef SkRefCnt INHERITED;
293 }; 263 };
294 264
295 #endif 265 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698