Changeset 127672 in webkit
- Timestamp:
- Sep 5, 2012 6:16:45 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/Platform/ChangeLog
r127623 r127672 1 2012-09-05 James Robinson <jamesr@chromium.org> 2 3 [chromium] Move static WebCompositor functions to WebCompositorSupport 4 https://bugs.webkit.org/show_bug.cgi?id=95785 5 6 Reviewed by Darin Fisher. 7 8 The statics on WebCompositor need to be moved to WebCompositorSupport so the embedder can inject an 9 implementation for these via PlatformSupport. This adds the interface for the statics to WebCompositorSupport. 10 After an implementation of these lands on the chromium side, I'll switch all callers over to use these and 11 remove the WebCompositor interface from the API. 12 13 * chromium/public/WebCompositorSupport.h: 14 (WebCompositorSupport): 15 (WebKit::WebCompositorSupport::initialize): 16 (WebKit::WebCompositorSupport::threadingEnabled): 17 (WebKit::WebCompositorSupport::shutdown): 18 (WebKit::WebCompositorSupport::setPerTilePaintingEnabled): 19 (WebKit::WebCompositorSupport::setPartialSwapEnabled): 20 (WebKit::WebCompositorSupport::setAcceleratedAnimationEnabled): 21 1 22 2012-09-05 Mark Pilgrim <pilgrim@chromium.org> 2 23 -
trunk/Source/Platform/chromium/public/WebCompositor.h
r125339 r127672 45 45 46 46 // Returns whether the compositor was initialized with threading enabled. 47 WEBKIT_EXPORT static bool threadingEnabled();47 WEBKIT_EXPORT static bool isThreadingEnabled(); 48 48 49 49 // Shuts down the compositor. This must be called when all compositor data -
trunk/Source/Platform/chromium/public/WebCompositorSupport.h
r127225 r127672 47 47 class WebScrollbarThemeGeometry; 48 48 class WebSolidColorLayer; 49 class WebThread; 49 50 class WebTransformAnimationCurve; 50 51 class WebVideoFrameProvider; … … 53 54 class WebCompositorSupport { 54 55 public: 56 // Initializes the compositor. Threaded compositing is enabled by passing in 57 // a non-null WebThread. No compositor classes or methods should be used 58 // prior to calling initialize. 59 virtual void initialize(WebThread*) { } 60 61 // Returns whether the compositor was initialized with threading enabled. 62 virtual bool isThreadingEnabled() { return false; } 63 64 // Shuts down the compositor. This must be called when all compositor data 65 // types have been deleted. No compositor classes or methods should be used 66 // after shutdown. 67 virtual void shutdown() { } 68 69 // These may only be called before initialize. 70 virtual void setPerTilePaintingEnabled(bool) { } 71 virtual void setPartialSwapEnabled(bool) { } 72 virtual void setAcceleratedAnimationEnabled(bool) { } 73 55 74 // May return 0 if initialization fails. 56 75 virtual WebLayerTreeView* createLayerTreeView(WebLayerTreeViewClient*, const WebLayer& root, const WebLayerTreeView::Settings&) { return 0; } -
trunk/Source/WebCore/platform/chromium/support/WebCompositorImpl.cpp
r125932 r127672 48 48 } 49 49 50 bool WebCompositor:: threadingEnabled()50 bool WebCompositor::isThreadingEnabled() 51 51 { 52 return WebCompositorImpl:: threadingEnabled();52 return WebCompositorImpl::isThreadingEnabled(); 53 53 } 54 54 … … 91 91 } 92 92 93 bool WebCompositorImpl:: threadingEnabled()93 bool WebCompositorImpl::isThreadingEnabled() 94 94 { 95 95 return s_implThread; -
trunk/Source/WebCore/platform/chromium/support/WebCompositorImpl.h
r125339 r127672 50 50 friend class WebCompositor; 51 51 static void initialize(WebThread* implThread); 52 static bool threadingEnabled();52 static bool isThreadingEnabled(); 53 53 static void shutdown(); 54 54 -
trunk/Source/WebCore/platform/graphics/chromium/Canvas2DLayerBridge.cpp
r127225 r127672 52 52 // on GPU resource monitoring and other factors to chose between single 53 53 // and double buffering. 54 , m_useDoubleBuffering(WebKit::WebCompositor:: threadingEnabled() && deferralMode == NonDeferred)54 , m_useDoubleBuffering(WebKit::WebCompositor::isThreadingEnabled() && deferralMode == NonDeferred) 55 55 , m_frontBufferTexture(0) 56 56 , m_backBufferTexture(textureId) … … 83 83 84 84 m_layer->setTextureId(textureId); 85 m_layer->setRateLimitContext(!WebKit::WebCompositor:: threadingEnabled() || m_useDoubleBuffering);85 m_layer->setRateLimitContext(!WebKit::WebCompositor::isThreadingEnabled() || m_useDoubleBuffering); 86 86 GraphicsLayerChromium::registerContentsLayer(m_layer->layer()); 87 87 } -
trunk/Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp
r127225 r127672 85 85 , m_colorBuffer(0) 86 86 , m_frontColorBuffer(0) 87 , m_separateFrontTexture(m_preserveDrawingBuffer == Preserve || WebKit::WebCompositor:: threadingEnabled())87 , m_separateFrontTexture(m_preserveDrawingBuffer == Preserve || WebKit::WebCompositor::isThreadingEnabled()) 88 88 , m_depthStencilBuffer(0) 89 89 , m_depthBuffer(0) -
trunk/Source/WebKit/chromium/src/WebViewImpl.cpp
r127494 r127672 1819 1819 { 1820 1820 #if USE(ACCELERATED_COMPOSITING) 1821 if (WebCompositor:: threadingEnabled())1821 if (WebCompositor::isThreadingEnabled()) 1822 1822 m_layerTreeView->setNeedsRedraw(); 1823 1823 else { … … 3735 3735 { 3736 3736 if (isAcceleratedCompositingActive()) { 3737 if (WebCompositor:: threadingEnabled()) {3737 if (WebCompositor::isThreadingEnabled()) { 3738 3738 ASSERT(m_layerTreeView); 3739 3739 m_layerTreeView->setNeedsAnimate(); … … 3968 3968 void WebViewImpl::scheduleComposite() 3969 3969 { 3970 ASSERT(!WebCompositor:: threadingEnabled());3970 ASSERT(!WebCompositor::isThreadingEnabled()); 3971 3971 m_client->scheduleComposite(); 3972 3972 }
Note: See TracChangeset
for help on using the changeset viewer.