Title: [127952] trunk/Source
Revision
127952
Author
[email protected]
Date
2012-09-07 18:32:53 -0700 (Fri, 07 Sep 2012)

Log Message

[chromium] Remove transitional WebCompositorSupport fallback code
https://bugs.webkit.org/show_bug.cgi?id=96155

Reviewed by Adrienne Walker.

Source/WebCore:

The implementation of WebCompositorSupport has rolled out everywhere and the static ::create() functions are
going way.

* page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
(WebCore::createScrollbarLayer):
* platform/graphics/chromium/AnimationTranslationUtil.cpp:
(WebCore::createWebAnimation):
* platform/graphics/chromium/Canvas2DLayerBridge.cpp:
(WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
* platform/graphics/chromium/DrawingBufferChromium.cpp:
(WebCore::DrawingBufferPrivate::DrawingBufferPrivate):
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::GraphicsLayerChromium):
(WebCore::GraphicsLayerChromium::setContentsToImage):
(WebCore::GraphicsLayerChromium::updateLayerPreserves3D):

Source/WebKit/chromium:

* src/LinkHighlight.cpp:
(WebKit::LinkHighlight::LinkHighlight):
(WebKit::LinkHighlight::startHighlightAnimation):
* src/WebMediaPlayerClientImpl.cpp:
(WebKit::WebMediaPlayerClientImpl::readyStateChanged):
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::setBackingTextureId):
(WebKit::WebPluginContainerImpl::setBackingIOSurfaceId):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
(WebKit):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (127951 => 127952)


--- trunk/Source/WebCore/ChangeLog	2012-09-08 01:30:41 UTC (rev 127951)
+++ trunk/Source/WebCore/ChangeLog	2012-09-08 01:32:53 UTC (rev 127952)
@@ -1,3 +1,26 @@
+2012-09-07  James Robinson  <[email protected]>
+
+        [chromium] Remove transitional WebCompositorSupport fallback code
+        https://bugs.webkit.org/show_bug.cgi?id=96155
+
+        Reviewed by Adrienne Walker.
+
+        The implementation of WebCompositorSupport has rolled out everywhere and the static ::create() functions are
+        going way.
+
+        * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
+        (WebCore::createScrollbarLayer):
+        * platform/graphics/chromium/AnimationTranslationUtil.cpp:
+        (WebCore::createWebAnimation):
+        * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
+        (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
+        * platform/graphics/chromium/DrawingBufferChromium.cpp:
+        (WebCore::DrawingBufferPrivate::DrawingBufferPrivate):
+        * platform/graphics/chromium/GraphicsLayerChromium.cpp:
+        (WebCore::GraphicsLayerChromium::GraphicsLayerChromium):
+        (WebCore::GraphicsLayerChromium::setContentsToImage):
+        (WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
+
 2012-09-07  Simon Hausmann  <[email protected]>
 
         Fix compilation of TextureMapperShaderManager.cpp with MSVC

Modified: trunk/Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp (127951 => 127952)


--- trunk/Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp	2012-09-08 01:30:41 UTC (rev 127951)
+++ trunk/Source/WebCore/page/scrolling/chromium/ScrollingCoordinatorChromium.cpp	2012-09-08 01:32:53 UTC (rev 127952)
@@ -37,6 +37,8 @@
 #include "ScrollbarThemeComposite.h"
 #include "WebScrollbarImpl.h"
 #include "WebScrollbarThemeGeometryNative.h"
+#include <public/Platform.h>
+#include <public/WebCompositorSupport.h>
 #include <public/WebScrollbar.h>
 #include <public/WebScrollbarLayer.h>
 #include <public/WebScrollbarThemeGeometry.h>
@@ -161,7 +163,7 @@
     WebKit::WebScrollbarThemePainter painter(themeComposite, scrollbar);
     OwnPtr<WebKit::WebScrollbarThemeGeometry> geometry(WebKit::WebScrollbarThemeGeometryNative::create(themeComposite));
 
-    OwnPtr<WebScrollbarLayer> scrollbarLayer = adoptPtr(WebScrollbarLayer::create(new WebKit::WebScrollbarImpl(scrollbar), painter, geometry.leakPtr()));
+    OwnPtr<WebScrollbarLayer> scrollbarLayer = adoptPtr(WebKit::Platform::current()->compositorSupport()->createScrollbarLayer(new WebKit::WebScrollbarImpl(scrollbar), painter, geometry.leakPtr()));
     scrollbarLayer->setScrollLayer(scrollLayer);
 
     GraphicsLayerChromium::registerContentsLayer(scrollbarLayer->layer());

Modified: trunk/Source/WebCore/platform/graphics/chromium/AnimationTranslationUtil.cpp (127951 => 127952)


--- trunk/Source/WebCore/platform/graphics/chromium/AnimationTranslationUtil.cpp	2012-09-08 01:30:41 UTC (rev 127951)
+++ trunk/Source/WebCore/platform/graphics/chromium/AnimationTranslationUtil.cpp	2012-09-08 01:32:53 UTC (rev 127952)
@@ -251,11 +251,7 @@
             return nullptr;
     }
 
-    OwnPtr<WebKit::WebAnimation> webAnimation;
-    if (WebCompositorSupport* compositorSupport = WebKit::Platform::current()->compositorSupport())
-        webAnimation = adoptPtr(compositorSupport->createAnimation(*curve, targetProperty, animationId));
-    else
-        webAnimation = adoptPtr(WebKit::WebAnimation::create(*curve, targetProperty, animationId));
+    OwnPtr<WebKit::WebAnimation> webAnimation = adoptPtr(Platform::current()->compositorSupport()->createAnimation(*curve, targetProperty, animationId));
 
     int iterations = (animation && animation->isIterationCountSet()) ? animation->iterationCount() : 1;
     webAnimation->setIterations(iterations);
@@ -272,20 +268,12 @@
 
 
     if (values.property() == AnimatedPropertyWebkitTransform) {
-        OwnPtr<WebTransformAnimationCurve> curve;
-        if (WebCompositorSupport* compositorSupport = WebKit::Platform::current()->compositorSupport())
-            curve = adoptPtr(compositorSupport->createTransformAnimationCurve());
-        else
-            curve = adoptPtr(WebTransformAnimationCurve::create());
+        OwnPtr<WebTransformAnimationCurve> curve = adoptPtr(Platform::current()->compositorSupport()->createTransformAnimationCurve());
         return createWebAnimation<TransformAnimationValue, WebTransformKeyframe, WebTransformAnimationCurve>(values, animation, animationId, timeOffset, curve.get(), WebKit::WebAnimation::TargetPropertyTransform, FloatSize(boxSize));
     }
 
     if (values.property() == AnimatedPropertyOpacity) {
-        OwnPtr<WebFloatAnimationCurve> curve;
-        if (WebCompositorSupport* compositorSupport = WebKit::Platform::current()->compositorSupport())
-            curve = adoptPtr(compositorSupport->createFloatAnimationCurve());
-        else
-            curve = adoptPtr(WebFloatAnimationCurve::create());
+        OwnPtr<WebFloatAnimationCurve> curve = adoptPtr(Platform::current()->compositorSupport()->createFloatAnimationCurve());
         return createWebAnimation<FloatAnimationValue, WebFloatKeyframe, WebFloatAnimationCurve>(values, animation, animationId, timeOffset, curve.get(), WebKit::WebAnimation::TargetPropertyOpacity, FloatSize());
     }
 

Modified: trunk/Source/WebCore/platform/graphics/chromium/Canvas2DLayerBridge.cpp (127951 => 127952)


--- trunk/Source/WebCore/platform/graphics/chromium/Canvas2DLayerBridge.cpp	2012-09-08 01:30:41 UTC (rev 127951)
+++ trunk/Source/WebCore/platform/graphics/chromium/Canvas2DLayerBridge.cpp	2012-09-08 01:32:53 UTC (rev 127952)
@@ -77,11 +77,7 @@
             grContext->resetContext();
     }
 
-    if (WebKit::WebCompositorSupport* compositorSupport = WebKit::Platform::current()->compositorSupport())
-        m_layer = adoptPtr(compositorSupport->createExternalTextureLayer(this));
-    else
-        m_layer = adoptPtr(WebKit::WebExternalTextureLayer::create(this));
-
+    m_layer = adoptPtr(WebKit::Platform::current()->compositorSupport()->createExternalTextureLayer(this));
     m_layer->setTextureId(textureId);
     m_layer->setRateLimitContext(!compositorThreadingEnabled || m_useDoubleBuffering);
     GraphicsLayerChromium::registerContentsLayer(m_layer->layer());

Modified: trunk/Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp (127951 => 127952)


--- trunk/Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp	2012-09-08 01:30:41 UTC (rev 127951)
+++ trunk/Source/WebCore/platform/graphics/chromium/DrawingBufferChromium.cpp	2012-09-08 01:32:53 UTC (rev 127952)
@@ -166,11 +166,8 @@
 public:
     explicit DrawingBufferPrivate(DrawingBuffer* drawingBuffer)
         : m_drawingBuffer(drawingBuffer)
+        , m_layer(adoptPtr(WebKit::Platform::current()->compositorSupport()->createExternalTextureLayer(this)))
     {
-        if (WebKit::WebCompositorSupport* compositorSupport = WebKit::Platform::current()->compositorSupport())
-            m_layer = adoptPtr(compositorSupport->createExternalTextureLayer(this));
-        else
-            m_layer = adoptPtr(WebKit::WebExternalTextureLayer::create(this));
 
         GraphicsContext3D::Attributes attributes = m_drawingBuffer->graphicsContext3D()->getContextAttributes();
         m_layer->setOpaque(!attributes.alpha);

Modified: trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp (127951 => 127952)


--- trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp	2012-09-08 01:30:41 UTC (rev 127951)
+++ trunk/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp	2012-09-08 01:32:53 UTC (rev 127952)
@@ -93,12 +93,7 @@
     , m_scrollableArea(0)
 {
     m_opaqueRectTrackingContentLayerDelegate = adoptPtr(new OpaqueRectTrackingContentLayerDelegate(this));
-
-    if (WebCompositorSupport* compositorSupport = Platform::current()->compositorSupport())
-        m_layer = adoptPtr(compositorSupport->createContentLayer(m_opaqueRectTrackingContentLayerDelegate.get()));
-    else
-        m_layer = adoptPtr(WebContentLayer::create(m_opaqueRectTrackingContentLayerDelegate.get()));
-
+    m_layer = adoptPtr(Platform::current()->compositorSupport()->createContentLayer(m_opaqueRectTrackingContentLayerDelegate.get()));
     m_layer->layer()->setDrawsContent(m_drawsContent && m_contentsVisible);
     m_layer->layer()->setScrollClient(this);
     updateDebugIndicators();
@@ -466,10 +461,7 @@
     bool childrenChanged = false;
     if (image) {
         if (m_contentsLayerPurpose != ContentsLayerForImage) {
-            if (WebCompositorSupport* compositorSupport = Platform::current()->compositorSupport())
-                m_imageLayer = adoptPtr(compositorSupport->createImageLayer());
-            else
-                m_imageLayer = adoptPtr(WebImageLayer::create());
+            m_imageLayer = adoptPtr(Platform::current()->compositorSupport()->createImageLayer());
             registerContentsLayer(m_imageLayer->layer());
 
             setupContentsLayer(m_imageLayer->layer());
@@ -722,11 +714,7 @@
 void GraphicsLayerChromium::updateLayerPreserves3D()
 {
     if (m_preserves3D && !m_transformLayer) {
-        if (WebCompositorSupport* compositorSupport = Platform::current()->compositorSupport())
-            m_transformLayer = adoptPtr(compositorSupport->createLayer());
-        else
-            m_transformLayer = adoptPtr(WebLayer::create());
-
+        m_transformLayer = adoptPtr(Platform::current()->compositorSupport()->createLayer());
         m_transformLayer->setPreserves3D(true);
         m_transformLayer->setAnimationDelegate(this);
         m_layer->layer()->transferAnimationsTo(m_transformLayer.get());

Modified: trunk/Source/WebKit/chromium/ChangeLog (127951 => 127952)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-09-08 01:30:41 UTC (rev 127951)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-09-08 01:32:53 UTC (rev 127952)
@@ -1,5 +1,24 @@
 2012-09-07  James Robinson  <[email protected]>
 
+        [chromium] Remove transitional WebCompositorSupport fallback code
+        https://bugs.webkit.org/show_bug.cgi?id=96155
+
+        Reviewed by Adrienne Walker.
+
+        * src/LinkHighlight.cpp:
+        (WebKit::LinkHighlight::LinkHighlight):
+        (WebKit::LinkHighlight::startHighlightAnimation):
+        * src/WebMediaPlayerClientImpl.cpp:
+        (WebKit::WebMediaPlayerClientImpl::readyStateChanged):
+        * src/WebPluginContainerImpl.cpp:
+        (WebKit::WebPluginContainerImpl::setBackingTextureId):
+        (WebKit::WebPluginContainerImpl::setBackingIOSurfaceId):
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+        (WebKit):
+
+2012-09-07  James Robinson  <[email protected]>
+
         [chromium] Implement WebCompositorInputHandlerImpl on top of exposed API instead of CC internals
         https://bugs.webkit.org/show_bug.cgi?id=96151
 

Modified: trunk/Source/WebKit/chromium/src/LinkHighlight.cpp (127951 => 127952)


--- trunk/Source/WebKit/chromium/src/LinkHighlight.cpp	2012-09-08 01:30:41 UTC (rev 127951)
+++ trunk/Source/WebKit/chromium/src/LinkHighlight.cpp	2012-09-08 01:32:53 UTC (rev 127952)
@@ -68,13 +68,9 @@
 {
     ASSERT(m_node);
     ASSERT(owningWebViewImpl);
-    if (WebCompositorSupport* compositorSupport = Platform::current()->compositorSupport()) {
-        m_contentLayer = adoptPtr(compositorSupport->createContentLayer(this));
-        m_clipLayer = adoptPtr(compositorSupport->createLayer());
-    } else {
-        m_contentLayer = adoptPtr(WebContentLayer::create(this));
-        m_clipLayer = adoptPtr(WebLayer::create());
-    }
+    WebCompositorSupport* compositorSupport = Platform::current()->compositorSupport();
+    m_contentLayer = adoptPtr(compositorSupport->createContentLayer(this));
+    m_clipLayer = adoptPtr(compositorSupport->createLayer());
     m_clipLayer->setAnchorPoint(WebFloatPoint());
     m_clipLayer->addChild(m_contentLayer->layer());
     m_contentLayer->layer()->setDrawsContent(false);
@@ -208,21 +204,14 @@
 
     WebCompositorSupport* compositorSupport = Platform::current()->compositorSupport();
 
-    OwnPtr<WebFloatAnimationCurve> curve;
-    if (compositorSupport)
-        curve = adoptPtr(compositorSupport->createFloatAnimationCurve());
-    else
-        curve = adoptPtr(WebFloatAnimationCurve::create());
+    OwnPtr<WebFloatAnimationCurve> curve = adoptPtr(compositorSupport->createFloatAnimationCurve());
 
     curve->add(WebFloatKeyframe(0, startOpacity));
     curve->add(WebFloatKeyframe(duration / 2, startOpacity));
     // For layout tests we don't fade out.
     curve->add(WebFloatKeyframe(duration, WebKit::layoutTestMode() ? startOpacity : 0));
 
-    if (compositorSupport)
-        m_animation = adoptPtr(compositorSupport->createAnimation(*curve, WebAnimation::TargetPropertyOpacity));
-    else
-        m_animation = adoptPtr(WebAnimation::create(*curve, WebAnimation::TargetPropertyOpacity));
+    m_animation = adoptPtr(compositorSupport->createAnimation(*curve, WebAnimation::TargetPropertyOpacity));
 
     m_contentLayer->layer()->setDrawsContent(true);
     m_contentLayer->layer()->addAnimation(m_animation.get());

Modified: trunk/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp (127951 => 127952)


--- trunk/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp	2012-09-08 01:30:41 UTC (rev 127951)
+++ trunk/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp	2012-09-08 01:32:53 UTC (rev 127952)
@@ -118,10 +118,7 @@
     m_mediaPlayer->readyStateChanged();
 #if USE(ACCELERATED_COMPOSITING)
     if (hasVideo() && supportsAcceleratedRendering() && !m_videoLayer) {
-        if (WebCompositorSupport* compositorSupport = Platform::current()->compositorSupport())
-            m_videoLayer = adoptPtr(compositorSupport->createVideoLayer(this));
-        else
-            m_videoLayer = adoptPtr(WebVideoLayer::create(this));
+        m_videoLayer = adoptPtr(Platform::current()->compositorSupport()->createVideoLayer(this));
 
         m_videoLayer->layer()->setOpaque(m_opaque);
         GraphicsLayerChromium::registerContentsLayer(m_videoLayer->layer());

Modified: trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp (127951 => 127952)


--- trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp	2012-09-08 01:30:41 UTC (rev 127951)
+++ trunk/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp	2012-09-08 01:32:53 UTC (rev 127952)
@@ -372,10 +372,7 @@
     ASSERT(!m_ioSurfaceLayer);
 
     if (!m_textureLayer) {
-        if (WebCompositorSupport* compositorSupport = Platform::current()->compositorSupport())
-            m_textureLayer = adoptPtr(compositorSupport->createExternalTextureLayer());
-        else
-            m_textureLayer = adoptPtr(WebExternalTextureLayer::create());
+        m_textureLayer = adoptPtr(Platform::current()->compositorSupport()->createExternalTextureLayer());
         GraphicsLayerChromium::registerContentsLayer(m_textureLayer->layer());
     }
     m_textureLayer->setTextureId(textureId);
@@ -401,10 +398,7 @@
     ASSERT(!m_textureLayer);
 
     if (!m_ioSurfaceLayer) {
-        if (WebCompositorSupport* compositorSupport = Platform::current()->compositorSupport())
-            m_ioSurfaceLayer = adoptPtr(compositorSupport->createIOSurfaceLayer());
-        else
-            m_ioSurfaceLayer = adoptPtr(WebIOSurfaceLayer::create());
+        m_ioSurfaceLayer = adoptPtr(Platform::current()->compositorSupport()->createIOSurfaceLayer());
         GraphicsLayerChromium::registerContentsLayer(m_ioSurfaceLayer->layer());
     }
     m_ioSurfaceLayer->setIOSurfaceProperties(ioSurfaceId, WebSize(width, height));

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (127951 => 127952)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-09-08 01:30:41 UTC (rev 127951)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-09-08 01:32:53 UTC (rev 127952)
@@ -3792,7 +3792,7 @@
         m_nonCompositedContentHost->setShowDebugBorders(page()->settings()->showDebugBorders());
         m_nonCompositedContentHost->setOpaque(!isTransparent());
 
-        m_layerTreeView = adoptPtr(WebLayerTreeView::create(this, *m_rootLayer, layerTreeViewSettings));
+        m_layerTreeView = adoptPtr(Platform::current()->compositorSupport()->createLayerTreeView(this, *m_rootLayer, layerTreeViewSettings));
         if (m_layerTreeView) {
             if (m_webSettings->applyDefaultDeviceScaleFactorInCompositor() && page()->deviceScaleFactor() != 1) {
                 ASSERT(page()->deviceScaleFactor());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to