| 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 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 * platform. e.g. on OpenGL, return the texture ID. | 113 * platform. e.g. on OpenGL, return the texture ID. |
| 114 */ | 114 */ |
| 115 virtual GrBackendObject getTextureHandle() const = 0; | 115 virtual GrBackendObject getTextureHandle() const = 0; |
| 116 | 116 |
| 117 /** | 117 /** |
| 118 * Call this when the state of the native API texture object is | 118 * Call this when the state of the native API texture object is |
| 119 * altered directly, without being tracked by skia. | 119 * altered directly, without being tracked by skia. |
| 120 */ | 120 */ |
| 121 virtual void invalidateCachedState() = 0; | 121 virtual void invalidateCachedState() = 0; |
| 122 | 122 |
| 123 #if GR_DEBUG | 123 #ifdef SK_DEBUG |
| 124 void validate() const { | 124 void validate() const { |
| 125 this->INHERITED::validate(); | 125 this->INHERITED::validate(); |
| 126 | 126 |
| 127 this->validateDesc(); | 127 this->validateDesc(); |
| 128 } | 128 } |
| 129 #else | 129 #else |
| 130 void validate() const {} | 130 void validate() const {} |
| 131 #endif | 131 #endif |
| 132 static GrResourceKey ComputeKey(const GrGpu* gpu, | 132 static GrResourceKey ComputeKey(const GrGpu* gpu, |
| 133 const GrTextureParams* params, | 133 const GrTextureParams* params, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 GrTexture* setTexture(GrTexture* texture) { | 204 GrTexture* setTexture(GrTexture* texture) { |
| 205 fTexture.reset(SkSafeRef(texture)); | 205 fTexture.reset(SkSafeRef(texture)); |
| 206 return texture; | 206 return texture; |
| 207 } | 207 } |
| 208 private: | 208 private: |
| 209 SkAutoTUnref<GrTexture> fTexture; | 209 SkAutoTUnref<GrTexture> fTexture; |
| 210 SkIPoint fOffset; | 210 SkIPoint fOffset; |
| 211 }; | 211 }; |
| 212 | 212 |
| 213 #endif | 213 #endif |
| OLD | NEW |