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 #ifndef GrRenderTarget_DEFINED | 8 #ifndef GrRenderTarget_DEFINED |
9 #define GrRenderTarget_DEFINED | 9 #define GrRenderTarget_DEFINED |
10 | 10 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 // a MSAA RT may require explicit resolving , it may auto-resolve (e.g. FBO | 131 // a MSAA RT may require explicit resolving , it may auto-resolve (e.g. FBO |
132 // 0 in GL), or be unresolvable because the client didn't give us the | 132 // 0 in GL), or be unresolvable because the client didn't give us the |
133 // resolve destination. | 133 // resolve destination. |
134 enum ResolveType { | 134 enum ResolveType { |
135 kCanResolve_ResolveType, | 135 kCanResolve_ResolveType, |
136 kAutoResolves_ResolveType, | 136 kAutoResolves_ResolveType, |
137 kCantResolve_ResolveType, | 137 kCantResolve_ResolveType, |
138 }; | 138 }; |
139 virtual ResolveType getResolveType() const = 0; | 139 virtual ResolveType getResolveType() const = 0; |
140 | 140 |
| 141 /** |
| 142 * Return the native ID or handle to the rendertarget, depending on the |
| 143 * platform. e.g. on OpenGL, return the FBO ID. |
| 144 */ |
| 145 virtual GrBackendObject getRenderTargetHandle() const = 0; |
| 146 |
141 // Provides access to functions that aren't part of the public API. | 147 // Provides access to functions that aren't part of the public API. |
142 GrRenderTargetPriv renderTargetPriv(); | 148 GrRenderTargetPriv renderTargetPriv(); |
143 const GrRenderTargetPriv renderTargetPriv() const; | 149 const GrRenderTargetPriv renderTargetPriv() const; |
144 | 150 |
145 protected: | 151 protected: |
146 GrRenderTarget(GrGpu* gpu, LifeCycle lifeCycle, const GrSurfaceDesc& desc, | 152 GrRenderTarget(GrGpu* gpu, LifeCycle lifeCycle, const GrSurfaceDesc& desc, |
147 SampleConfig sampleConfig) | 153 SampleConfig sampleConfig) |
148 : INHERITED(gpu, lifeCycle, desc) | 154 : INHERITED(gpu, lifeCycle, desc) |
149 , fStencilAttachment(NULL) | 155 , fStencilAttachment(NULL) |
150 , fSampleConfig(sampleConfig) { | 156 , fSampleConfig(sampleConfig) { |
(...skipping 13 matching lines...) Expand all Loading... |
164 GrStencilAttachment* fStencilAttachment; | 170 GrStencilAttachment* fStencilAttachment; |
165 SampleConfig fSampleConfig; | 171 SampleConfig fSampleConfig; |
166 | 172 |
167 SkIRect fResolveRect; | 173 SkIRect fResolveRect; |
168 | 174 |
169 typedef GrSurface INHERITED; | 175 typedef GrSurface INHERITED; |
170 }; | 176 }; |
171 | 177 |
172 | 178 |
173 #endif | 179 #endif |
OLD | NEW |