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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 virtual bool canAttemptStencilAttachment() const = 0; | 149 virtual bool canAttemptStencilAttachment() const = 0; |
150 | 150 |
151 // Provides access to functions that aren't part of the public API. | 151 // Provides access to functions that aren't part of the public API. |
152 GrRenderTargetPriv renderTargetPriv(); | 152 GrRenderTargetPriv renderTargetPriv(); |
153 const GrRenderTargetPriv renderTargetPriv() const; | 153 const GrRenderTargetPriv renderTargetPriv() const; |
154 | 154 |
155 void setLastDrawTarget(GrDrawTarget* dt); | 155 void setLastDrawTarget(GrDrawTarget* dt); |
156 GrDrawTarget* getLastDrawTarget() { return fLastDrawTarget; } | 156 GrDrawTarget* getLastDrawTarget() { return fLastDrawTarget; } |
157 | 157 |
158 protected: | 158 protected: |
159 GrRenderTarget(GrGpu* gpu, LifeCycle lifeCycle, const GrSurfaceDesc& desc, | 159 GrRenderTarget(GrGpu* gpu, 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, 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; | 168 ~GrRenderTarget() override; |
169 | 169 |
170 // override of GrResource | 170 // override of GrResource |
171 void onAbandon() override; | 171 void onAbandon() override; |
(...skipping 19 matching lines...) Expand all Loading... |
191 // 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 |
192 // the drawTarget used to create the current contents of this renderTarget | 192 // 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. | 193 // and the drawTarget of a destination renderTarget to which this one is bei
ng drawn. |
194 GrDrawTarget* fLastDrawTarget; | 194 GrDrawTarget* fLastDrawTarget; |
195 | 195 |
196 typedef GrSurface INHERITED; | 196 typedef GrSurface INHERITED; |
197 }; | 197 }; |
198 | 198 |
199 | 199 |
200 #endif | 200 #endif |
OLD | NEW |