Fix Android texture cacheID issue (npot flag not generated correctly)

https://codereview.appspot.com/7042046/



git-svn-id: http://skia.googlecode.com/svn/trunk@7018 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
robertphillips@google.com 2013-01-04 16:33:44 +00:00
Родитель 90533be035
Коммит be61c05d89
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -136,8 +136,8 @@ GrResourceKey::ResourceFlags get_texture_flags(const GrGpu* gpu,
const GrTextureDesc& desc) { const GrTextureDesc& desc) {
GrResourceKey::ResourceFlags flags = 0; GrResourceKey::ResourceFlags flags = 0;
bool tiled = NULL != params && params->isTiled(); bool tiled = NULL != params && params->isTiled();
if (tiled & !gpu->getCaps().npotTextureTileSupport()) { if (tiled && !gpu->getCaps().npotTextureTileSupport()) {
if (!GrIsPow2(desc.fWidth) || GrIsPow2(desc.fHeight)) { if (!GrIsPow2(desc.fWidth) || !GrIsPow2(desc.fHeight)) {
flags |= kStretchToPOT_TextureFlag; flags |= kStretchToPOT_TextureFlag;
if (params->isBilerp()) { if (params->isBilerp()) {
flags |= kFilter_TextureFlag; flags |= kFilter_TextureFlag;