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

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

Issue 1623653002: skia: Add support for CHROMIUM_image backed textures. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Comments from bsalomon, round four. Created 4 years, 10 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
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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
161 GrSurfaceDesc fDesc; 161 GrSurfaceDesc fDesc;
162 162
163 void onRelease() override; 163 void onRelease() override;
164 void onAbandon() override; 164 void onAbandon() override;
165 bool reuseable() const override;
bsalomon 2016/02/04 16:27:08 I think this can be done without a new function. I
erikchen 2016/02/04 18:44:07 You're right. Done.
165 166
166 private: 167 private:
167 void invokeReleaseProc() { 168 void invokeReleaseProc() {
168 if (fReleaseProc) { 169 if (fReleaseProc) {
169 fReleaseProc(fReleaseCtx); 170 fReleaseProc(fReleaseCtx);
170 fReleaseProc = NULL; 171 fReleaseProc = NULL;
171 } 172 }
172 } 173 }
173 174
174 ReleaseProc fReleaseProc; 175 ReleaseProc fReleaseProc;
175 ReleaseCtx fReleaseCtx; 176 ReleaseCtx fReleaseCtx;
176 177
177 typedef GrGpuResource INHERITED; 178 typedef GrGpuResource INHERITED;
178 }; 179 };
179 180
180 #endif 181 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698