diff --git a/gfx/thebes/GLContext.cpp b/gfx/thebes/GLContext.cpp index e409728b2b71..f88d0947baab 100644 --- a/gfx/thebes/GLContext.cpp +++ b/gfx/thebes/GLContext.cpp @@ -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