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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 protected: | 158 protected: |
159 GrRenderTarget(GrGpu* gpu, LifeCycle lifeCycle, const GrSurfaceDesc& desc, | 159 GrRenderTarget(GrGpu* gpu, LifeCycle lifeCycle, const GrSurfaceDesc& desc, |
160 SampleConfig sampleConfig, GrStencilAttachment* stencil = nul
lptr) | 160 SampleConfig sampleConfig, GrStencilAttachment* stencil = nul
lptr) |
161 : INHERITED(gpu, lifeCycle, desc) | 161 : INHERITED(gpu, lifeCycle, desc) |
162 , fStencilAttachment(stencil) | 162 , fStencilAttachment(stencil) |
163 , fSampleConfig(sampleConfig) | 163 , fSampleConfig(sampleConfig) |
164 , fLastDrawTarget(nullptr) { | 164 , fLastDrawTarget(nullptr) { |
165 fResolveRect.setLargestInverted(); | 165 fResolveRect.setLargestInverted(); |
166 } | 166 } |
167 | 167 |
| 168 ~GrRenderTarget() override; |
| 169 |
168 // override of GrResource | 170 // override of GrResource |
169 void onAbandon() override; | 171 void onAbandon() override; |
170 void onRelease() override; | 172 void onRelease() override; |
171 | 173 |
172 private: | 174 private: |
173 // Allows the backends to perform any additional work that is required for a
ttaching a | 175 // Allows the backends to perform any additional work that is required for a
ttaching a |
174 // GrStencilAttachment. When this is called, the GrStencilAttachment has alr
eady been put onto | 176 // GrStencilAttachment. When this is called, the GrStencilAttachment has alr
eady been put onto |
175 // the GrRenderTarget. This function must return false if any failures occur
when completing the | 177 // the GrRenderTarget. This function must return false if any failures occur
when completing the |
176 // stencil attachment. | 178 // stencil attachment. |
177 virtual bool completeStencilAttachment() = 0; | 179 virtual bool completeStencilAttachment() = 0; |
(...skipping 11 matching lines...) Expand all Loading... |
189 // This back-pointer is required so that we can add a dependancy between | 191 // This back-pointer is required so that we can add a dependancy between |
190 // the drawTarget used to create the current contents of this renderTarget | 192 // the drawTarget used to create the current contents of this renderTarget |
191 // and the drawTarget of a destination renderTarget to which this one is bei
ng drawn. | 193 // and the drawTarget of a destination renderTarget to which this one is bei
ng drawn. |
192 GrDrawTarget* fLastDrawTarget; | 194 GrDrawTarget* fLastDrawTarget; |
193 | 195 |
194 typedef GrSurface INHERITED; | 196 typedef GrSurface INHERITED; |
195 }; | 197 }; |
196 | 198 |
197 | 199 |
198 #endif | 200 #endif |
OLD | NEW |