| 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 |
| 11 | 11 |
| 12 #include "GrTypes.h" | 12 #include "GrTypes.h" |
| 13 #include "GrResource.h" | 13 #include "GrGpuObject.h" |
| 14 #include "SkRect.h" | 14 #include "SkRect.h" |
| 15 | 15 |
| 16 class GrTexture; | 16 class GrTexture; |
| 17 class GrRenderTarget; | 17 class GrRenderTarget; |
| 18 struct SkImageInfo; | 18 struct SkImageInfo; |
| 19 | 19 |
| 20 class GrSurface : public GrResource { | 20 class GrSurface : public GrGpuObject { |
| 21 public: | 21 public: |
| 22 SK_DECLARE_INST_COUNT(GrSurface); | 22 SK_DECLARE_INST_COUNT(GrSurface); |
| 23 | 23 |
| 24 /** | 24 /** |
| 25 * Retrieves the width of the surface. | 25 * Retrieves the width of the surface. |
| 26 * | 26 * |
| 27 * @return the width in texels | 27 * @return the width in texels |
| 28 */ | 28 */ |
| 29 int width() const { return fDesc.fWidth; } | 29 int width() const { return fDesc.fWidth; } |
| 30 | 30 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 137 |
| 138 protected: | 138 protected: |
| 139 GrSurface(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc) | 139 GrSurface(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc) |
| 140 : INHERITED(gpu, isWrapped) | 140 : INHERITED(gpu, isWrapped) |
| 141 , fDesc(desc) { | 141 , fDesc(desc) { |
| 142 } | 142 } |
| 143 | 143 |
| 144 GrTextureDesc fDesc; | 144 GrTextureDesc fDesc; |
| 145 | 145 |
| 146 private: | 146 private: |
| 147 typedef GrResource INHERITED; | 147 typedef GrGpuObject INHERITED; |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 #endif // GrSurface_DEFINED | 150 #endif // GrSurface_DEFINED |
| OLD | NEW |