- Revision
- 105497
- Author
- [email protected]
- Date
- 2012-01-20 02:02:53 -0800 (Fri, 20 Jan 2012)
Log Message
[Qt] Trigger forcing accelerated compositing from the UI process side.
https://bugs.webkit.org/show_bug.cgi?id=76296
Reviewed by Noam Rosenthal.
Some messages can be sent from the web view to the LayerTreeHost before
accelerated compositing is entered on the web process and signaled back.
By letting the UI process decide if AC has to be forced, we can create
the LayerTreeHostProxy earlier to send messages to the web process while
AC is being entered there.
This fixes the first visible content rect message not being received when
loading pages from the disk.
* Shared/WebPreferencesStore.h:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::initialize):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::DrawingAreaImpl):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/qt/WebPageQt.cpp:
(WebKit::WebPage::platformInitialize):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (105496 => 105497)
--- trunk/Source/WebKit2/ChangeLog 2012-01-20 09:57:24 UTC (rev 105496)
+++ trunk/Source/WebKit2/ChangeLog 2012-01-20 10:02:53 UTC (rev 105497)
@@ -1,3 +1,31 @@
+2012-01-13 Jocelyn Turcotte <[email protected]>
+
+ [Qt] Trigger forcing accelerated compositing from the UI process side.
+ https://bugs.webkit.org/show_bug.cgi?id=76296
+
+ Reviewed by Noam Rosenthal.
+
+ Some messages can be sent from the web view to the LayerTreeHost before
+ accelerated compositing is entered on the web process and signaled back.
+ By letting the UI process decide if AC has to be forced, we can create
+ the LayerTreeHostProxy earlier to send messages to the web process while
+ AC is being entered there.
+
+ This fixes the first visible content rect message not being received when
+ loading pages from the disk.
+
+ * Shared/WebPreferencesStore.h:
+ * UIProcess/API/qt/qquickwebview.cpp:
+ (QQuickWebViewPrivate::initialize):
+ * UIProcess/DrawingAreaProxyImpl.cpp:
+ (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
+ * WebProcess/WebPage/DrawingAreaImpl.cpp:
+ (WebKit::DrawingAreaImpl::DrawingAreaImpl):
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+ * WebProcess/WebPage/qt/WebPageQt.cpp:
+ (WebKit::WebPage::platformInitialize):
+
2012-01-20 Alexandru Chiculita <[email protected]>
CSS Shaders: Add a Settings flag to enable/disable CSS Shaders at runtime
Modified: trunk/Source/WebKit2/Shared/WebPreferencesStore.h (105496 => 105497)
--- trunk/Source/WebKit2/Shared/WebPreferencesStore.h 2012-01-20 09:57:24 UTC (rev 105496)
+++ trunk/Source/WebKit2/Shared/WebPreferencesStore.h 2012-01-20 10:02:53 UTC (rev 105497)
@@ -66,6 +66,7 @@
macro(HyperlinkAuditingEnabled, hyperlinkAuditingEnabled, Bool, bool, true) \
macro(NeedsSiteSpecificQuirks, needsSiteSpecificQuirks, Bool, bool, false) \
macro(AcceleratedCompositingEnabled, acceleratedCompositingEnabled, Bool, bool, true) \
+ macro(ForceCompositingMode, forceCompositingMode, Bool, bool, true) \
macro(AcceleratedDrawingEnabled, acceleratedDrawingEnabled, Bool, bool, false) \
macro(CanvasUsesAcceleratedDrawing, canvasUsesAcceleratedDrawing, Bool, bool, true) \
macro(CompositingBordersVisible, compositingBordersVisible, Bool, bool, false) \
Modified: trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp (105496 => 105497)
--- trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp 2012-01-20 09:57:24 UTC (rev 105496)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp 2012-01-20 10:02:53 UTC (rev 105497)
@@ -105,6 +105,7 @@
// Any page setting should preferrable be set before creating the page.
setUseTraditionalDesktopBehaviour(false);
webPageProxy->pageGroup()->preferences()->setAcceleratedCompositingEnabled(true);
+ webPageProxy->pageGroup()->preferences()->setForceCompositingMode(true);
pageClient.initialize(q_ptr, pageViewPrivate->eventHandler.data(), &undoController);
webPageProxy->initializeWebPage();
Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp (105496 => 105497)
--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp 2012-01-20 09:57:24 UTC (rev 105496)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp 2012-01-20 10:02:53 UTC (rev 105497)
@@ -30,7 +30,9 @@
#include "DrawingAreaProxyMessages.h"
#include "LayerTreeContext.h"
#include "UpdateInfo.h"
+#include "WebPageGroup.h"
#include "WebPageProxy.h"
+#include "WebPreferences.h"
#include "WebProcessProxy.h"
#include <WebCore/Region.h>
@@ -56,6 +58,11 @@
, m_isBackingStoreDiscardable(true)
, m_discardBackingStoreTimer(RunLoop::current(), this, &DrawingAreaProxyImpl::discardBackingStore)
{
+#if USE(TEXTURE_MAPPER)
+ // Construct the proxy early to allow messages to be sent to the web process while AC is entered there.
+ if (webPageProxy->pageGroup()->preferences()->forceCompositingMode())
+ m_layerTreeHostProxy = adoptPtr(new LayerTreeHostProxy(this));
+#endif
}
DrawingAreaProxyImpl::~DrawingAreaProxyImpl()
Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp (105496 => 105497)
--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp 2012-01-20 09:57:24 UTC (rev 105496)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp 2012-01-20 10:02:53 UTC (rev 105497)
@@ -68,7 +68,7 @@
, m_displayTimer(WebProcess::shared().runLoop(), this, &DrawingAreaImpl::displayTimerFired)
, m_exitCompositingTimer(WebProcess::shared().runLoop(), this, &DrawingAreaImpl::exitAcceleratedCompositingMode)
{
- if (webPage->corePage()->settings()->acceleratedDrawingEnabled())
+ if (webPage->corePage()->settings()->acceleratedDrawingEnabled() || webPage->corePage()->settings()->forceCompositingMode())
m_alwaysUseCompositing = true;
if (m_alwaysUseCompositing)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (105496 => 105497)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2012-01-20 09:57:24 UTC (rev 105496)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2012-01-20 10:02:53 UTC (rev 105497)
@@ -1838,6 +1838,7 @@
settings->setShowsToolTipOverTruncatedText(store.getBoolValueForKey(WebPreferencesKey::showsToolTipOverTruncatedTextKey()));
settings->setAcceleratedCompositingEnabled(store.getBoolValueForKey(WebPreferencesKey::acceleratedCompositingEnabledKey()) && LayerTreeHost::supportsAcceleratedCompositing());
+ settings->setForceCompositingMode(store.getBoolValueForKey(WebPreferencesKey::forceCompositingModeKey()) && LayerTreeHost::supportsAcceleratedCompositing());
settings->setAcceleratedDrawingEnabled(store.getBoolValueForKey(WebPreferencesKey::acceleratedDrawingEnabledKey()) && LayerTreeHost::supportsAcceleratedCompositing());
settings->setCanvasUsesAcceleratedDrawing(store.getBoolValueForKey(WebPreferencesKey::canvasUsesAcceleratedDrawingKey()) && LayerTreeHost::supportsAcceleratedCompositing());
settings->setShowDebugBorders(store.getBoolValueForKey(WebPreferencesKey::compositingBordersVisibleKey()));
Modified: trunk/Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp (105496 => 105497)
--- trunk/Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp 2012-01-20 09:57:24 UTC (rev 105496)
+++ trunk/Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp 2012-01-20 10:02:53 UTC (rev 105497)
@@ -90,10 +90,6 @@
void WebPage::platformInitialize()
{
- Settings* settings = m_page->settings();
-
- // If accelerated compositing is enabled, we want to be in force-compositing mode, so that we don't switch between composited/non-composited state.
- settings->setForceCompositingMode(true);
}
void WebPage::platformPreferencesDidChange(const WebPreferencesStore&)