Bug 612171 - Regression: severe scrolling glitches with GL layers - r=joe, a=blocking-beta8

This commit is contained in:
Benoit Jacob 2010-11-15 18:13:56 -05:00
Родитель b18b421080
Коммит d6d96c60b7
1 изменённых файлов: 9 добавлений и 3 удалений

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

@ -541,9 +541,15 @@ BasicTextureImage::BeginUpdate(nsIntRegion& aRegion)
ImageFormat format =
(GetContentType() == gfxASurface::CONTENT_COLOR) ?
gfxASurface::ImageFormatRGB24 : gfxASurface::ImageFormatARGB32;
if (!mTextureInited || !mBackingSurface ||
mBackingSurface->GetSize() != gfxIntSize(mSize.width, mSize.height) ||
mBackingSurface->Format() != format) {
PRBool repaintEverything = PR_FALSE;
if (mGLContext->IsExtensionSupported(gl::GLContext::APPLE_client_storage)) {
repaintEverything =
!(mBackingSurface &&
mBackingSurface->GetSize() == gfxIntSize(mSize.width, mSize.height) &&
mBackingSurface->Format() == format);
}
if (!mTextureInited || repaintEverything)
{
// if the texture hasn't been initialized yet, or something important
// changed, we need to recreate our backing surface and force the
// client to paint everything