Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Unified Diff: Source/WebCore/html/canvas/WebGLRenderingContext.cpp

Issue 10441002: Merge 117918 - Must set/reset pixel unpack alignment to 1 during texSubImage2D (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba5551-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/canvas/WebGLRenderingContext.cpp
===================================================================
--- Source/WebCore/html/canvas/WebGLRenderingContext.cpp (revision 118258)
+++ Source/WebCore/html/canvas/WebGLRenderingContext.cpp (working copy)
@@ -3726,8 +3726,12 @@
synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "texSubImage2D", "bad image");
return;
}
+ if (m_unpackAlignment != 1)
+ m_context->pixelStorei(GraphicsContext3D::UNPACK_ALIGNMENT, 1);
texSubImage2DBase(target, level, xoffset, yoffset, image->width(), image->height(),
format, type, data.data(), ec);
+ if (m_unpackAlignment != 1)
+ m_context->pixelStorei(GraphicsContext3D::UNPACK_ALIGNMENT, m_unpackAlignment);
}
void WebGLRenderingContext::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
@@ -3767,8 +3771,12 @@
synthesizeGLError(GraphicsContext3D::INVALID_VALUE, "texSubImage2D", "bad image data");
return;
}
+ if (m_unpackAlignment != 1)
+ m_context->pixelStorei(GraphicsContext3D::UNPACK_ALIGNMENT, 1);
texSubImage2DBase(target, level, xoffset, yoffset, pixels->width(), pixels->height(),
format, type, data.data(), ec);
+ if (m_unpackAlignment != 1)
+ m_context->pixelStorei(GraphicsContext3D::UNPACK_ALIGNMENT, m_unpackAlignment);
}
void WebGLRenderingContext::texSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset,
« no previous file with comments | « LayoutTests/fast/canvas/webgl/tex-image-and-sub-image-2d-with-image-rgba5551-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698