Changeset 106986 in webkit
- Timestamp:
- Feb 7, 2012 1:50:57 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r106982 r106986 1 2012-02-07 James Robinson <jamesr@chromium.org> 2 3 [chromium] Gracefully handle compositor initialization failure in single-threaded proxy 4 https://bugs.webkit.org/show_bug.cgi?id=78013 5 6 Reviewed by Kenneth Russell. 7 8 If compositor initialization fails it's not safe to proceed through the rest of the frame process. This adds 9 some early outs. 10 11 Tested manually by forcing the first makeContextCurrent() call fail. 12 13 * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: 14 (WebCore::CCLayerTreeHost::updateLayers): 15 * platform/graphics/chromium/cc/CCLayerTreeHost.h: 16 (CCLayerTreeHost): 17 * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: 18 (WebCore::CCSingleThreadProxy::compositeAndReadback): 19 (WebCore::CCSingleThreadProxy::compositeImmediately): 20 (WebCore::CCSingleThreadProxy::commitIfNeeded): 21 * platform/graphics/chromium/cc/CCSingleThreadProxy.h: 22 (CCSingleThreadProxy): 23 1 24 2012-02-07 Brady Eidson <beidson@apple.com> 2 25 -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp
r106969 r106986 372 372 } 373 373 374 voidCCLayerTreeHost::updateLayers()374 bool CCLayerTreeHost::updateLayers() 375 375 { 376 376 if (!m_layerRendererInitialized) { … … 378 378 // If we couldn't initialize, then bail since we're returning to software mode. 379 379 if (!m_layerRendererInitialized) 380 return ;380 return false; 381 381 } 382 382 383 383 if (!rootLayer()) 384 return ;384 return true; 385 385 386 386 if (viewportSize().isEmpty()) 387 return ;387 return true; 388 388 389 389 updateLayers(rootLayer()); 390 return true; 390 391 } 391 392 -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h
r106700 r106986 185 185 void setHaveWheelEventHandlers(bool); 186 186 187 void updateLayers(); 187 // Returns false if we should abort this frame due to initialization failure. 188 bool updateLayers(); 188 189 189 190 void updateCompositorResources(GraphicsContext3D*, CCTextureUpdater&); -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp
r106951 r106986 79 79 } 80 80 81 commitIfNeeded(); 81 if (!commitIfNeeded()) 82 return false; 82 83 83 84 if (!doComposite()) … … 229 230 return; 230 231 231 commitIfNeeded(); 232 if (!commitIfNeeded()) 233 return; 232 234 233 235 if (doComposite()) … … 283 285 } 284 286 285 void CCSingleThreadProxy::commitIfNeeded() 286 { 287 ASSERT(CCProxy::isMainThread()); 288 289 m_layerTreeHost->updateLayers(); 287 bool CCSingleThreadProxy::commitIfNeeded() 288 { 289 ASSERT(CCProxy::isMainThread()); 290 291 if (!m_layerTreeHost->updateLayers()) 292 return false; 290 293 291 294 doCommit(); 295 return true; 292 296 } 293 297 -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.h
r106700 r106986 69 69 explicit CCSingleThreadProxy(CCLayerTreeHost*); 70 70 bool recreateContextIfNeeded(); 71 voidcommitIfNeeded();71 bool commitIfNeeded(); 72 72 void doCommit(); 73 73 bool doComposite(); -
trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp
r106951 r106986 398 398 m_commitRequested = false; 399 399 400 m_layerTreeHost->updateLayers(); 400 if (!m_layerTreeHost->updateLayers()) 401 return; 401 402 402 403 // Before applying scrolls and calling animate, we set m_animateRequested to false.
Note: See TracChangeset
for help on using the changeset viewer.