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

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

Issue 2173513002: Cleanup of code that converts from GPU-backed resources to SkImageInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@fix-sync
Patch Set: Created 4 years, 5 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 | « no previous file | include/gpu/SkGr.h » ('j') | src/image/SkImage_Gpu.cpp » ('J')
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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 void setRelease(ReleaseProc proc, ReleaseCtx ctx) { 131 void setRelease(ReleaseProc proc, ReleaseCtx ctx) {
132 fReleaseProc = proc; 132 fReleaseProc = proc;
133 fReleaseCtx = ctx; 133 fReleaseCtx = ctx;
134 } 134 }
135 135
136 static size_t WorseCaseSize(const GrSurfaceDesc& desc); 136 static size_t WorseCaseSize(const GrSurfaceDesc& desc);
137 137
138 protected: 138 protected:
139 // Methods made available via GrSurfacePriv 139 // Methods made available via GrSurfacePriv
140 SkImageInfo info(SkAlphaType) const;
141 bool savePixels(const char* filename); 140 bool savePixels(const char* filename);
142 bool hasPendingRead() const; 141 bool hasPendingRead() const;
143 bool hasPendingWrite() const; 142 bool hasPendingWrite() const;
144 bool hasPendingIO() const; 143 bool hasPendingIO() const;
145 144
146 // Provides access to methods that should be public within Skia code. 145 // Provides access to methods that should be public within Skia code.
147 friend class GrSurfacePriv; 146 friend class GrSurfacePriv;
148 147
149 GrSurface(GrGpu* gpu, const GrSurfaceDesc& desc) 148 GrSurface(GrGpu* gpu, const GrSurfaceDesc& desc)
150 : INHERITED(gpu) 149 : INHERITED(gpu)
(...skipping 20 matching lines...) Expand all
171 } 170 }
172 } 171 }
173 172
174 ReleaseProc fReleaseProc; 173 ReleaseProc fReleaseProc;
175 ReleaseCtx fReleaseCtx; 174 ReleaseCtx fReleaseCtx;
176 175
177 typedef GrGpuResource INHERITED; 176 typedef GrGpuResource INHERITED;
178 }; 177 };
179 178
180 #endif 179 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/SkGr.h » ('j') | src/image/SkImage_Gpu.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698