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 | |
170 // override of GrResource | 168 // override of GrResource |
171 void onAbandon() override; | 169 void onAbandon() override; |
172 void onRelease() override; | 170 void onRelease() override; |
173 | 171 |
174 private: | 172 private: |
175 // Allows the backends to perform any additional work that is required for a
ttaching a | 173 // Allows the backends to perform any additional work that is required for a
ttaching a |
176 // GrStencilAttachment. When this is called, the GrStencilAttachment has alr
eady been put onto | 174 // GrStencilAttachment. When this is called, the GrStencilAttachment has alr
eady been put onto |
177 // the GrRenderTarget. This function must return false if any failures occur
when completing the | 175 // the GrRenderTarget. This function must return false if any failures occur
when completing the |
178 // stencil attachment. | 176 // stencil attachment. |
179 virtual bool completeStencilAttachment() = 0; | 177 virtual bool completeStencilAttachment() = 0; |
(...skipping 11 matching lines...) Expand all Loading... |
191 // This back-pointer is required so that we can add a dependancy between | 189 // This back-pointer is required so that we can add a dependancy between |
192 // the drawTarget used to create the current contents of this renderTarget | 190 // the drawTarget used to create the current contents of this renderTarget |
193 // and the drawTarget of a destination renderTarget to which this one is bei
ng drawn. | 191 // and the drawTarget of a destination renderTarget to which this one is bei
ng drawn. |
194 GrDrawTarget* fLastDrawTarget; | 192 GrDrawTarget* fLastDrawTarget; |
195 | 193 |
196 typedef GrSurface INHERITED; | 194 typedef GrSurface INHERITED; |
197 }; | 195 }; |
198 | 196 |
199 | 197 |
200 #endif | 198 #endif |
OLD | NEW |