Changeset 142143 in webkit


Ignore:
Timestamp:
Feb 7, 2013 9:51:49 AM (11 years ago)
Author:
gavinp@chromium.org
Message:

Unreviewed, rolling out r142141.
http://trac.webkit.org/changeset/142141
https://bugs.webkit.org/show_bug.cgi?id=108990

Reland r142112, will update Chromium expectations and create a
Chromium bug instead for the crash.

.:

  • ManualTests/remove-fixed-position-but-keep-compositing.html: Added.

Source/WebCore:

  • CMakeLists.txt:
  • Target.pri:
  • WebCore.pri:
  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::create):

  • page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp: Added.

(WebCore):
(WebCore::ScrollingCoordinatorCoordinatedGraphics::ScrollingCoordinatorCoordinatedGraphics):
(WebCore::ScrollingCoordinatorCoordinatedGraphics::setLayerIsFixedToContainerLayer):

  • page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h: Added.

(WebCore):
(ScrollingCoordinatorCoordinatedGraphics):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::setFixedToViewport):
(WebCore):
(WebCore::CoordinatedGraphicsLayer::flushCompositingState):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:

(CoordinatedGraphicsLayerClient):
(CoordinatedGraphicsLayer):

Source/WebKit2:

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
  • WebProcess/WebPage/DrawingAreaImpl.cpp:

(WebKit::DrawingAreaImpl::DrawingAreaImpl):

Location:
trunk
Files:
3 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r142141 r142143  
     12013-02-07  Gavin Peters  <gavinp@chromium.org>
     2
     3        Unreviewed, rolling out r142141.
     4        http://trac.webkit.org/changeset/142141
     5        https://bugs.webkit.org/show_bug.cgi?id=108990
     6
     7        Reland r142112, will update Chromium expectations and create a
     8        Chromium bug instead for the crash.
     9
     10        * ManualTests/remove-fixed-position-but-keep-compositing.html: Added.
     11
    1122013-02-07  Gavin Peters  <gavinp@chromium.org>
    213
  • trunk/Source/WebCore/CMakeLists.txt

    r142141 r142143  
    4545    "${WEBCORE_DIR}/page/animation"
    4646    "${WEBCORE_DIR}/page/scrolling"
     47    "${WEBCORE_DIR}/page/scrolling/coordinatedgraphics"
    4748    "${WEBCORE_DIR}/platform"
    4849    "${WEBCORE_DIR}/platform/animation"
     
    18211822    page/scrolling/ScrollingConstraints.cpp
    18221823    page/scrolling/ScrollingCoordinator.cpp
     1824    page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp
    18231825
    18241826    platform/Arena.cpp
  • trunk/Source/WebCore/ChangeLog

    r142142 r142143  
     12013-02-07  Gavin Peters  <gavinp@chromium.org>
     2
     3        Unreviewed, rolling out r142141.
     4        http://trac.webkit.org/changeset/142141
     5        https://bugs.webkit.org/show_bug.cgi?id=108990
     6
     7        Reland r142112, will update Chromium expectations and create a
     8        Chromium bug instead for the crash.
     9
     10        * CMakeLists.txt:
     11        * Target.pri:
     12        * WebCore.pri:
     13        * page/scrolling/ScrollingCoordinator.cpp:
     14        (WebCore::ScrollingCoordinator::create):
     15        * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp: Added.
     16        (WebCore):
     17        (WebCore::ScrollingCoordinatorCoordinatedGraphics::ScrollingCoordinatorCoordinatedGraphics):
     18        (WebCore::ScrollingCoordinatorCoordinatedGraphics::setLayerIsFixedToContainerLayer):
     19        * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h: Added.
     20        (WebCore):
     21        (ScrollingCoordinatorCoordinatedGraphics):
     22        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
     23        (WebCore::CoordinatedGraphicsLayer::setFixedToViewport):
     24        (WebCore):
     25        (WebCore::CoordinatedGraphicsLayer::flushCompositingState):
     26        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
     27        (CoordinatedGraphicsLayerClient):
     28        (CoordinatedGraphicsLayer):
     29
    1302013-02-07  Andrey Lushnikov  <lushnikov@chromium.org>
    231
  • trunk/Source/WebCore/Target.pri

    r142141 r142143  
    40674067use?(3D_GRAPHICS) {
    40684068    HEADERS += \
     4069        page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h \
    40694070        platform/graphics/cpu/arm/GraphicsContext3DNEON.h \
    40704071        platform/graphics/ANGLEWebKitBridge.h \
     
    40914092
    40924093    SOURCES += \
     4094        page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp \
    40934095        platform/graphics/ANGLEWebKitBridge.cpp \
    40944096        platform/graphics/GraphicsContext3D.cpp \
  • trunk/Source/WebCore/WebCore.pri

    r142141 r142143  
    5151    $$SOURCE_DIR/page/qt \
    5252    $$SOURCE_DIR/page/scrolling \
     53    $$SOURCE_DIR/page/scrolling/coordinatedgraphics \
    5354    $$SOURCE_DIR/platform \
    5455    $$SOURCE_DIR/platform/animation \
     
    6465    $$SOURCE_DIR/platform/graphics/surfaces \
    6566    $$SOURCE_DIR/platform/graphics/texmap \
     67    $$SOURCE_DIR/platform/graphics/texmap/coordinated \
    6668    $$SOURCE_DIR/platform/graphics/transforms \
    6769    $$SOURCE_DIR/platform/image-decoders \
  • trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp

    r142141 r142143  
    5353#endif
    5454
     55#if USE(COORDINATED_GRAPHICS)
     56#include "ScrollingCoordinatorCoordinatedGraphics.h"
     57#endif
     58
    5559namespace WebCore {
    5660
     
    6367#if PLATFORM(CHROMIUM)
    6468    return adoptRef(new ScrollingCoordinatorChromium(page));
     69#endif
     70
     71#if USE(COORDINATED_GRAPHICS)
     72    return adoptRef(new ScrollingCoordinatorCoordinatedGraphics(page));
    6573#endif
    6674
  • trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp

    r142141 r142143  
    465465}
    466466
     467void CoordinatedGraphicsLayer::setFixedToViewport(bool isFixed)
     468{
     469    if (m_fixedToViewport == isFixed)
     470        return;
     471
     472    m_fixedToViewport = isFixed;
     473    didChangeLayerState();
     474}
     475
    467476void CoordinatedGraphicsLayer::flushCompositingState(const FloatRect& rect)
    468477{
     
    478487    if (CoordinatedGraphicsLayer* replica = toCoordinatedGraphicsLayer(replicaLayer()))
    479488        replica->flushCompositingStateForThisLayerOnly();
    480 
    481     m_coordinator->syncFixedLayers();
    482489
    483490    flushCompositingStateForThisLayerOnly();
  • trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h

    r142141 r142143  
    7373
    7474    virtual void detachLayer(CoordinatedGraphicsLayer*) = 0;
    75     virtual void syncFixedLayers() = 0;
    7675    virtual PassOwnPtr<GraphicsContext> beginContentUpdate(const IntSize&, CoordinatedSurface::Flags, uint32_t& atlasID, IntPoint&) = 0;
    7776};
     
    138137    CoordinatedLayerID id() const;
    139138
    140     void setFixedToViewport(bool isFixed) { m_fixedToViewport = isFixed; }
     139    void setFixedToViewport(bool isFixed);
    141140
    142141    IntRect coverRect() const { return m_mainBackingStore ? m_mainBackingStore->mapToContents(m_mainBackingStore->coverRect()) : IntRect(); }
  • trunk/Source/WebKit2/ChangeLog

    r142141 r142143  
     12013-02-07  Gavin Peters  <gavinp@chromium.org>
     2
     3        Unreviewed, rolling out r142141.
     4        http://trac.webkit.org/changeset/142141
     5        https://bugs.webkit.org/show_bug.cgi?id=108990
     6
     7        Reland r142112, will update Chromium expectations and create a
     8        Chromium bug instead for the crash.
     9
     10        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
     11        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
     12        * WebProcess/WebPage/DrawingAreaImpl.cpp:
     13        (WebKit::DrawingAreaImpl::DrawingAreaImpl):
     14
    1152013-02-07  Gavin Peters  <gavinp@chromium.org>
    216
  • trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp

    r142141 r142143  
    470470}
    471471
    472 static void updateOffsetFromViewportForSelf(RenderLayer* renderLayer)
    473 {
    474     // These conditions must match the conditions in RenderLayerCompositor::requiresCompositingForPosition.
    475     RenderLayerBacking* backing = renderLayer->backing();
    476     if (!backing)
    477         return;
    478 
    479     RenderStyle* style = renderLayer->renderer()->style();
    480     if (!style)
    481         return;
    482 
    483     if (!renderLayer->renderer()->isOutOfFlowPositioned() || renderLayer->renderer()->style()->position() != FixedPosition)
    484         return;
    485 
    486     if (!renderLayer->renderer()->container()->isRenderView())
    487         return;
    488 
    489     if (!renderLayer->isStackingContainer())
    490         return;
    491 
    492     CoordinatedGraphicsLayer* graphicsLayer = toCoordinatedGraphicsLayer(backing->graphicsLayer());
    493     graphicsLayer->setFixedToViewport(true);
    494 }
    495 
    496 static void updateOffsetFromViewportForLayer(RenderLayer* renderLayer)
    497 {
    498     updateOffsetFromViewportForSelf(renderLayer);
    499 
    500     if (renderLayer->firstChild())
    501         updateOffsetFromViewportForLayer(renderLayer->firstChild());
    502     if (renderLayer->nextSibling())
    503         updateOffsetFromViewportForLayer(renderLayer->nextSibling());
    504 }
    505 
    506 void CoordinatedLayerTreeHost::syncFixedLayers()
    507 {
    508     if (!m_webPage->corePage()->settings() || !m_webPage->corePage()->settings()->acceleratedCompositingForFixedPositionEnabled())
    509         return;
    510 
    511     if (!m_webPage->mainFrame()->view()->hasViewportConstrainedObjects())
    512         return;
    513 
    514     RenderLayer* rootRenderLayer = m_webPage->mainFrame()->contentRenderer()->compositor()->rootRenderLayer();
    515     ASSERT(rootRenderLayer);
    516     if (rootRenderLayer->firstChild())
    517         updateOffsetFromViewportForLayer(rootRenderLayer->firstChild());
    518 }
    519 
    520472void CoordinatedLayerTreeHost::lockAnimations()
    521473{
  • trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h

    r142141 r142143  
    106106    virtual void setLayerRepaintCount(WebCore::CoordinatedLayerID, int) OVERRIDE;
    107107    virtual void detachLayer(WebCore::CoordinatedGraphicsLayer*);
    108     virtual void syncFixedLayers();
    109108
    110109    virtual PassOwnPtr<WebCore::GraphicsContext> beginContentUpdate(const WebCore::IntSize&, WebCore::CoordinatedSurface::Flags, uint32_t& atlasID, WebCore::IntPoint&);
  • trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp

    r142141 r142143  
    7474#if USE(COORDINATED_GRAPHICS)
    7575    m_alwaysUseCompositing = true;
     76    webPage->corePage()->settings()->setScrollingCoordinatorEnabled(true);
    7677#endif
    7778
Note: See TracChangeset for help on using the changeset viewer.