| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 inline const GrSurfacePriv surfacePriv() const; | 126 inline const GrSurfacePriv surfacePriv() const; |
| 127 | 127 |
| 128 typedef void* ReleaseCtx; | 128 typedef void* ReleaseCtx; |
| 129 typedef void (*ReleaseProc)(ReleaseCtx); | 129 typedef void (*ReleaseProc)(ReleaseCtx); |
| 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); |
| 137 |
| 136 protected: | 138 protected: |
| 137 // Methods made available via GrSurfacePriv | 139 // Methods made available via GrSurfacePriv |
| 138 SkImageInfo info(SkAlphaType) const; | 140 SkImageInfo info(SkAlphaType) const; |
| 139 bool savePixels(const char* filename); | 141 bool savePixels(const char* filename); |
| 140 bool hasPendingRead() const; | 142 bool hasPendingRead() const; |
| 141 bool hasPendingWrite() const; | 143 bool hasPendingWrite() const; |
| 142 bool hasPendingIO() const; | 144 bool hasPendingIO() const; |
| 143 | 145 |
| 144 // Provides access to methods that should be public within Skia code. | 146 // Provides access to methods that should be public within Skia code. |
| 145 friend class GrSurfacePriv; | 147 friend class GrSurfacePriv; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 169 } | 171 } |
| 170 } | 172 } |
| 171 | 173 |
| 172 ReleaseProc fReleaseProc; | 174 ReleaseProc fReleaseProc; |
| 173 ReleaseCtx fReleaseCtx; | 175 ReleaseCtx fReleaseCtx; |
| 174 | 176 |
| 175 typedef GrGpuResource INHERITED; | 177 typedef GrGpuResource INHERITED; |
| 176 }; | 178 }; |
| 177 | 179 |
| 178 #endif | 180 #endif |
| OLD | NEW |