| OLD | NEW |
| 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 Loading... |
| 130 typedef void* ReleaseCtx; | 130 typedef void* ReleaseCtx; |
| 131 typedef void (*ReleaseProc)(ReleaseCtx); | 131 typedef void (*ReleaseProc)(ReleaseCtx); |
| 132 | 132 |
| 133 void setRelease(ReleaseProc proc, ReleaseCtx ctx) { | 133 void setRelease(ReleaseProc proc, ReleaseCtx ctx) { |
| 134 fReleaseProc = proc; | 134 fReleaseProc = proc; |
| 135 fReleaseCtx = ctx; | 135 fReleaseCtx = ctx; |
| 136 } | 136 } |
| 137 | 137 |
| 138 protected: | 138 protected: |
| 139 // Methods made available via GrSurfacePriv | 139 // Methods made available via GrSurfacePriv |
| 140 SkImageInfo info() 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, LifeCycle lifeCycle, const GrSurfaceDesc& desc) |
| 150 : INHERITED(gpu, lifeCycle) | 150 : INHERITED(gpu, lifeCycle) |
| (...skipping 20 matching lines...) Expand all Loading... |
| 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 |
| OLD | NEW |