aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-04 16:33:44 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-04 16:33:44 +0000
commitbe61c05d897bef024fde7a9f9d7b6c35855bb982 (patch)
treec4c8aa73cf01bbe0907b01e90aa0abc9e626f86b
parent90533be035236c9ff0fc3a9944eae2ec160bc60d (diff)
Fix Android texture cacheID issue (npot flag not generated correctly)
-rw-r--r--src/gpu/GrTexture.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpu/GrTexture.cpp b/src/gpu/GrTexture.cpp
index 8aabc2fce4..614d7711c2 100644
--- a/src/gpu/GrTexture.cpp
+++ b/src/gpu/GrTexture.cpp
@@ -136,8 +136,8 @@ GrResourceKey::ResourceFlags get_texture_flags(const GrGpu* gpu,
const GrTextureDesc& desc) {
GrResourceKey::ResourceFlags flags = 0;
bool tiled = NULL != params && params->isTiled();
- if (tiled & !gpu->getCaps().npotTextureTileSupport()) {
- if (!GrIsPow2(desc.fWidth) || GrIsPow2(desc.fHeight)) {
+ if (tiled && !gpu->getCaps().npotTextureTileSupport()) {
+ if (!GrIsPow2(desc.fWidth) || !GrIsPow2(desc.fHeight)) {
flags |= kStretchToPOT_TextureFlag;
if (params->isBilerp()) {
flags |= kFilter_TextureFlag;