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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 */ | 63 */ |
64 void addDependency(GrSurface* dependedOn); | 64 void addDependency(GrSurface* dependedOn); |
65 | 65 |
66 /* | 66 /* |
67 * Does this drawTarget depend on 'dependedOn'? | 67 * Does this drawTarget depend on 'dependedOn'? |
68 */ | 68 */ |
69 bool dependsOn(GrDrawTarget* dependedOn) const { | 69 bool dependsOn(GrDrawTarget* dependedOn) const { |
70 return fDependencies.find(dependedOn) >= 0; | 70 return fDependencies.find(dependedOn) >= 0; |
71 } | 71 } |
72 | 72 |
| 73 /* |
| 74 * Dump out the drawTarget dependency DAG |
| 75 */ |
| 76 SkDEBUGCODE(void dump() const;) |
| 77 |
73 /** | 78 /** |
74 * Empties the draw buffer of any queued up draws. | 79 * Empties the draw buffer of any queued up draws. |
75 */ | 80 */ |
76 void reset(); | 81 void reset(); |
77 | 82 |
78 /** | 83 /** |
79 * This plays any queued up draws to its GrGpu target. It also resets this o
bject (i.e. flushing | 84 * This plays any queued up draws to its GrGpu target. It also resets this o
bject (i.e. flushing |
80 * is destructive). | 85 * is destructive). |
81 */ | 86 */ |
82 void flush(); | 87 void flush(); |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 SkSTArray<256, SkAutoTUnref<GrBatch>, true> fBatches; | 302 SkSTArray<256, SkAutoTUnref<GrBatch>, true> fBatches; |
298 SkAutoTDelete<GrClipMaskManager> fClipMaskManager; | 303 SkAutoTDelete<GrClipMaskManager> fClipMaskManager; |
299 // The context is only in service of the clip mask manager, remove once CMM
doesn't need this. | 304 // The context is only in service of the clip mask manager, remove once CMM
doesn't need this. |
300 GrContext* fContext; | 305 GrContext* fContext; |
301 GrGpu* fGpu; | 306 GrGpu* fGpu; |
302 GrResourceProvider* fResourceProvider; | 307 GrResourceProvider* fResourceProvider; |
303 GrBatchFlushState fFlushState; | 308 GrBatchFlushState fFlushState; |
304 bool fFlushing; | 309 bool fFlushing; |
305 int fFirstUnpreparedBatch; | 310 int fFirstUnpreparedBatch; |
306 | 311 |
| 312 SkDEBUGCODE(int fDebugID;) |
307 uint32_t fFlags; | 313 uint32_t fFlags; |
308 | 314 |
309 // 'this' drawTarget relies on the output of the drawTargets in 'fDependenci
es' | 315 // 'this' drawTarget relies on the output of the drawTargets in 'fDependenci
es' |
310 SkTDArray<GrDrawTarget*> fDependencies; | 316 SkTDArray<GrDrawTarget*> fDependencies; |
311 | 317 |
312 typedef SkRefCnt INHERITED; | 318 typedef SkRefCnt INHERITED; |
313 }; | 319 }; |
314 | 320 |
315 #endif | 321 #endif |
OLD | NEW |