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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 inline const GrSurfacePriv surfacePriv() const; | 119 inline const GrSurfacePriv surfacePriv() const; |
120 | 120 |
121 typedef void* ReleaseCtx; | 121 typedef void* ReleaseCtx; |
122 typedef void (*ReleaseProc)(ReleaseCtx); | 122 typedef void (*ReleaseProc)(ReleaseCtx); |
123 | 123 |
124 void setRelease(ReleaseProc proc, ReleaseCtx ctx) { | 124 void setRelease(ReleaseProc proc, ReleaseCtx ctx) { |
125 fReleaseProc = proc; | 125 fReleaseProc = proc; |
126 fReleaseCtx = ctx; | 126 fReleaseCtx = ctx; |
127 } | 127 } |
128 | 128 |
129 static size_t WorseCaseSize(const GrSurfaceDesc& desc); | 129 static size_t WorstCaseSize(const GrSurfaceDesc& desc); |
130 | 130 |
131 protected: | 131 protected: |
132 // Methods made available via GrSurfacePriv | 132 // Methods made available via GrSurfacePriv |
133 bool savePixels(const char* filename); | 133 bool savePixels(const char* filename); |
134 bool hasPendingRead() const; | 134 bool hasPendingRead() const; |
135 bool hasPendingWrite() const; | 135 bool hasPendingWrite() const; |
136 bool hasPendingIO() const; | 136 bool hasPendingIO() const; |
137 | 137 |
138 // Provides access to methods that should be public within Skia code. | 138 // Provides access to methods that should be public within Skia code. |
139 friend class GrSurfacePriv; | 139 friend class GrSurfacePriv; |
(...skipping 23 matching lines...) Expand all Loading... |
163 } | 163 } |
164 } | 164 } |
165 | 165 |
166 ReleaseProc fReleaseProc; | 166 ReleaseProc fReleaseProc; |
167 ReleaseCtx fReleaseCtx; | 167 ReleaseCtx fReleaseCtx; |
168 | 168 |
169 typedef GrGpuResource INHERITED; | 169 typedef GrGpuResource INHERITED; |
170 }; | 170 }; |
171 | 171 |
172 #endif | 172 #endif |
OLD | NEW |