diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2010-11-10 15:31:59 -0800 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2010-11-17 13:35:59 -0800 |
commit | 28040489d744e0c5d475a88663056c9040ed5320 (patch) | |
tree | c463676791e4a63e452a95f0a12b2a8519730693 /WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp | |
parent | eff9be92c41913c92fb1d3b7983c071f3e718678 (diff) | |
download | external_webkit-28040489d744e0c5d475a88663056c9040ed5320.zip external_webkit-28040489d744e0c5d475a88663056c9040ed5320.tar.gz external_webkit-28040489d744e0c5d475a88663056c9040ed5320.tar.bz2 |
Merge WebKit at r71558: Initial merge by git.
Change-Id: Ib345578fa29df7e4bc72b4f00e4a6fddcb754c4c
Diffstat (limited to 'WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp')
-rw-r--r-- | WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp b/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp index 87a0b69..a230384 100644 --- a/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp +++ b/WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp @@ -36,6 +36,7 @@ #include "AffineTransform.h" #include "Color.h" +#include "Extensions3D.h" #include "FloatRect.h" #include "GraphicsContext3D.h" #include "GraphicsTypes.h" @@ -52,6 +53,7 @@ namespace WebCore { PassRefPtr<SharedGraphicsContext3D> SharedGraphicsContext3D::create(HostWindow* hostWindow) { GraphicsContext3D::Attributes attr; + attr.canRecoverFromContextLoss = false; // Canvas contexts can not handle lost contexts. RefPtr<GraphicsContext3D> context = GraphicsContext3D::create(attr, hostWindow); if (!context) return 0; @@ -178,18 +180,8 @@ void SharedGraphicsContext3D::readPixels(long x, long y, unsigned long width, un bool SharedGraphicsContext3D::supportsBGRA() { - return m_context->supportsBGRA(); -} - -bool SharedGraphicsContext3D::supportsCopyTextureToParentTextureCHROMIUM() - -{ - return m_context->supportsCopyTextureToParentTextureCHROMIUM(); -} - -void SharedGraphicsContext3D::copyTextureToParentTextureCHROMIUM(unsigned texture, unsigned parentTexture) -{ - return m_context->copyTextureToParentTextureCHROMIUM(texture, parentTexture); + return m_context->getExtensions()->supports("GL_EXT_texture_format_BGRA8888") + && m_context->getExtensions()->supports("GL_EXT_read_format_bgra"); } Texture* SharedGraphicsContext3D::createTexture(NativeImagePtr ptr, Texture::Format format, int width, int height) |