OLD | NEW |
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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 } | 216 } |
217 static GrDrawTarget* Dependency(GrDrawTarget* dt, int index) { | 217 static GrDrawTarget* Dependency(GrDrawTarget* dt, int index) { |
218 return dt->fDependencies[index]; | 218 return dt->fDependencies[index]; |
219 } | 219 } |
220 }; | 220 }; |
221 | 221 |
222 void recordBatch(GrBatch*); | 222 void recordBatch(GrBatch*); |
223 void forwardCombine(); | 223 void forwardCombine(); |
224 bool installPipelineInDrawBatch(const GrPipelineBuilder* pipelineBuilder, | 224 bool installPipelineInDrawBatch(const GrPipelineBuilder* pipelineBuilder, |
225 const GrScissorState* scissor, | 225 const GrScissorState* scissor, |
226 bool hasStencilClip, | |
227 GrDrawBatch* batch); | 226 GrDrawBatch* batch); |
228 | 227 |
229 // Makes a copy of the dst if it is necessary for the draw. Returns false if
a copy is required | 228 // 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 | 229 // 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 | 230 // needs to be accessed by GLPrograms to setup a correct drawstate |
232 bool setupDstReadIfNecessary(const GrPipelineBuilder&, | 231 bool setupDstReadIfNecessary(const GrPipelineBuilder&, |
233 const GrPipelineOptimizations& optimizations, | 232 const GrPipelineOptimizations& optimizations, |
234 GrXferProcessor::DstTexture*, | 233 GrXferProcessor::DstTexture*, |
235 const SkRect& batchBounds); | 234 const SkRect& batchBounds); |
236 | 235 |
| 236 // Check to see if this set of draw commands has been sent out |
| 237 void getPathStencilSettingsForFilltype(GrPathRendering::FillType, |
| 238 const GrStencilAttachment*, |
| 239 GrStencilSettings*); |
| 240 |
237 void addDependency(GrDrawTarget* dependedOn); | 241 void addDependency(GrDrawTarget* dependedOn); |
238 | 242 |
239 // Used only by CMM. | 243 // Used only by CMM. |
240 void clearStencilClip(const SkIRect&, bool insideClip, GrRenderTarget*); | 244 void clearStencilClip(const SkIRect&, bool insideClip, GrRenderTarget*); |
241 | 245 |
242 SkSTArray<256, SkAutoTUnref<GrBatch>, true> fBatches; | 246 SkSTArray<256, SkAutoTUnref<GrBatch>, true> fBatches; |
243 SkAutoTDelete<GrClipMaskManager> fClipMaskManager; | 247 SkAutoTDelete<GrClipMaskManager> fClipMaskManager; |
244 // The context is only in service of the clip mask manager, remove once CMM
doesn't need this. | 248 // The context is only in service of the clip mask manager, remove once CMM
doesn't need this. |
245 GrContext* fContext; | 249 GrContext* fContext; |
246 GrGpu* fGpu; | 250 GrGpu* fGpu; |
247 GrResourceProvider* fResourceProvider; | 251 GrResourceProvider* fResourceProvider; |
248 GrAuditTrail* fAuditTrail; | 252 GrAuditTrail* fAuditTrail; |
249 | 253 |
250 SkDEBUGCODE(int fDebugID;) | 254 SkDEBUGCODE(int fDebugID;) |
251 uint32_t fFlags; | 255 uint32_t fFlags; |
252 | 256 |
253 // 'this' drawTarget relies on the output of the drawTargets in 'fDependenci
es' | 257 // 'this' drawTarget relies on the output of the drawTargets in 'fDependenci
es' |
254 SkTDArray<GrDrawTarget*> fDependencies; | 258 SkTDArray<GrDrawTarget*> fDependencies; |
255 GrRenderTarget* fRenderTarget; | 259 GrRenderTarget* fRenderTarget; |
256 | 260 |
257 bool fDrawBatchBounds; | 261 bool fDrawBatchBounds; |
258 int fMaxBatchLookback; | 262 int fMaxBatchLookback; |
259 int fMaxBatchLookahead; | 263 int fMaxBatchLookahead; |
260 | 264 |
261 typedef SkRefCnt INHERITED; | 265 typedef SkRefCnt INHERITED; |
262 }; | 266 }; |
263 | 267 |
264 #endif | 268 #endif |
OLD | NEW |