| 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() SK_OVERRIDE { return this; } |   21     GrTexture* asTexture() override { return this; } | 
|   22     const GrTexture* asTexture() const SK_OVERRIDE { return this; } |   22     const GrTexture* asTexture() const override { return this; } | 
|   23  |   23  | 
|   24     /** |   24     /** | 
|   25      *  Return the native ID or handle to the texture, depending on the |   25      *  Return the native ID or handle to the texture, depending on the | 
|   26      *  platform. e.g. on OpenGL, return the texture ID. |   26      *  platform. e.g. on OpenGL, return the texture ID. | 
|   27      */ |   27      */ | 
|   28     virtual GrBackendObject getTextureHandle() const = 0; |   28     virtual GrBackendObject getTextureHandle() const = 0; | 
|   29  |   29  | 
|   30     /** |   30     /** | 
|   31      * This function indicates that the texture parameters (wrap mode, filtering
     , ...) have been |   31      * This function indicates that the texture parameters (wrap mode, filtering
     , ...) have been | 
|   32      * changed externally to Skia. |   32      * changed externally to Skia. | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
|   43     /** Access methods that are only to be used within Skia code. */ |   43     /** Access methods that are only to be used within Skia code. */ | 
|   44     inline GrTexturePriv texturePriv(); |   44     inline GrTexturePriv texturePriv(); | 
|   45     inline const GrTexturePriv texturePriv() const; |   45     inline const GrTexturePriv texturePriv() const; | 
|   46  |   46  | 
|   47 protected: |   47 protected: | 
|   48     GrTexture(GrGpu*, LifeCycle, const GrSurfaceDesc&); |   48     GrTexture(GrGpu*, LifeCycle, const GrSurfaceDesc&); | 
|   49  |   49  | 
|   50     void validateDesc() const; |   50     void validateDesc() const; | 
|   51  |   51  | 
|   52 private: |   52 private: | 
|   53     size_t onGpuMemorySize() const SK_OVERRIDE; |   53     size_t onGpuMemorySize() const override; | 
|   54     void dirtyMipMaps(bool mipMapsDirty); |   54     void dirtyMipMaps(bool mipMapsDirty); | 
|   55  |   55  | 
|   56     enum MipMapsStatus { |   56     enum MipMapsStatus { | 
|   57         kNotAllocated_MipMapsStatus, |   57         kNotAllocated_MipMapsStatus, | 
|   58         kAllocated_MipMapsStatus, |   58         kAllocated_MipMapsStatus, | 
|   59         kValid_MipMapsStatus |   59         kValid_MipMapsStatus | 
|   60     }; |   60     }; | 
|   61  |   61  | 
|   62     MipMapsStatus   fMipMapsStatus; |   62     MipMapsStatus   fMipMapsStatus; | 
|   63     // These two shift a fixed-point value into normalized coordinates   |   63     // These two shift a fixed-point value into normalized coordinates   | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  103         fTexture.reset(SkSafeRef(texture)); |  103         fTexture.reset(SkSafeRef(texture)); | 
|  104         return texture; |  104         return texture; | 
|  105     } |  105     } | 
|  106  |  106  | 
|  107 private: |  107 private: | 
|  108     SkAutoTUnref<GrTexture> fTexture; |  108     SkAutoTUnref<GrTexture> fTexture; | 
|  109     SkIPoint                fOffset; |  109     SkIPoint                fOffset; | 
|  110 }; |  110 }; | 
|  111  |  111  | 
|  112 #endif |  112 #endif | 
| OLD | NEW |