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 25 matching lines...) Expand all Loading... |
36 | 36 |
37 class GrBatch; | 37 class GrBatch; |
38 class GrClip; | 38 class GrClip; |
39 class GrCaps; | 39 class GrCaps; |
40 class GrPath; | 40 class GrPath; |
41 class GrDrawPathBatchBase; | 41 class GrDrawPathBatchBase; |
42 class GrPathRangeDraw; | 42 class GrPathRangeDraw; |
43 | 43 |
44 class GrDrawTarget final : public SkRefCnt { | 44 class GrDrawTarget final : public SkRefCnt { |
45 public: | 45 public: |
46 // The context may not be fully constructed and should not be used during Gr
DrawTarget | 46 /** Options for GrDrawTarget behavior. */ |
47 // construction. | 47 struct Options { |
48 GrDrawTarget(GrRenderTarget* rt, GrGpu* gpu, GrResourceProvider*); | 48 Options () : fClipBatchToBounds(false) {} |
| 49 bool fClipBatchToBounds; |
| 50 }; |
| 51 |
| 52 GrDrawTarget(GrRenderTarget*, GrGpu*, GrResourceProvider*, const Options&); |
49 | 53 |
50 ~GrDrawTarget() override; | 54 ~GrDrawTarget() override; |
51 | 55 |
52 void makeClosed() { | 56 void makeClosed() { |
53 // We only close drawTargets When MDB is enabled. When MDB is disabled t
here is only | 57 // We only close drawTargets When MDB is enabled. When MDB is disabled t
here is only |
54 // ever one drawTarget and all calls will be funnelled into it. | 58 // ever one drawTarget and all calls will be funnelled into it. |
55 #ifdef ENABLE_MDB | 59 #ifdef ENABLE_MDB |
56 this->setFlag(kClosed_Flag); | 60 this->setFlag(kClosed_Flag); |
57 #endif | 61 #endif |
58 } | 62 } |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 uint32_t fFlags; | 316 uint32_t fFlags; |
313 | 317 |
314 // 'this' drawTarget relies on the output of the drawTargets in 'fDependenci
es' | 318 // 'this' drawTarget relies on the output of the drawTargets in 'fDependenci
es' |
315 SkTDArray<GrDrawTarget*> fDependencies; | 319 SkTDArray<GrDrawTarget*> fDependencies; |
316 GrRenderTarget* fRenderTarget; | 320 GrRenderTarget* fRenderTarget; |
317 | 321 |
318 typedef SkRefCnt INHERITED; | 322 typedef SkRefCnt INHERITED; |
319 }; | 323 }; |
320 | 324 |
321 #endif | 325 #endif |
OLD | NEW |