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
wk2-texture-mapper-asserts.diff (text/plain), 5.00 KB, created by
Carlos Garcia Campos
on 2015-03-05 06:57:44 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Carlos Garcia Campos
Created:
2015-03-05 06:57:44 PST
Size:
5.00 KB
patch
obsolete
>diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog >index 1f27e24..9cb94c7 100644 >--- a/Source/WebKit2/ChangeLog >+++ b/Source/WebKit2/ChangeLog >@@ -1,3 +1,33 @@ >+2015-03-05 Carlos Garcia Campos <cgarcia@igalia.com> >+ >+ [GTK] WebCore::TransformationMatrix::multiply segfaults when loading last.fm >+ https://bugs.webkit.org/show_bug.cgi?id=142333 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ I think this was caused by r180924 that postpones the creation of >+ the TextureMapper, which could cause that a layer has not yet a >+ size when TextureMapper::paint() is called. This patch moves the >+ creation of the TextureMapper to >+ LayerTreeHostGtk::setNativeSurfaceHandleForCompositing(), so that >+ it's created as soon as it's possible to create. this method is >+ called by the drawing area right after creating the >+ LayerTreeHostGtk if it already have a handler, or when the handle >+ is received from the UI process. >+ >+ * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: >+ (WebKit::LayerTreeHostGtk::initialize): Remove the >+ ensureTextureMapper call because at this point the layer context >+ ID is always 0, so it's impossible to create the TextureMapper. >+ (WebKit::LayerTreeHostGtk::compositeLayersToContext): Remove the >+ ensureTextureMapper call from here too, since at this point, if we >+ have a context, we should also have a TextureMapper. Add an ASSERT >+ right before using the TextureMapper. >+ (WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing): >+ Create the TextureMapper here. >+ (WebKit::LayerTreeHostGtk::ensureTextureMapper): Deleted. >+ * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: >+ > 2015-03-05 Michael Catanzaro <mcatanzaro@igalia.com> > > [SOUP] Disable RC4 >diff --git a/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp b/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp >index 9624296..92f7598 100644 >--- a/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp >+++ b/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp >@@ -92,17 +92,6 @@ bool LayerTreeHostGtk::makeContextCurrent() > return m_context->makeContextCurrent(); > } > >-void LayerTreeHostGtk::ensureTextureMapper() >-{ >- if (m_textureMapper) >- return; >- >- ASSERT(m_isValid); >- m_textureMapper = TextureMapper::create(TextureMapper::OpenGLMode); >- static_cast<TextureMapperGL*>(m_textureMapper.get())->setEnableEdgeDistanceAntialiasing(true); >- downcast<GraphicsLayerTextureMapper>(*m_rootLayer).layer().setTextureMapper(m_textureMapper.get()); >-} >- > void LayerTreeHostGtk::initialize() > { > m_rootLayer = GraphicsLayer::create(graphicsLayerFactory(), *this); >@@ -124,13 +113,6 @@ void LayerTreeHostGtk::initialize() > > m_rootLayer->addChild(m_nonCompositedContentLayer.get()); > m_nonCompositedContentLayer->setNeedsDisplay(); >- >- // The creation of the TextureMapper needs an active OpenGL context. >- if (!makeContextCurrent()) >- return; >- >- ensureTextureMapper(); >- scheduleLayerFlush(); > } > > LayerTreeHostGtk::~LayerTreeHostGtk() >@@ -296,8 +278,6 @@ void LayerTreeHostGtk::compositeLayersToContext(CompositePurpose purpose) > if (!makeContextCurrent()) > return; > >- ensureTextureMapper(); >- > // The window size may be out of sync with the page size at this point, and getting > // the viewport parameters incorrect, means that the content will be misplaced. Thus > // we set the viewport parameters directly from the window size. >@@ -309,6 +289,7 @@ void LayerTreeHostGtk::compositeLayersToContext(CompositePurpose purpose) > glClear(GL_COLOR_BUFFER_BIT); > } > >+ ASSERT(m_textureMapper); > m_textureMapper->beginPainting(); > downcast<GraphicsLayerTextureMapper>(*m_rootLayer).layer().paint(); > m_textureMapper->endPainting(); >@@ -387,6 +368,17 @@ void LayerTreeHostGtk::setViewOverlayRootLayer(WebCore::GraphicsLayer* viewOverl > void LayerTreeHostGtk::setNativeSurfaceHandleForCompositing(uint64_t handle) > { > m_layerTreeContext.contextID = handle; >+ >+ // The creation of the TextureMapper needs an active OpenGL context. >+ if (!makeContextCurrent()) >+ return; >+ >+ ASSERT(m_isValid); >+ m_textureMapper = TextureMapper::create(TextureMapper::OpenGLMode); >+ static_cast<TextureMapperGL*>(m_textureMapper.get())->setEnableEdgeDistanceAntialiasing(true); >+ downcast<GraphicsLayerTextureMapper>(*m_rootLayer).layer().setTextureMapper(m_textureMapper.get()); >+ >+ scheduleLayerFlush(); > } > > } // namespace WebKit >diff --git a/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.h b/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.h >index 10eac8c..694c345 100644 >--- a/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.h >+++ b/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.h >@@ -87,7 +87,6 @@ private: > void layerFlushTimerFired(); > > bool makeContextCurrent(); >- void ensureTextureMapper(); > > LayerTreeContext m_layerTreeContext; > bool m_isValid;
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 142333
:
247950
|
247960
|
250129