Changeset 181138 in webkit
- Timestamp:
- Mar 5, 2015 10:16:04 PM (9 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r181099 r181138 1 2015-03-05 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 REGRESSION(r180924): ASSERTION FAILED: !from.isEmpty() in WebCore::TransformationMatrix::rectToRect 4 https://bugs.webkit.org/show_bug.cgi?id=142345 5 6 Reviewed by Martin Robinson. 7 8 This was caused by r180924 that postpones the creation of the 9 TextureMapper, which could cause that a layer has not yet a size 10 when TextureMapper::paint() is called. This patch moves the 11 creation of the TextureMapper to 12 LayerTreeHostGtk::setNativeSurfaceHandleForCompositing(), so that 13 it's created as soon as it's possible to create. This method is 14 called by the drawing area right after creating the 15 LayerTreeHostGtk if it already have a handler, or when the handle 16 is received from the UI process. 17 18 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: 19 (WebKit::LayerTreeHostGtk::initialize): Remove the 20 nsureTextureMapper call because at this point the layer context ID 21 is always 0, so it's impossible to create the TextureMapper. 22 (WebKit::LayerTreeHostGtk::compositeLayersToContext): Remove the 23 ensureTextureMapper call from here too, since at this point, if we 24 have a context, we should also have a TextureMapper. Add an ASSERT 25 right before using the TextureMapper. 26 (WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing): 27 Create the TextureMapper here. 28 (WebKit::LayerTreeHostGtk::ensureTextureMapper): Deleted. 29 * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: 30 1 31 2015-03-05 Anders Carlsson <andersca@apple.com> 2 32 -
trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp
r180924 r181138 93 93 } 94 94 95 void LayerTreeHostGtk::ensureTextureMapper()96 {97 if (m_textureMapper)98 return;99 100 ASSERT(m_isValid);101 m_textureMapper = TextureMapper::create(TextureMapper::OpenGLMode);102 static_cast<TextureMapperGL*>(m_textureMapper.get())->setEnableEdgeDistanceAntialiasing(true);103 downcast<GraphicsLayerTextureMapper>(*m_rootLayer).layer().setTextureMapper(m_textureMapper.get());104 }105 106 95 void LayerTreeHostGtk::initialize() 107 96 { … … 125 114 m_rootLayer->addChild(m_nonCompositedContentLayer.get()); 126 115 m_nonCompositedContentLayer->setNeedsDisplay(); 127 128 // The creation of the TextureMapper needs an active OpenGL context.129 if (!makeContextCurrent())130 return;131 132 ensureTextureMapper();133 scheduleLayerFlush();134 116 } 135 117 … … 297 279 return; 298 280 299 ensureTextureMapper();300 301 281 // The window size may be out of sync with the page size at this point, and getting 302 282 // the viewport parameters incorrect, means that the content will be misplaced. Thus … … 310 290 } 311 291 292 ASSERT(m_textureMapper); 312 293 m_textureMapper->beginPainting(); 313 294 downcast<GraphicsLayerTextureMapper>(*m_rootLayer).layer().paint(); … … 345 326 void LayerTreeHostGtk::scheduleLayerFlush() 346 327 { 347 if (!m_layerFlushSchedulingEnabled )328 if (!m_layerFlushSchedulingEnabled || !m_textureMapper) 348 329 return; 349 330 … … 388 369 { 389 370 m_layerTreeContext.contextID = handle; 371 372 // The creation of the TextureMapper needs an active OpenGL context. 373 if (!makeContextCurrent()) 374 return; 375 376 ASSERT(m_isValid); 377 ASSERT(!m_textureMapper); 378 m_textureMapper = TextureMapper::create(TextureMapper::OpenGLMode); 379 static_cast<TextureMapperGL*>(m_textureMapper.get())->setEnableEdgeDistanceAntialiasing(true); 380 downcast<GraphicsLayerTextureMapper>(*m_rootLayer).layer().setTextureMapper(m_textureMapper.get()); 381 382 scheduleLayerFlush(); 390 383 } 391 384 -
trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.h
r180924 r181138 88 88 89 89 bool makeContextCurrent(); 90 void ensureTextureMapper();91 90 92 91 LayerTreeContext m_layerTreeContext;
Note: See TracChangeset
for help on using the changeset viewer.