| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 */ | 120 */ |
| 121 void flushWrites(); | 121 void flushWrites(); |
| 122 | 122 |
| 123 /** Access methods that are only to be used within Skia code. */ | 123 /** Access methods that are only to be used within Skia code. */ |
| 124 inline GrSurfacePriv surfacePriv(); | 124 inline GrSurfacePriv surfacePriv(); |
| 125 inline const GrSurfacePriv surfacePriv() const; | 125 inline const GrSurfacePriv surfacePriv() const; |
| 126 | 126 |
| 127 protected: | 127 protected: |
| 128 // Methods made available via GrSurfacePriv | 128 // Methods made available via GrSurfacePriv |
| 129 SkImageInfo info() const; | 129 SkImageInfo info() const; |
| 130 bool savePixels(const char* filename); | |
| 131 bool hasPendingRead() const; | 130 bool hasPendingRead() const; |
| 132 bool hasPendingWrite() const; | 131 bool hasPendingWrite() const; |
| 133 bool hasPendingIO() const; | 132 bool hasPendingIO() const; |
| 134 bool isSameAs(const GrSurface* other) const; | 133 bool isSameAs(const GrSurface* other) const; |
| 135 | 134 |
| 136 // Provides access to methods that should be public within Skia code. | 135 // Provides access to methods that should be public within Skia code. |
| 137 friend class GrSurfacePriv; | 136 friend class GrSurfacePriv; |
| 138 | 137 |
| 139 GrSurface(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc) | 138 GrSurface(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc) |
| 140 : INHERITED(gpu, isWrapped) | 139 : INHERITED(gpu, isWrapped) |
| 141 , fDesc(desc) { | 140 , fDesc(desc) { |
| 142 } | 141 } |
| 143 | 142 |
| 144 GrTextureDesc fDesc; | 143 GrTextureDesc fDesc; |
| 145 | 144 |
| 146 private: | 145 private: |
| 147 typedef GrGpuResource INHERITED; | 146 typedef GrGpuResource INHERITED; |
| 148 }; | 147 }; |
| 149 | 148 |
| 150 #endif | 149 #endif |
| OLD | NEW |