| 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 #include "GrTextureAccess.h" | 8 #include "GrTextureAccess.h" |
| 9 #include "GrColor.h" | 9 #include "GrColor.h" |
| 10 #include "GrTexture.h" | 10 #include "GrTexture.h" |
| 11 | 11 |
| 12 GrTextureAccess::GrTextureAccess() {} | 12 GrTextureAccess::GrTextureAccess() {} |
| 13 | 13 |
| 14 GrTextureAccess::GrTextureAccess(GrTexture* texture, const GrTextureParams& para
ms) { | 14 GrTextureAccess::GrTextureAccess(GrTexture* texture, const GrTextureParams& para
ms) { |
| 15 this->reset(texture, params); | 15 this->reset(texture, params); |
| 16 } | 16 } |
| 17 | 17 |
| 18 GrTextureAccess::GrTextureAccess(GrTexture* texture, | 18 GrTextureAccess::GrTextureAccess(GrTexture* texture, |
| 19 GrTextureParams::FilterMode filterMode, | 19 GrTextureParams::FilterMode filterMode, |
| 20 SkShader::TileMode tileXAndY) { | 20 SkShader::TileMode tileXAndY, |
| 21 this->reset(texture, filterMode, tileXAndY); | 21 GrShaderFlags visibility) { |
| 22 this->reset(texture, filterMode, tileXAndY, visibility); |
| 22 } | 23 } |
| 23 | 24 |
| 24 | |
| 25 void GrTextureAccess::reset(GrTexture* texture, | 25 void GrTextureAccess::reset(GrTexture* texture, |
| 26 const GrTextureParams& params) { | 26 const GrTextureParams& params, |
| 27 GrShaderFlags visibility) { |
| 27 SkASSERT(texture); | 28 SkASSERT(texture); |
| 28 fTexture.set(SkRef(texture), kRead_GrIOType); | 29 fTexture.set(SkRef(texture), kRead_GrIOType); |
| 29 fParams = params; | 30 fParams = params; |
| 31 fVisibility = visibility; |
| 30 } | 32 } |
| 31 | 33 |
| 32 void GrTextureAccess::reset(GrTexture* texture, | 34 void GrTextureAccess::reset(GrTexture* texture, |
| 33 GrTextureParams::FilterMode filterMode, | 35 GrTextureParams::FilterMode filterMode, |
| 34 SkShader::TileMode tileXAndY) { | 36 SkShader::TileMode tileXAndY, |
| 37 GrShaderFlags visibility) { |
| 35 SkASSERT(texture); | 38 SkASSERT(texture); |
| 36 fTexture.set(SkRef(texture), kRead_GrIOType); | 39 fTexture.set(SkRef(texture), kRead_GrIOType); |
| 37 fParams.reset(tileXAndY, filterMode); | 40 fParams.reset(tileXAndY, filterMode); |
| 41 fVisibility = visibility; |
| 38 } | 42 } |
| OLD | NEW |