WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-105325-20121221113839.patch (text/plain), 4.03 KB, created by
Viatcheslav Ostapenko
on 2012-12-21 08:41:32 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Viatcheslav Ostapenko
Created:
2012-12-21 08:41:32 PST
Size:
4.03 KB
patch
obsolete
>Subversion Revision: 138329 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 3d8823680bef4548d95de923bed2b1035f23d181..ea1e0615572f147d9d7f3328ffcb75b35b11feaf 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,24 @@ >+2012-12-20 Viatcheslav Ostapenko <sl.ostapenko@samsung.com> >+ >+ [WebGL][EFL][Qt] Transparent canvas composited non-transparent >+ https://bugs.webkit.org/show_bug.cgi?id=105325 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ glXPixmap is always created without alpha channel because 1st GLXFBConfig >+ in a list doesn't support transparency. >+ Use the same code that is used to find GLXFBConfig with alpha for window >+ creation in GraphicsSurfacePrivate::createPixmap(). Code is moved to >+ findFBConfigWithAlpha() method. >+ >+ Covered by fast/canvas/webgl/webgl-composite-modes-repaint.html >+ >+ * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp: >+ (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate): >+ (WebCore::GraphicsSurfacePrivate::createPixmap): >+ (WebCore::GraphicsSurfacePrivate::findFBConfigWithAlpha): >+ (GraphicsSurfacePrivate): >+ > 2012-12-20 Alexey Proskuryakov <ap@apple.com> > > REGRESSION (r138191): Tests crash in ResourceRequest::setStorageSession >diff --git a/Source/WebCore/platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp b/Source/WebCore/platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp >index f693fcbb2c44d00a909708fe33ffecaf8e64594b..373218c73263f1d5ce2c7c71e719a663f5f2d404 100644 >--- a/Source/WebCore/platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp >+++ b/Source/WebCore/platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp >@@ -168,17 +168,7 @@ struct GraphicsSurfacePrivate { > GLXFBConfig* fbConfigs = glXChooseFBConfig(m_display, DefaultScreen(m_display), attributes, &numReturned); > > // Make sure that we choose a configuration that supports an alpha mask. >- for (int i = 0; i < numReturned; ++i) { >- XVisualInfo* visualInfo = glXGetVisualFromFBConfig(m_display, fbConfigs[i]); >- if (!visualInfo) >- continue; >- >- XRenderPictFormat* format = XRenderFindVisualFormat(m_display, visualInfo->visual); >- if (format && format->direct.alphaMask > 0) { >- m_fbConfig = fbConfigs[i]; >- break; >- } >- } >+ m_fbConfig = findFBConfigWithAlpha(fbConfigs, numReturned); > > XFree(fbConfigs); > >@@ -255,8 +245,11 @@ struct GraphicsSurfacePrivate { > int numberOfConfigs; > GLXFBConfig* configs = glXChooseFBConfig(m_display, XDefaultScreen(m_display), glxSpec, &numberOfConfigs); > >+ // If origin window has alpha then find config with alpha. >+ GLXFBConfig& config = m_hasAlpha ? findFBConfigWithAlpha(configs, numberOfConfigs) : configs[0]; >+ > m_xPixmap = XCompositeNameWindowPixmap(m_display, winId); >- m_glxPixmap = glXCreatePixmap(m_display, *configs, m_xPixmap, glxAttributes); >+ m_glxPixmap = glXCreatePixmap(m_display, config, m_xPixmap, glxAttributes); > > uint inverted = 0; > glXQueryDrawable(m_display, m_glxPixmap, GLX_Y_INVERTED_EXT, &inverted); >@@ -356,6 +349,24 @@ struct GraphicsSurfacePrivate { > > bool isReceiver() const { return m_isReceiver; } > private: >+ GLXFBConfig& findFBConfigWithAlpha(GLXFBConfig* fbConfigs, int numberOfConfigs) >+ { >+ for (int i = 0; i < numberOfConfigs; ++i) { >+ XVisualInfo* visualInfo = glXGetVisualFromFBConfig(m_display, fbConfigs[i]); >+ if (!visualInfo) >+ continue; >+ >+ XRenderPictFormat* format = XRenderFindVisualFormat(m_display, visualInfo->visual); >+ if (format && format->direct.alphaMask > 0) { >+ return fbConfigs[i]; >+ break; >+ } >+ } >+ >+ // Return 1st config as a fallback with no alpha support. >+ return fbConfigs[0]; >+ } >+ > OffScreenRootWindow m_offScreenWindow; > IntSize m_size; > Display* m_display;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 105325
:
179977
|
180457
|
180458
|
180460
| 180526