Title: [210175] releases/WebKitGTK/webkit-2.14/Source/WebKit2
Revision
210175
Author
[email protected]
Date
2016-12-27 08:44:37 -0800 (Tue, 27 Dec 2016)

Log Message

Merge r209177 - [GTK] UI process crash in WebKit::WaylandCompositor::Surface::prepareTextureForPainting
https://bugs.webkit.org/show_bug.cgi?id=164911

Reviewed by Michael Catanzaro.

The problem is that m_buffer is nullptr in Surface::prepareTextureForPainting() even though we have already an
image. We only use the buffer to get the image size, so we could save the image size when the image is created,
and then we don't need to care about the buffer anymore.

* UIProcess/gtk/WaylandCompositor.cpp:
(WebKit::WaylandCompositor::Surface::prepareTextureForPainting):
(WebKit::WaylandCompositor::Surface::commit):
* UIProcess/gtk/WaylandCompositor.h:

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/ChangeLog (210174 => 210175)


--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/ChangeLog	2016-12-27 16:43:47 UTC (rev 210174)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/ChangeLog	2016-12-27 16:44:37 UTC (rev 210175)
@@ -1,3 +1,19 @@
+2016-11-30  Carlos Garcia Campos  <[email protected]>
+
+        [GTK] UI process crash in WebKit::WaylandCompositor::Surface::prepareTextureForPainting
+        https://bugs.webkit.org/show_bug.cgi?id=164911
+
+        Reviewed by Michael Catanzaro.
+
+        The problem is that m_buffer is nullptr in Surface::prepareTextureForPainting() even though we have already an
+        image. We only use the buffer to get the image size, so we could save the image size when the image is created,
+        and then we don't need to care about the buffer anymore.
+
+        * UIProcess/gtk/WaylandCompositor.cpp:
+        (WebKit::WaylandCompositor::Surface::prepareTextureForPainting):
+        (WebKit::WaylandCompositor::Surface::commit):
+        * UIProcess/gtk/WaylandCompositor.h:
+
 2016-11-28  Carlos Garcia Campos  <[email protected]>
 
         [GTK] BadDamage X Window System error in WebKit::AcceleratedBackingStoreX11::update when called from WebPageProxy::exitAcceleratedCompositingMode

Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp (210174 => 210175)


--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp	2016-12-27 16:43:47 UTC (rev 210174)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp	2016-12-27 16:44:37 UTC (rev 210175)
@@ -214,7 +214,7 @@
     glImageTargetTexture2D(GL_TEXTURE_2D, m_image);
 
     texture = m_texture;
-    textureSize = m_buffer->size();
+    textureSize = m_imageSize;
     return true;
 }
 
@@ -227,6 +227,8 @@
     if (m_image == EGL_NO_IMAGE_KHR)
         return;
 
+    m_imageSize = m_pendingBuffer->size();
+
     makePendingBufferCurrent();
     if (m_webPage)
         m_webPage->setViewNeedsDisplay(IntRect(IntPoint::zero(), m_webPage->viewSize()));

Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/WaylandCompositor.h (210174 => 210175)


--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/WaylandCompositor.h	2016-12-27 16:43:47 UTC (rev 210174)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/UIProcess/gtk/WaylandCompositor.h	2016-12-27 16:44:37 UTC (rev 210175)
@@ -97,6 +97,7 @@
         WeakPtr<Buffer> m_pendingBuffer;
         unsigned m_texture;
         EGLImageKHR m_image;
+        WebCore::IntSize m_imageSize;
         Vector<wl_resource*> m_frameCallbackList;
         WebPageProxy* m_webPage { nullptr };
     };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to