Bug 1359055 - Part 1: PBO offset for WebGL compressedTexImage; r?jgilbert
MozReview-Commit-ID: LvmMpi77oWi
--- a/dom/canvas/WebGLTextureUpload.cpp
+++ b/dom/canvas/WebGLTextureUpload.cpp
@@ -1510,17 +1510,16 @@ WebGLTexture::CompressedTexImage(const c
mContext->gl->MakeCurrent();
const ScopedLazyBind bindPBO(mContext->gl, LOCAL_GL_PIXEL_UNPACK_BUFFER,
mContext->mBoundPixelUnpackBuffer);
// Warning: Possibly shared memory. See bug 1225033.
GLenum error = DoCompressedTexImage(mContext->gl, target, level, internalFormat,
blob->mWidth, blob->mHeight, blob->mDepth,
blob->mAvailBytes, blob->mPtr);
-
mContext->OnDataAllocCall();
if (error == LOCAL_GL_OUT_OF_MEMORY) {
mContext->ErrorOutOfMemory("%s: Ran out of memory during upload.", funcName);
return;
}
if (error) {
MOZ_RELEASE_ASSERT(false, "GFX: We should have caught all other errors.");
mContext->GenerateWarning("%s: Unexpected error during texture upload. Context"
@@ -1665,17 +1664,16 @@ WebGLTexture::CompressedTexSubImage(cons
const ScopedLazyBind bindPBO(mContext->gl, LOCAL_GL_PIXEL_UNPACK_BUFFER,
mContext->mBoundPixelUnpackBuffer);
// Warning: Possibly shared memory. See bug 1225033.
GLenum error = DoCompressedTexSubImage(mContext->gl, target, level, xOffset, yOffset,
zOffset, blob->mWidth, blob->mHeight,
blob->mDepth, sizedUnpackFormat,
blob->mAvailBytes, blob->mPtr);
-
if (error == LOCAL_GL_OUT_OF_MEMORY) {
mContext->ErrorOutOfMemory("%s: Ran out of memory during upload.", funcName);
return;
}
if (error) {
MOZ_RELEASE_ASSERT(false, "GFX: We should have caught all other errors.");
mContext->GenerateWarning("%s: Unexpected error during texture upload. Context"
" lost.",