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

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

Issue 1966763002: Eliminate special case nvpr batch handling (Closed) Base URL: https://skia.googlesource.com/skia.git@reallyupload_userstencil
Patch Set: fixes Created 4 years, 7 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 /** 110 /**
111 * Draws path into the stencil buffer. The fill must be either even/odd or 111 * Draws path into the stencil buffer. The fill must be either even/odd or
112 * winding (not inverse or hairline). It will respect the HW antialias flag 112 * winding (not inverse or hairline). It will respect the HW antialias flag
113 * on the GrPipelineBuilder (if possible in the 3D API). Note, we will neve r have an inverse 113 * on the GrPipelineBuilder (if possible in the 3D API). Note, we will neve r have an inverse
114 * fill with stencil path 114 * fill with stencil path
115 */ 115 */
116 void stencilPath(const GrPipelineBuilder&, const SkMatrix& viewMatrix, const GrPath*, 116 void stencilPath(const GrPipelineBuilder&, const SkMatrix& viewMatrix, const GrPath*,
117 GrPathRendering::FillType); 117 GrPathRendering::FillType);
118 118
119 /** 119 /**
120 * Draws a path batch. Fill must not be a hairline. It will respect the HW a ntialias flag on
121 * the GrPipelineBuilder (if possible in the 3D API). This needs to be separ ate from drawBatch
122 * because we install path stencil settings late.
123 *
124 * TODO: Figure out a better model that allows us to roll this method into d rawBatch.
125 */
126 void drawPathBatch(const GrPipelineBuilder& pipelineBuilder, GrDrawPathBatch Base* batch);
127
128 /**
129 * Clear the passed in render target. Ignores the GrPipelineBuilder and clip . Clears the whole 120 * Clear the passed in render target. Ignores the GrPipelineBuilder and clip . Clears the whole
130 * thing if rect is nullptr, otherwise just the rect. If canIgnoreRect is se t then the entire 121 * thing if rect is nullptr, otherwise just the rect. If canIgnoreRect is se t then the entire
131 * render target can be optionally cleared. 122 * render target can be optionally cleared.
132 */ 123 */
133 void clear(const SkIRect* rect, 124 void clear(const SkIRect* rect,
134 GrColor color, 125 GrColor color,
135 bool canIgnoreRect, 126 bool canIgnoreRect,
136 GrRenderTarget* renderTarget); 127 GrRenderTarget* renderTarget);
137 128
138 /** Discards the contents render target. */ 129 /** Discards the contents render target. */
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 static int NumDependencies(const GrDrawTarget* dt) { 205 static int NumDependencies(const GrDrawTarget* dt) {
215 return dt->fDependencies.count(); 206 return dt->fDependencies.count();
216 } 207 }
217 static GrDrawTarget* Dependency(GrDrawTarget* dt, int index) { 208 static GrDrawTarget* Dependency(GrDrawTarget* dt, int index) {
218 return dt->fDependencies[index]; 209 return dt->fDependencies[index];
219 } 210 }
220 }; 211 };
221 212
222 void recordBatch(GrBatch*); 213 void recordBatch(GrBatch*);
223 void forwardCombine(); 214 void forwardCombine();
224 bool installPipelineInDrawBatch(const GrPipelineBuilder* pipelineBuilder,
225 const GrScissorState* scissor,
226 bool hasStencilClip,
227 GrDrawBatch* batch);
228 215
229 // Makes a copy of the dst if it is necessary for the draw. Returns false if a copy is required 216 // Makes a copy of the dst if it is necessary for the draw. Returns false if a copy is required
230 // but couldn't be made. Otherwise, returns true. This method needs to be p rotected because it 217 // but couldn't be made. Otherwise, returns true. This method needs to be p rotected because it
231 // needs to be accessed by GLPrograms to setup a correct drawstate 218 // needs to be accessed by GLPrograms to setup a correct drawstate
232 bool setupDstReadIfNecessary(const GrPipelineBuilder&, 219 bool setupDstReadIfNecessary(const GrPipelineBuilder&,
233 const GrPipelineOptimizations& optimizations, 220 const GrPipelineOptimizations& optimizations,
234 GrXferProcessor::DstTexture*, 221 GrXferProcessor::DstTexture*,
235 const SkRect& batchBounds); 222 const SkRect& batchBounds);
236 223
237 void addDependency(GrDrawTarget* dependedOn); 224 void addDependency(GrDrawTarget* dependedOn);
(...skipping 17 matching lines...) Expand all
255 GrRenderTarget* fRenderTarget; 242 GrRenderTarget* fRenderTarget;
256 243
257 bool fDrawBatchBounds; 244 bool fDrawBatchBounds;
258 int fMaxBatchLookback; 245 int fMaxBatchLookback;
259 int fMaxBatchLookahead; 246 int fMaxBatchLookahead;
260 247
261 typedef SkRefCnt INHERITED; 248 typedef SkRefCnt INHERITED;
262 }; 249 };
263 250
264 #endif 251 #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