| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #ifndef GrTexture_DEFINED | 9 #ifndef GrTexture_DEFINED |
| 10 #define GrTexture_DEFINED | 10 #define GrTexture_DEFINED |
| 11 | 11 |
| 12 #include "GrSurface.h" | 12 #include "GrSurface.h" |
| 13 #include "SkPoint.h" | 13 #include "SkPoint.h" |
| 14 #include "SkRefCnt.h" | 14 #include "SkRefCnt.h" |
| 15 | 15 |
| 16 class GrTextureParams; | 16 class GrTextureParams; |
| 17 class GrTexturePriv; | 17 class GrTexturePriv; |
| 18 | 18 |
| 19 class GrTexture : virtual public GrSurface { | 19 class GrTexture : virtual public GrSurface { |
| 20 public: | 20 public: |
| 21 GrTexture* asTexture() override { return this; } | 21 GrTexture* asTexture() override { return this; } |
| 22 const GrTexture* asTexture() const override { return this; } | 22 const GrTexture* asTexture() const override { return this; } |
| 23 | 23 |
| 24 /** | 24 /** |
| 25 * Returns the sampler type used to access this texture in a shader. |
| 26 */ |
| 27 virtual GrSLType getSamplerType() const = 0; |
| 28 |
| 29 /** |
| 25 * Return the native ID or handle to the texture, depending on the | 30 * Return the native ID or handle to the texture, depending on the |
| 26 * platform. e.g. on OpenGL, return the texture ID. | 31 * platform. e.g. on OpenGL, return the texture ID. |
| 27 */ | 32 */ |
| 28 virtual GrBackendObject getTextureHandle() const = 0; | 33 virtual GrBackendObject getTextureHandle() const = 0; |
| 29 | 34 |
| 30 /** | 35 /** |
| 31 * This function indicates that the texture parameters (wrap mode, filtering
, ...) have been | 36 * This function indicates that the texture parameters (wrap mode, filtering
, ...) have been |
| 32 * changed externally to Skia. | 37 * changed externally to Skia. |
| 33 */ | 38 */ |
| 34 virtual void textureParamsModified() = 0; | 39 virtual void textureParamsModified() = 0; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 61 | 66 |
| 62 MipMapsStatus fMipMapsStatus; | 67 MipMapsStatus fMipMapsStatus; |
| 63 int fMaxMipMapLevel; | 68 int fMaxMipMapLevel; |
| 64 | 69 |
| 65 friend class GrTexturePriv; | 70 friend class GrTexturePriv; |
| 66 | 71 |
| 67 typedef GrSurface INHERITED; | 72 typedef GrSurface INHERITED; |
| 68 }; | 73 }; |
| 69 | 74 |
| 70 #endif | 75 #endif |
| OLD | NEW |