Changeset 57961 in webkit
- Timestamp:
- Apr 21, 2010 3:09:48 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r57959 r57961 1 2010-04-21 No'am Rosenthal <noam.rosenthal@nokia.com> 2 3 Reviewed by Simon Fraser. 4 5 [Qt] Fix or remove the runtime flag for accelerated compositing. 6 7 This adds a way for a chrome client to disallow layers from becoming composited, 8 even if the settings enable accelerated compositing. This is necessary for platforms 9 where different views can be applied with the same settings to the same page. 10 11 We enable an API through ChromeClient to ask the chrome-client whether or not 12 it can render composited layers, which is taken into account when the compositor 13 decides whether or not to start compositing. 14 15 https://bugs.webkit.org/show_bug.cgi?id=37313 16 17 Pages under LayoutTests/compositing now work under QWebView, even when 18 QWebSettings::AcceleratedCompositingEnabled is on. 19 20 * page/ChromeClient.h: 21 (WebCore::ChromeClient::allowsAcceleratedCompositing): 22 * platform/qt/QWebPageClient.h: 23 (QWebPageClient::allowsAcceleratedCompositing): 24 * rendering/RenderLayerCompositor.cpp: 25 (WebCore::RenderLayerCompositor::canBeComposited): 26 1 27 2010-04-21 Ryosuke Niwa <rniwa@webkit.org> 2 28 -
trunk/WebCore/page/ChromeClient.h
r57903 r57961 215 215 // to do an eager layout before the drawing. 216 216 virtual void scheduleCompositingLayerSync() = 0; 217 // Returns whether or not the client can render the composited layer, 218 // regardless of the settings. 219 virtual bool allowsAcceleratedCompositing() const { return true; } 217 220 #endif 218 221 -
trunk/WebCore/platform/qt/QWebPageClient.h
r56552 r57961 56 56 // we wait for the next update and sync the layers then. 57 57 virtual void markForSync(bool scheduleSync = false) {} 58 virtual bool allowsAcceleratedCompositing() const { return false; } 58 59 #endif 59 60 -
trunk/WebCore/rendering/RenderLayerCompositor.cpp
r57919 r57961 135 135 } 136 136 137 // We allow the chrome to override the settings, in case the page is rendered 138 // on a chrome that doesn't allow accelerated compositing. 139 if (hasAcceleratedCompositing) { 140 Frame* frame = m_renderView->frameView()->frame(); 141 Page* page = frame ? frame->page() : 0; 142 if (page) 143 hasAcceleratedCompositing = page->chrome()->client()->allowsAcceleratedCompositing(); 144 } 145 137 146 if (hasAcceleratedCompositing != m_hasAcceleratedCompositing || showDebugBorders != m_showDebugBorders || showRepaintCounter != m_showRepaintCounter) 138 147 setCompositingLayersNeedRebuild(); -
trunk/WebKit/qt/Api/qgraphicswebview.cpp
r57327 r57961 123 123 virtual void markForSync(bool scheduleSync); 124 124 void updateCompositingScrollPosition(); 125 126 // QGraphicsWebView can render composited layers 127 virtual bool allowsAcceleratedCompositing() const { return true; } 125 128 #endif 126 129 -
trunk/WebKit/qt/Api/qwebview.cpp
r57327 r57961 416 416 connect(d->page, SIGNAL(destroyed()), 417 417 this, SLOT(_q_pageDestroyed())); 418 #if USE(ACCELERATED_COMPOSITING)419 d->page->d->page->settings()->setAcceleratedCompositingEnabled(false);420 #endif421 418 } 422 419 setAttribute(Qt::WA_OpaquePaintEvent, d->page); -
trunk/WebKit/qt/ChangeLog
r57931 r57961 1 2010-04-21 No'am Rosenthal <noam.rosenthal@nokia.com> 2 3 Reviewed by Simon Fraser. 4 5 [Qt] Fix or remove the runtime flag for accelerated compositing. 6 https://bugs.webkit.org/show_bug.cgi?id=37313 7 8 This lets the QWebPageClient "veto" the settings value for accelerated compositing. 9 In this case we allow accelerated compositing only on QGraphicsWebView. 10 11 * Api/qgraphicswebview.cpp: 12 (QGraphicsWebViewPrivate::allowsAcceleratedCompositing): 13 * WebCoreSupport/ChromeClientQt.cpp: 14 (WebCore::ChromeClientQt::allowsAcceleratedCompositing): 15 * WebCoreSupport/ChromeClientQt.h: 16 1 17 2010-04-20 Adam Barth <abarth@webkit.org> 2 18 -
trunk/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
r57903 r57961 555 555 platformPageClient()->markForSync(true); 556 556 } 557 558 bool ChromeClientQt::allowsAcceleratedCompositing() const 559 { 560 return (platformPageClient() && platformPageClient()->allowsAcceleratedCompositing()); 561 } 562 557 563 #endif 558 564 -
trunk/WebKit/qt/WebCoreSupport/ChromeClientQt.h
r57903 r57961 142 142 virtual void setNeedsOneShotDrawingSynchronization(); 143 143 virtual void scheduleCompositingLayerSync(); 144 virtual bool allowsAcceleratedCompositing() const; 144 145 #endif 145 146
Note: See TracChangeset
for help on using the changeset viewer.