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 | |
142 protected: | 138 protected: |
143 GrSurface(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc) | 139 GrSurface(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc) |
144 : INHERITED(gpu, isWrapped) | 140 : INHERITED(gpu, isWrapped) |
145 , fDesc(desc) { | 141 , fDesc(desc) { |
146 } | 142 } |
147 | 143 |
148 GrTextureDesc fDesc; | 144 GrTextureDesc fDesc; |
149 | 145 |
150 private: | 146 private: |
151 typedef GrGpuResource INHERITED; | 147 typedef GrGpuResource INHERITED; |
152 }; | 148 }; |
153 | 149 |
154 #endif // GrSurface_DEFINED | 150 #endif // GrSurface_DEFINED |
OLD | NEW |