Changeset 148439 in webkit
- Timestamp:
- Apr 15, 2013, 8:28:19 AM (12 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r148434 r148439 1 2013-04-15 Seulgi Kim <seulgikim@company100.net> 2 3 Schedule rendering at regular interval (60fps) 4 https://bugs.webkit.org/show_bug.cgi?id=114617 5 6 Reviewed by Martin Robinson. 7 8 Schedule rendering reguarly regardless of the time taken to render a 9 frame. Otherwise, next flush delayed by the amount of the rendering 10 time. 11 12 * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: 13 (WebKit::LayerTreeHostGtk::LayerTreeHostGtk): 14 (WebKit::LayerTreeHostGtk::layerFlushTimerFired): 15 (WebKit::LayerTreeHostGtk::flushAndRenderLayers): 16 * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: 17 1 18 2013-04-15 Michał Pakuła vel Rutka <m.pakula@samsung.com> 2 19 -
trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp
r146637 r148439 72 72 , m_isValid(true) 73 73 , m_notifyAfterScheduledLayerFlush(false) 74 , m_lastFlushTime(0) 74 75 , m_layerFlushSchedulingEnabled(true) 75 76 , m_layerFlushTimerCallbackId(0) … … 302 303 flushAndRenderLayers(); 303 304 304 if (toTextureMapperLayer(m_rootLayer.get())->descendantsOrSelfHaveRunningAnimations() && !m_layerFlushTimerCallbackId) 305 m_layerFlushTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, 1000.0 / 60.0, reinterpret_cast<GSourceFunc>(layerFlushTimerFiredCallback), this, 0); 305 if (toTextureMapperLayer(m_rootLayer.get())->descendantsOrSelfHaveRunningAnimations() && !m_layerFlushTimerCallbackId) { 306 const double targetFPS = 60; 307 double nextFlush = std::max((1 / targetFPS) - (currentTime() - m_lastFlushTime), 0.0); 308 m_layerFlushTimerCallbackId = g_timeout_add_full(GDK_PRIORITY_EVENTS, nextFlush * 1000.0, reinterpret_cast<GSourceFunc>(layerFlushTimerFiredCallback), this, 0); 309 } 306 310 } 307 311 … … 359 363 return; 360 364 365 m_lastFlushTime = currentTime(); 361 366 // Our model is very simple. We always composite and render the tree immediately after updating it. 362 367 compositeLayersToContext(); -
trunk/Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.h
r146207 r148439 105 105 OwnPtr<WebCore::TextureMapper> m_textureMapper; 106 106 OwnPtr<WebCore::GLContext> m_context; 107 double m_lastFlushTime; 107 108 bool m_layerFlushSchedulingEnabled; 108 109 unsigned m_layerFlushTimerCallbackId;
Note:
See TracChangeset
for help on using the changeset viewer.