Changeset 170830 in webkit
- Timestamp:
- Jul 6, 2014 1:05:03 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r170829 r170830 1 2014-07-06 Antti Koivisto <antti@apple.com> 2 3 Don't throttle layer flushes when the main resource is a GIF 4 https://bugs.webkit.org/show_bug.cgi?id=134650 5 <rdar://problem/17490712> 6 7 Reviewed by Simon Fraser. 8 9 Avoid throttling big image animations. 10 11 * page/FrameView.cpp: 12 (WebCore::determineLayerFlushThrottleState): 13 14 Disable for image documents. 15 16 (WebCore::FrameView::disableLayerFlushThrottlingTemporarilyForInteraction): 17 (WebCore::FrameView::updateLayerFlushThrottling): 18 19 Refactor a bit. 20 21 * page/LayerFlushThrottleState.h: 22 23 Rename the flag. 24 1 25 2014-07-06 Andreas Kling <akling@apple.com> 2 26 -
trunk/Source/WebCore/page/FrameView.cpp
r170557 r170830 52 52 #include "HTMLNames.h" 53 53 #include "HTMLPlugInImageElement.h" 54 #include "ImageDocument.h" 54 55 #include "InspectorClient.h" 55 56 #include "InspectorController.h" … … 2252 2253 } 2253 2254 2255 static LayerFlushThrottleState::Flags determineLayerFlushThrottleState(Page& page) 2256 { 2257 // We only throttle when constantly receiving new data during the inital page load. 2258 if (!page.progress().isMainLoadProgressing()) 2259 return 0; 2260 // Disable for image documents so large GIF animations don't get throttled during loading. 2261 auto* document = page.mainFrame().document(); 2262 if (!document || isImageDocument(*document)) 2263 return 0; 2264 return LayerFlushThrottleState::Enabled; 2265 } 2266 2254 2267 void FrameView::disableLayerFlushThrottlingTemporarilyForInteraction() 2255 2268 { 2256 bool mainLoadProgressing = frame().page()->progress().isMainLoadProgressing(); 2257 2258 LayerFlushThrottleState::Flags flags = LayerFlushThrottleState::UserIsInteracting | (mainLoadProgressing ? LayerFlushThrottleState::MainLoadProgressing : 0); 2259 if (frame().page()->chrome().client().adjustLayerFlushThrottling(flags)) 2269 if (!frame().page()) 2270 return; 2271 auto& page = *frame().page(); 2272 2273 LayerFlushThrottleState::Flags flags = LayerFlushThrottleState::UserIsInteracting | determineLayerFlushThrottleState(page); 2274 if (page.chrome().client().adjustLayerFlushThrottling(flags)) 2260 2275 return; 2261 2276 … … 2273 2288 { 2274 2289 ASSERT(frame().isMainFrame()); 2275 2276 bool isMainLoadProgressing = frame().page()->progress().isMainLoadProgressing(); 2290 auto& page = *frame().page(); 2291 2292 LayerFlushThrottleState::Flags flags = determineLayerFlushThrottleState(page); 2277 2293 2278 2294 // See if the client is handling throttling. 2279 LayerFlushThrottleState::Flags flags = isMainLoadProgressing ? LayerFlushThrottleState::MainLoadProgressing : 0; 2280 if (frame().page()->chrome().client().adjustLayerFlushThrottling(flags)) 2295 if (page.chrome().client().adjustLayerFlushThrottling(flags)) 2281 2296 return; 2282 2297 2283 2298 for (Frame* frame = m_frame.get(); frame; frame = frame->tree().traverseNext(m_frame.get())) { 2284 2299 if (RenderView* renderView = frame->contentRenderer()) 2285 renderView->compositor().setLayerFlushThrottlingEnabled( isMainLoadProgressing);2300 renderView->compositor().setLayerFlushThrottlingEnabled(flags & LayerFlushThrottleState::Enabled); 2286 2301 } 2287 2302 } -
trunk/Source/WebCore/page/LayerFlushThrottleState.h
r170557 r170830 31 31 struct LayerFlushThrottleState { 32 32 enum { 33 MainLoadProgressing= 1 << 0,33 Enabled = 1 << 0, 34 34 UserIsInteracting = 1 << 1 35 35 }; -
trunk/Source/WebKit2/ChangeLog
r170814 r170830 1 2014-07-06 Antti Koivisto <antti@apple.com> 2 3 Don't throttle layer flushes when the main resource is a GIF 4 https://bugs.webkit.org/show_bug.cgi?id=134650 5 6 Reviewed by Simon Fraser. 7 8 * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm: 9 (WebKit::RemoteLayerTreeDrawingArea::adjustLayerFlushThrottling): 10 1 11 2014-07-04 Rohit Kumar <kumar.rohit@samsung.com> 2 12 -
trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm
r170787 r170830 275 275 276 276 bool wasThrottlingLayerFlushes = m_isThrottlingLayerFlushes; 277 m_isThrottlingLayerFlushes = flags & WebCore::LayerFlushThrottleState:: MainLoadProgressing;277 m_isThrottlingLayerFlushes = flags & WebCore::LayerFlushThrottleState::Enabled; 278 278 279 279 if (!wasThrottlingLayerFlushes && m_isThrottlingLayerFlushes)
Note: See TracChangeset
for help on using the changeset viewer.