OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 | 8 |
9 #ifndef GrGLRenderTarget_DEFINED | 9 #ifndef GrGLRenderTarget_DEFINED |
10 #define GrGLRenderTarget_DEFINED | 10 #define GrGLRenderTarget_DEFINED |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 fRTFBOID == fTexFBOID) { | 48 fRTFBOID == fTexFBOID) { |
49 // catches FBO 0 and non MSAA case | 49 // catches FBO 0 and non MSAA case |
50 return kAutoResolves_ResolveType; | 50 return kAutoResolves_ResolveType; |
51 } else if (kUnresolvableFBOID == fTexFBOID) { | 51 } else if (kUnresolvableFBOID == fTexFBOID) { |
52 return kCantResolve_ResolveType; | 52 return kCantResolve_ResolveType; |
53 } else { | 53 } else { |
54 return kCanResolve_ResolveType; | 54 return kCanResolve_ResolveType; |
55 } | 55 } |
56 } | 56 } |
57 | 57 |
| 58 GrBackendObject getRenderTargetHandle() const override { return fRTFBOID; } |
| 59 |
58 /** When we don't own the FBO ID we don't attempt to modify its attachments.
*/ | 60 /** When we don't own the FBO ID we don't attempt to modify its attachments.
*/ |
59 bool canAttemptStencilAttachment() const override { | 61 bool canAttemptStencilAttachment() const override { |
60 return kCached_LifeCycle == fRTLifecycle || kUncached_LifeCycle == fRTLi
fecycle; | 62 return kCached_LifeCycle == fRTLifecycle || kUncached_LifeCycle == fRTLi
fecycle; |
61 } | 63 } |
62 | 64 |
63 protected: | 65 protected: |
64 // The public constructor registers this object with the cache. However, onl
y the most derived | 66 // The public constructor registers this object with the cache. However, onl
y the most derived |
65 // class should register with the cache. This constructor does not do the re
gistration and | 67 // class should register with the cache. This constructor does not do the re
gistration and |
66 // rather moves that burden onto the derived class. | 68 // rather moves that burden onto the derived class. |
67 enum Derived { kDerived }; | 69 enum Derived { kDerived }; |
(...skipping 22 matching lines...) Expand all Loading... |
90 GrGLIRect fViewport; | 92 GrGLIRect fViewport; |
91 | 93 |
92 // onGpuMemorySize() needs to know the VRAM footprint of the FBO(s). However
, abandon and | 94 // onGpuMemorySize() needs to know the VRAM footprint of the FBO(s). However
, abandon and |
93 // release zero out the IDs and the cache needs to know the size even after
those actions. | 95 // release zero out the IDs and the cache needs to know the size even after
those actions. |
94 size_t fGpuMemorySize; | 96 size_t fGpuMemorySize; |
95 | 97 |
96 typedef GrRenderTarget INHERITED; | 98 typedef GrRenderTarget INHERITED; |
97 }; | 99 }; |
98 | 100 |
99 #endif | 101 #endif |
OLD | NEW |