[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-142-g786665c
kbr at google.com
kbr at google.com
Mon Dec 27 16:28:39 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 5e124d94e795cad6253d1ea079ec17ac6e1fd336
Author: kbr at google.com <kbr at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 22 01:34:27 2010 +0000
2010-12-21 Kenneth Russell <kbr at google.com>
Reviewed by Darin Fisher.
Enable extensions used in accelerated 2D canvas implementation
https://bugs.webkit.org/show_bug.cgi?id=51433
Call Extensions3D::ensureEnabled() for all supported extensions
the accelerated 2D Canvas implementation uses. Tested with a few
layout tests previously failing when run in Chromium due to OpenGL
INVALID_ENUM and other errors.
* platform/graphics/gpu/DrawingBuffer.cpp:
(WebCore::DrawingBuffer::create):
* platform/graphics/gpu/SharedGraphicsContext3D.cpp:
(WebCore::SharedGraphicsContext3D::SharedGraphicsContext3D):
(WebCore::SharedGraphicsContext3D::supportsBGRA):
* platform/graphics/gpu/SharedGraphicsContext3D.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b2234f9..e43f601 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-12-21 Kenneth Russell <kbr at google.com>
+
+ Reviewed by Darin Fisher.
+
+ Enable extensions used in accelerated 2D canvas implementation
+ https://bugs.webkit.org/show_bug.cgi?id=51433
+
+ Call Extensions3D::ensureEnabled() for all supported extensions
+ the accelerated 2D Canvas implementation uses. Tested with a few
+ layout tests previously failing when run in Chromium due to OpenGL
+ INVALID_ENUM and other errors.
+
+ * platform/graphics/gpu/DrawingBuffer.cpp:
+ (WebCore::DrawingBuffer::create):
+ * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
+ (WebCore::SharedGraphicsContext3D::SharedGraphicsContext3D):
+ (WebCore::SharedGraphicsContext3D::supportsBGRA):
+ * platform/graphics/gpu/SharedGraphicsContext3D.h:
+
2010-12-21 Zhenyao Mo <zmo at google.com>
Reviewed by Kenneth Russell.
diff --git a/WebCore/platform/graphics/gpu/DrawingBuffer.cpp b/WebCore/platform/graphics/gpu/DrawingBuffer.cpp
index 0048bd3..d2415ca 100644
--- a/WebCore/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/WebCore/platform/graphics/gpu/DrawingBuffer.cpp
@@ -41,7 +41,13 @@ namespace WebCore {
PassRefPtr<DrawingBuffer> DrawingBuffer::create(GraphicsContext3D* context, const IntSize& size)
{
RefPtr<DrawingBuffer> drawingBuffer = adoptRef(new DrawingBuffer(context, size));
- drawingBuffer->m_multisampleExtensionSupported = context->getExtensions()->supports("GL_ANGLE_framebuffer_blit") && context->getExtensions()->supports("GL_ANGLE_framebuffer_multisample");
+ Extensions3D* extensions = context->getExtensions();
+ bool multisampleSupported = extensions->supports("GL_ANGLE_framebuffer_blit") && extensions->supports("GL_ANGLE_framebuffer_multisample");
+ if (multisampleSupported) {
+ extensions->ensureEnabled("GL_ANGLE_framebuffer_blit");
+ extensions->ensureEnabled("GL_ANGLE_framebuffer_multisample");
+ }
+ drawingBuffer->m_multisampleExtensionSupported = multisampleSupported;
return (drawingBuffer->m_context) ? drawingBuffer.release() : 0;
}
diff --git a/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp b/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp
index d9764e6..a166d9c 100644
--- a/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp
+++ b/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp
@@ -68,11 +68,18 @@ PassRefPtr<SharedGraphicsContext3D> SharedGraphicsContext3D::create(HostWindow*
SharedGraphicsContext3D::SharedGraphicsContext3D(PassRefPtr<GraphicsContext3D> context, PassOwnPtr<SolidFillShader> solidFillShader, PassOwnPtr<TexShader> texShader)
: m_context(context)
+ , m_bgraSupported(false)
, m_quadVertices(0)
, m_solidFillShader(solidFillShader)
, m_texShader(texShader)
{
allContexts()->add(this);
+ Extensions3D* extensions = m_context->getExtensions();
+ m_bgraSupported = extensions->supports("GL_EXT_texture_format_BGRA8888") && extensions->supports("GL_EXT_read_format_bgra");
+ if (m_bgraSupported) {
+ extensions->ensureEnabled("GL_EXT_texture_format_BGRA8888");
+ extensions->ensureEnabled("GL_EXT_read_format_bgra");
+ }
}
SharedGraphicsContext3D::~SharedGraphicsContext3D()
@@ -184,8 +191,7 @@ void SharedGraphicsContext3D::readPixels(long x, long y, unsigned long width, un
bool SharedGraphicsContext3D::supportsBGRA()
{
- return m_context->getExtensions()->supports("GL_EXT_texture_format_BGRA8888")
- && m_context->getExtensions()->supports("GL_EXT_read_format_bgra");
+ return m_bgraSupported;
}
Texture* SharedGraphicsContext3D::createTexture(NativeImagePtr ptr, Texture::Format format, int width, int height)
diff --git a/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.h b/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.h
index 86c64b4..a1ae8f2 100644
--- a/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.h
+++ b/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.h
@@ -124,6 +124,7 @@ private:
void removeTextureFor(NativeImagePtr);
RefPtr<GraphicsContext3D> m_context;
+ bool m_bgraSupported;
unsigned m_quadVertices;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list