Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: include/gpu/GrRenderTarget.h

Issue 1862043002: Refactor to separate backend object lifecycle and GpuResource budget decision (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix unrelated GrBuffer::onGpuMemorySize() lack of override keyword compile error Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/gpu/GrGpuResource.h ('k') | include/gpu/GrSurface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « include/gpu/GrGpuResource.h ('k') | include/gpu/GrSurface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698