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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 const void* buffer, | 128 const void* buffer, |
129 size_t rowBytes = 0, | 129 size_t rowBytes = 0, |
130 uint32_t pixelOpsFlags = 0) = 0; | 130 uint32_t pixelOpsFlags = 0) = 0; |
131 | 131 |
132 /** | 132 /** |
133 * Write the contents of the surface to a PNG. Returns true if successful. | 133 * Write the contents of the surface to a PNG. Returns true if successful. |
134 * @param filename Full path to desired file | 134 * @param filename Full path to desired file |
135 */ | 135 */ |
136 bool savePixels(const char* filename); | 136 bool savePixels(const char* filename); |
137 | 137 |
| 138 bool hasPendingRead() const; |
| 139 bool hasPendingWrite() const; |
| 140 bool hasPendingIO() const; |
| 141 |
138 protected: | 142 protected: |
139 GrSurface(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc) | 143 GrSurface(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc) |
140 : INHERITED(gpu, isWrapped) | 144 : INHERITED(gpu, isWrapped) |
141 , fDesc(desc) { | 145 , fDesc(desc) { |
142 } | 146 } |
143 | 147 |
144 GrTextureDesc fDesc; | 148 GrTextureDesc fDesc; |
145 | 149 |
146 private: | 150 private: |
147 typedef GrGpuResource INHERITED; | 151 typedef GrGpuResource INHERITED; |
148 }; | 152 }; |
149 | 153 |
150 #endif // GrSurface_DEFINED | 154 #endif // GrSurface_DEFINED |
OLD | NEW |