Title: [132965] trunk/Source/WebCore
- Revision
- 132965
- Author
- [email protected]
- Date
- 2012-10-30 17:00:12 -0700 (Tue, 30 Oct 2012)
Log Message
Temporarily restrict use of ImageBufferSkia::copyToPlatformTexture until bugs resolved
https://bugs.webkit.org/show_bug.cgi?id=100714
Reviewed by Stephen White.
For the moment, only use ImageBuffer::copyToPlatformTexture when
copying to RGBA/UNSIGNED_BYTE textures, and document restriction
in header. Restriction will be lifted once the implementations
(currently only Chromium has one) have been fixed; see bug 100715.
No new tests; manually ran WebGL conformance test
tex-image-and-sub-image-2d-with-canvas-rgba5551.html on NVIDIA
hardware on Mac OS.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore):
(WebCore::WebGLRenderingContext::texImage2D):
* platform/graphics/ImageBuffer.h:
(ImageBuffer):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (132964 => 132965)
--- trunk/Source/WebCore/ChangeLog 2012-10-30 23:53:09 UTC (rev 132964)
+++ trunk/Source/WebCore/ChangeLog 2012-10-31 00:00:12 UTC (rev 132965)
@@ -1,3 +1,25 @@
+2012-10-30 Kenneth Russell <[email protected]>
+
+ Temporarily restrict use of ImageBufferSkia::copyToPlatformTexture until bugs resolved
+ https://bugs.webkit.org/show_bug.cgi?id=100714
+
+ Reviewed by Stephen White.
+
+ For the moment, only use ImageBuffer::copyToPlatformTexture when
+ copying to RGBA/UNSIGNED_BYTE textures, and document restriction
+ in header. Restriction will be lifted once the implementations
+ (currently only Chromium has one) have been fixed; see bug 100715.
+
+ No new tests; manually ran WebGL conformance test
+ tex-image-and-sub-image-2d-with-canvas-rgba5551.html on NVIDIA
+ hardware on Mac OS.
+
+ * html/canvas/WebGLRenderingContext.cpp:
+ (WebCore):
+ (WebCore::WebGLRenderingContext::texImage2D):
+ * platform/graphics/ImageBuffer.h:
+ (ImageBuffer):
+
2012-10-30 Nico Weber <[email protected]>
Fix potential overflow in jpeg exif reader. Found by [email protected].
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (132964 => 132965)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp 2012-10-30 23:53:09 UTC (rev 132964)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp 2012-10-31 00:00:12 UTC (rev 132965)
@@ -3699,7 +3699,11 @@
WebGLTexture* texture = validateTextureBinding("texImage2D", target, true);
// If possible, copy from the canvas element directly to the texture
// via the GPU, without a read-back to system memory.
- if (GraphicsContext3D::TEXTURE_2D == target && texture && type == texture->getType(target, level)) {
+ //
+ // FIXME: restriction of RGBA/UNSIGNED_BYTE should be lifted when
+ // ImageBuffer::copyToPlatformTexture implementations are fully functional.
+ if (GraphicsContext3D::TEXTURE_2D == target && texture && type == texture->getType(target, level)
+ && format == GraphicsContext3D::RGBA && type == GraphicsContext3D::UNSIGNED_BYTE) {
ImageBuffer* buffer = canvas->buffer();
if (buffer && buffer->copyToPlatformTexture(*m_context.get(), texture->object(), internalformat, m_unpackPremultiplyAlpha, m_unpackFlipY)) {
texture->setLevelInfo(target, level, internalformat, canvas->width(), canvas->height(), type);
Modified: trunk/Source/WebCore/platform/graphics/ImageBuffer.h (132964 => 132965)
--- trunk/Source/WebCore/platform/graphics/ImageBuffer.h 2012-10-30 23:53:09 UTC (rev 132964)
+++ trunk/Source/WebCore/platform/graphics/ImageBuffer.h 2012-10-31 00:00:12 UTC (rev 132965)
@@ -119,6 +119,8 @@
PlatformLayer* platformLayer() const;
#endif
+ // FIXME: current implementations of this method have the restriction that they only work
+ // with textures that are RGBA format and UNSIGNED_BYTE type.
bool copyToPlatformTexture(GraphicsContext3D&, Platform3DObject, GC3Denum, bool, bool);
void reportMemoryUsage(MemoryObjectInfo*) const;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes