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, |
226 GrDrawBatch* batch); | 227 GrDrawBatch* batch); |
227 | 228 |
228 // Makes a copy of the dst if it is necessary for the draw. Returns false if
a copy is required | 229 // Makes a copy of the dst if it is necessary for the draw. Returns false if
a copy is required |
229 // but couldn't be made. Otherwise, returns true. This method needs to be p
rotected because it | 230 // but couldn't be made. Otherwise, returns true. This method needs to be p
rotected because it |
230 // needs to be accessed by GLPrograms to setup a correct drawstate | 231 // needs to be accessed by GLPrograms to setup a correct drawstate |
231 bool setupDstReadIfNecessary(const GrPipelineBuilder&, | 232 bool setupDstReadIfNecessary(const GrPipelineBuilder&, |
232 const GrPipelineOptimizations& optimizations, | 233 const GrPipelineOptimizations& optimizations, |
233 GrXferProcessor::DstTexture*, | 234 GrXferProcessor::DstTexture*, |
234 const SkRect& batchBounds); | 235 const SkRect& batchBounds); |
235 | 236 |
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 | |
241 void addDependency(GrDrawTarget* dependedOn); | 237 void addDependency(GrDrawTarget* dependedOn); |
242 | 238 |
243 // Used only by CMM. | 239 // Used only by CMM. |
244 void clearStencilClip(const SkIRect&, bool insideClip, GrRenderTarget*); | 240 void clearStencilClip(const SkIRect&, bool insideClip, GrRenderTarget*); |
245 | 241 |
246 SkSTArray<256, SkAutoTUnref<GrBatch>, true> fBatches; | 242 SkSTArray<256, SkAutoTUnref<GrBatch>, true> fBatches; |
247 SkAutoTDelete<GrClipMaskManager> fClipMaskManager; | 243 SkAutoTDelete<GrClipMaskManager> fClipMaskManager; |
248 // The context is only in service of the clip mask manager, remove once CMM
doesn't need this. | 244 // The context is only in service of the clip mask manager, remove once CMM
doesn't need this. |
249 GrContext* fContext; | 245 GrContext* fContext; |
250 GrGpu* fGpu; | 246 GrGpu* fGpu; |
251 GrResourceProvider* fResourceProvider; | 247 GrResourceProvider* fResourceProvider; |
252 GrAuditTrail* fAuditTrail; | 248 GrAuditTrail* fAuditTrail; |
253 | 249 |
254 SkDEBUGCODE(int fDebugID;) | 250 SkDEBUGCODE(int fDebugID;) |
255 uint32_t fFlags; | 251 uint32_t fFlags; |
256 | 252 |
257 // 'this' drawTarget relies on the output of the drawTargets in 'fDependenci
es' | 253 // 'this' drawTarget relies on the output of the drawTargets in 'fDependenci
es' |
258 SkTDArray<GrDrawTarget*> fDependencies; | 254 SkTDArray<GrDrawTarget*> fDependencies; |
259 GrRenderTarget* fRenderTarget; | 255 GrRenderTarget* fRenderTarget; |
260 | 256 |
261 bool fDrawBatchBounds; | 257 bool fDrawBatchBounds; |
262 int fMaxBatchLookback; | 258 int fMaxBatchLookback; |
263 int fMaxBatchLookahead; | 259 int fMaxBatchLookahead; |
264 | 260 |
265 typedef SkRefCnt INHERITED; | 261 typedef SkRefCnt INHERITED; |
266 }; | 262 }; |
267 | 263 |
268 #endif | 264 #endif |
OLD | NEW |