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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 * if client asked us to render to a target that has a pixel | 52 * if client asked us to render to a target that has a pixel |
53 * config that isn't equivalent with one of our configs. | 53 * config that isn't equivalent with one of our configs. |
54 */ | 54 */ |
55 GrPixelConfig config() const { return fDesc.fConfig; } | 55 GrPixelConfig config() const { return fDesc.fConfig; } |
56 | 56 |
57 /** | 57 /** |
58 * Return the descriptor describing the surface | 58 * Return the descriptor describing the surface |
59 */ | 59 */ |
60 const GrTextureDesc& desc() const { return fDesc; } | 60 const GrTextureDesc& desc() const { return fDesc; } |
61 | 61 |
62 void asImageInfo(SkImageInfo*) const; | 62 SkImageInfo info() const; |
63 | 63 |
64 /** | 64 /** |
65 * @return the texture associated with the surface, may be NULL. | 65 * @return the texture associated with the surface, may be NULL. |
66 */ | 66 */ |
67 virtual GrTexture* asTexture() = 0; | 67 virtual GrTexture* asTexture() = 0; |
68 virtual const GrTexture* asTexture() const = 0; | 68 virtual const GrTexture* asTexture() const = 0; |
69 | 69 |
70 /** | 70 /** |
71 * @return the render target underlying this surface, may be NULL. | 71 * @return the render target underlying this surface, may be NULL. |
72 */ | 72 */ |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 , fDesc(desc) { | 141 , fDesc(desc) { |
142 } | 142 } |
143 | 143 |
144 GrTextureDesc fDesc; | 144 GrTextureDesc fDesc; |
145 | 145 |
146 private: | 146 private: |
147 typedef GrGpuObject INHERITED; | 147 typedef GrGpuObject INHERITED; |
148 }; | 148 }; |
149 | 149 |
150 #endif // GrSurface_DEFINED | 150 #endif // GrSurface_DEFINED |
OLD | NEW |