Bug 1311642 - Do partial texture uploads on mobile. r=nical

We were always uploading the entire texture region, but still by using
glTexSubImage2D. In most cases it should be quicker to use
glTexSubImage2D on the updated region only. And where that function has
problems we should avoid it by making CanUploadSubTextures return false
so that glTexImage2D is used instead.

MozReview-Commit-ID: BrobWEPJ82M

--HG--
extra : rebase_source : 986642a1d7bfe2bcb0cc12dc8e41c17ac77abc1d
This commit is contained in:
Jamie Nicol 2016-10-20 18:24:12 +01:00
Родитель b1411a66d2
Коммит 18f5f7db34
1 изменённых файлов: 0 добавлений и 7 удалений

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

@ -171,16 +171,9 @@ UseTileTexture(CompositableTextureHostRef& aTexture,
}
if (!aUpdateRect.IsEmpty()) {
#ifdef MOZ_GFX_OPTIMIZE_MOBILE
aTexture->Updated(nullptr);
#else
// We possibly upload the entire texture contents here. This is a purposeful
// decision, as sub-image upload can often be slow and/or unreliable, but
// we may want to reevaluate this in the future.
// For !HasIntermediateBuffer() textures, this is likely a no-op.
nsIntRegion region = aUpdateRect;
aTexture->Updated(&region);
#endif
}
aTexture->PrepareTextureSource(aTextureSource);