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

Side by Side Diff: include/gpu/GrSurface.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/GrRenderTarget.h ('k') | include/gpu/GrTexture.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 2012 Google Inc. 2 * Copyright 2012 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 8
9 #ifndef GrSurface_DEFINED 9 #ifndef GrSurface_DEFINED
10 #define GrSurface_DEFINED 10 #define GrSurface_DEFINED
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // Methods made available via GrSurfacePriv 139 // Methods made available via GrSurfacePriv
140 SkImageInfo info(SkAlphaType) const; 140 SkImageInfo info(SkAlphaType) const;
141 bool savePixels(const char* filename); 141 bool savePixels(const char* filename);
142 bool hasPendingRead() const; 142 bool hasPendingRead() const;
143 bool hasPendingWrite() const; 143 bool hasPendingWrite() const;
144 bool hasPendingIO() const; 144 bool hasPendingIO() const;
145 145
146 // Provides access to methods that should be public within Skia code. 146 // Provides access to methods that should be public within Skia code.
147 friend class GrSurfacePriv; 147 friend class GrSurfacePriv;
148 148
149 GrSurface(GrGpu* gpu, LifeCycle lifeCycle, const GrSurfaceDesc& desc) 149 GrSurface(GrGpu* gpu, const GrSurfaceDesc& desc)
150 : INHERITED(gpu, lifeCycle) 150 : INHERITED(gpu)
151 , fDesc(desc) 151 , fDesc(desc)
152 , fReleaseProc(NULL) 152 , fReleaseProc(NULL)
153 , fReleaseCtx(NULL) 153 , fReleaseCtx(NULL)
154 {} 154 {}
155 155
156 ~GrSurface() override { 156 ~GrSurface() override {
157 // check that invokeReleaseProc has been called (if needed) 157 // check that invokeReleaseProc has been called (if needed)
158 SkASSERT(NULL == fReleaseProc); 158 SkASSERT(NULL == fReleaseProc);
159 } 159 }
160 160
(...skipping 10 matching lines...) Expand all
171 } 171 }
172 } 172 }
173 173
174 ReleaseProc fReleaseProc; 174 ReleaseProc fReleaseProc;
175 ReleaseCtx fReleaseCtx; 175 ReleaseCtx fReleaseCtx;
176 176
177 typedef GrGpuResource INHERITED; 177 typedef GrGpuResource INHERITED;
178 }; 178 };
179 179
180 #endif 180 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrRenderTarget.h ('k') | include/gpu/GrTexture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698