Fix Android texture cacheID issue (npot flag not generated correctly)
authorrobertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 4 Jan 2013 16:33:44 +0000 (16:33 +0000)
committerrobertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Fri, 4 Jan 2013 16:33:44 +0000 (16:33 +0000)
https://codereview.appspot.com/7042046/

git-svn-id: http://skia.googlecode.com/svn/trunk@7018 2bbb7eff-a529-9590-31e7-b0007b416f81

src/gpu/GrTexture.cpp

index 8aabc2fce482439db780468d01ac53a01d7e7658..614d7711c2399c438f6021acde1907f0245904ec 100644 (file)
@@ -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;