[Title] Create a GraphicsLayerUpdater class that will do periodic layer flushes for layer trees containing tile caches
[Issue#] P130604-5534
[Problem] Delay in painting when the transition happens
[Cause]
[Solution] Cherry-pick
[Cherry-Picker] Prabhavathi Perumal <prabha.p@samsung.com>
Create a GraphicsLayerUpdater class that will do periodic layer flushes for layer trees containing tile caches
https://bugs.webkit.org/show_bug.cgi?id=99518
Reviewed by Dean Jackson.
When using tile caches in place of tiled layers, we need to recompute their
visible area periodically while animations and scrolling are happening.
Make a new class, GraphicsLayerUpdater, to handle this updating.
Internally, it uses DisplayRefreshMonitor to generate the periodic updates.
GraphicsLayer clients are notified that layers need periodic updates. Clients
are free to make use of GraphicsLayerUpdater to handle this updating, as
RenderLayerCompositor does.
Also do some minor refactoring of methods in RenderLayerCompositor that
get to Page.
* CMakeLists.txt: Add GraphicsLayerUpdater.cpp to the build.
* GNUmakefile.list.am: Ditto.
* PlatformBlackBerry.cmake: Ditto.
* Target.pri: Ditto.
* WebCore.gypi: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* dom/Document.cpp:
(WebCore::Document::windowScreenDidChange): Tell the compositor that the screen
changed, so it can tell the GraphicsLayerUpdater if it has one.
* platform/graphics/GraphicsLayerClient.h:
(WebCore::GraphicsLayerClient::notifyFlushBeforeDisplayRefresh): Method called
for layers that need periodic updates, like tile cache layers.
* platform/graphics/GraphicsLayerUpdater.cpp: Added. Uses DisplayRefreshMonitorManager
to flush layers before the next refresh.
(WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
(WebCore::GraphicsLayerUpdater::~GraphicsLayerUpdater):
(WebCore::GraphicsLayerUpdater::scheduleUpdate):
(WebCore::GraphicsLayerUpdater::screenDidChange):
(WebCore::GraphicsLayerUpdater::displayRefreshFired):
* platform/graphics/GraphicsLayerUpdater.h: Added.
(GraphicsLayerUpdaterClient): Clients need to implement flushLayers().
(WebCore::GraphicsLayerUpdaterClient::~GraphicsLayerUpdaterClient):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::recursiveCommitChanges): For tile cache layers,
tell the client that this layer should be updated soon to update the visible rect.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::notifyFlushBeforeDisplayRefresh): Pass this message
on to the compositor.
* rendering/RenderLayerBacking.h:
(RenderLayerBacking): Implement notifyFlushBeforeDisplayRefresh.
Add OVERRIDE to all the client overrides.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags): Use helper to get to Page.
(WebCore::RenderLayerCompositor::scheduleLayerFlush): Ditto.
(WebCore::RenderLayerCompositor::flushPendingLayerChanges): Soon we're going to be asking
about the current state of animations inside the flush (for visible rect computation), so we
need a AnimationUpdateBlock to make sure all the animation times are in sync.
(WebCore::RenderLayerCompositor::notifyFlushBeforeDisplayRefresh): Make a GraphicsLayerUpdater
if necessary, and tell it to update soon.
(WebCore::RenderLayerCompositor::flushLayers): The GraphicsLayerUpdater client method.
Just does a flush. For now, considers this Frame as the flush root, which will need fixing for iframes.
(WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame): Use helper to get to Page.
(WebCore::RenderLayerCompositor::deviceScaleFactor): Ditto.
(WebCore::RenderLayerCompositor::pageScaleFactor): Ditto.
(WebCore::RenderLayerCompositor::destroyRootLayer): Ditto.
(WebCore::RenderLayerCompositor::windowScreenDidChange): Tell the updater if we have one.
(WebCore::RenderLayerCompositor::scrollingCoordinator): Use helper to get to Page.
(WebCore::RenderLayerCompositor::graphicsLayerFactory): Use helper to get to Page.
(WebCore::RenderLayerCompositor::page): The helper.
* rendering/RenderLayerCompositor.h:
(RenderLayerCompositor): Add OVERRIDE to all the client overrides.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131680
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
Conflicts:
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/rendering/RenderLayerBacking.h
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderLayerCompositor.h
Change-Id: I20fc4acdb2eb8ced842d039ef79251af617b4088
platform/graphics/GraphicsContext.cpp
platform/graphics/GraphicsLayer.cpp
platform/graphics/GraphicsLayerAnimation.cpp
+ platform/graphics/GraphicsLayerUpdater.cpp
platform/graphics/GraphicsLayerTransform.cpp
platform/graphics/GraphicsTypes.cpp
platform/graphics/Image.cpp
Source/WebCore/platform/graphics/GraphicsLayer.h \
Source/WebCore/platform/graphics/GraphicsLayer.cpp \
Source/WebCore/platform/graphics/GraphicsLayerClient.h \
+ Source/WebCore/platform/graphics/GraphicsLayerFactory.h \
+ Source/WebCore/platform/graphics/GraphicsLayerUpdater.h \
+ Source/WebCore/platform/graphics/GraphicsLayerUpdater.cpp \
Source/WebCore/platform/graphics/GraphicsTypes.cpp \
Source/WebCore/platform/graphics/GraphicsTypes.h \
Source/WebCore/platform/graphics/GraphicsTypes3D.h \
IF (WTF_USE_ACCELERATED_COMPOSITING)
LIST(APPEND WebCore_SOURCES
${WEBCORE_DIR}/platform/graphics/GraphicsLayer.cpp
+ ${WEBCORE_DIR}/platform/graphics/GraphicsLayerUpdater.cpp
${WEBCORE_DIR}/platform/graphics/blackberry/CanvasLayerWebKitThread.cpp
${WEBCORE_DIR}/platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp
${WEBCORE_DIR}/platform/graphics/blackberry/LayerAnimation.cpp
platform/graphics/GraphicsContext.cpp \
platform/graphics/GraphicsLayer.cpp \
platform/graphics/GraphicsLayerAnimation.cpp \
+ platform/graphics/GraphicsLayerUpdater.cpp \
platform/graphics/GraphicsLayerTransform.cpp \
platform/graphics/GraphicsTypes.cpp \
platform/graphics/Image.cpp \
'platform/graphics/GraphicsLayer.cpp',
'platform/graphics/GraphicsLayerAnimation.cpp',
'platform/graphics/GraphicsLayerAnimation.h',
+ 'platform/graphics/GraphicsLayerUpdater.cpp',
+ 'platform/graphics/GraphicsLayerUpdater.h',
'platform/graphics/GraphicsLayerTransform.cpp',
'platform/graphics/GraphicsLayerTransform.h',
'platform/graphics/GraphicsTypes.cpp',
#include "ProcessingInstruction.h"
#include "RegisteredEventListener.h"
#include "RenderArena.h"
+#include "RenderLayerCompositor.h"
#include "RenderNamedFlowThread.h"
#include "RenderTextControl.h"
#include "RenderView.h"
void Document::windowScreenDidChange(PlatformDisplayID displayID)
{
+ UNUSED_PARAM(displayID);
+
#if ENABLE(REQUEST_ANIMATION_FRAME)
if (m_scriptedAnimationController)
m_scriptedAnimationController->windowScreenDidChange(displayID);
-#else
- UNUSED_PARAM(displayID);
#endif
-}
+#if USE(ACCELERATED_COMPOSITING)
+ if (renderView()->usesCompositing())
+ renderView()->compositor()->windowScreenDidChange(displayID);
+#endif
+}
String Document::displayStringModifiedByEncoding(const String& str) const
{
// to appear on the screen.
virtual void notifySyncRequired(const GraphicsLayer*) = 0;
+ // Notification that this layer requires a flush before the next display refresh.
+ virtual void notifyFlushBeforeDisplayRefresh(const GraphicsLayer*) { }
+
virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& inClip) = 0;
virtual void didCommitChangesForLayer(const GraphicsLayer*) const { }
--- /dev/null
+/*
+ * Copyright (C) 2012 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if USE(ACCELERATED_COMPOSITING)
+
+#include "GraphicsLayerUpdater.h"
+
+#include "GraphicsLayer.h"
+
+namespace WebCore {
+
+GraphicsLayerUpdater::GraphicsLayerUpdater(GraphicsLayerUpdaterClient* client, PlatformDisplayID displayID)
+ : m_client(client)
+ , m_scheduled(false)
+{
+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
+ DisplayRefreshMonitorManager::sharedManager()->registerClient(this);
+ DisplayRefreshMonitorManager::sharedManager()->windowScreenDidChange(displayID, this);
+ DisplayRefreshMonitorManager::sharedManager()->scheduleAnimation(this);
+#endif
+}
+
+GraphicsLayerUpdater::~GraphicsLayerUpdater()
+{
+ // ~DisplayRefreshMonitorClient unregisters us as a client.
+}
+
+void GraphicsLayerUpdater::scheduleUpdate()
+{
+ if (m_scheduled)
+ return;
+
+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
+ DisplayRefreshMonitorManager::sharedManager()->scheduleAnimation(this);
+#endif
+ m_scheduled = true;
+}
+
+void GraphicsLayerUpdater::screenDidChange(PlatformDisplayID displayID)
+{
+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
+ DisplayRefreshMonitorManager::sharedManager()->windowScreenDidChange(displayID, this);
+#endif
+}
+
+void GraphicsLayerUpdater::displayRefreshFired(double timestamp)
+{
+ UNUSED_PARAM(timestamp);
+ m_scheduled = false;
+
+ if (m_client)
+ m_client->flushLayers(this);
+}
+
+} // namespace WebCore
+
+#endif // USE(ACCELERATED_COMPOSITING)
--- /dev/null
+/*
+ * Copyright (C) 2012 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef GraphicsLayerUpdater_h
+#define GraphicsLayerUpdater_h
+
+#if USE(ACCELERATED_COMPOSITING)
+
+#include "DisplayRefreshMonitor.h"
+#include "PlatformScreen.h"
+
+namespace WebCore {
+
+class GraphicsLayerUpdater;
+
+class GraphicsLayerUpdaterClient {
+public:
+ virtual ~GraphicsLayerUpdaterClient() { }
+ virtual void flushLayers(GraphicsLayerUpdater*) = 0;
+};
+
+class GraphicsLayerUpdater
+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
+ : public DisplayRefreshMonitorClient
+#endif
+{
+public:
+ GraphicsLayerUpdater(GraphicsLayerUpdaterClient*, PlatformDisplayID);
+ ~GraphicsLayerUpdater();
+
+ void scheduleUpdate();
+ void screenDidChange(PlatformDisplayID);
+
+private:
+ virtual void displayRefreshFired(double timestamp);
+
+ GraphicsLayerUpdaterClient* m_client;
+ bool m_scheduled;
+};
+
+} // namespace WebCore
+
+#endif // USE(ACCELERATED_COMPOSITING)
+
+#endif // GraphicsLayerUpdater_h
commitLayerChangesAfterSublayers();
+ if (client() && m_layer->layerType() == PlatformCALayer::LayerTypeTileCacheLayer)
+ client()->notifyFlushBeforeDisplayRefresh(this);
+
if (hadChanges && client())
client()->didCommitChangesForLayer(this);
}
compositor()->scheduleLayerFlush();
}
+void RenderLayerBacking::notifyFlushBeforeDisplayRefresh(const GraphicsLayer* layer)
+{
+ compositor()->notifyFlushBeforeDisplayRefresh(layer);
+}
+
// This is used for the 'freeze' API, for testing only.
void RenderLayerBacking::suspendAnimations(double time)
{
void updateAfterWidgetResize();
// GraphicsLayerClient interface
- virtual bool shouldUseTileCache(const GraphicsLayer*) const;
+
virtual bool usingTileCache(const GraphicsLayer*) const { return m_usingTiledCacheLayer; }
- virtual void notifyAnimationStarted(const GraphicsLayer*, double startTime);
virtual void notifySyncRequired(const GraphicsLayer*);
+ virtual bool shouldUseTileCache(const GraphicsLayer*) const OVERRIDE;
+ virtual void notifyAnimationStarted(const GraphicsLayer*, double startTime) OVERRIDE;
+ virtual void notifyFlushBeforeDisplayRefresh(const GraphicsLayer*) OVERRIDE;
+
- virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& clip);
+ virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& clip) OVERRIDE;
- virtual float deviceScaleFactor() const;
- virtual float pageScaleFactor() const;
- virtual void didCommitChangesForLayer(const GraphicsLayer*) const;
- virtual bool getCurrentTransform(const GraphicsLayer*, TransformationMatrix&) const;
+ virtual float deviceScaleFactor() const OVERRIDE;
+ virtual float pageScaleFactor() const OVERRIDE;
+ virtual void didCommitChangesForLayer(const GraphicsLayer*) const OVERRIDE;
+ virtual bool getCurrentTransform(const GraphicsLayer*, TransformationMatrix&) const OVERRIDE;
- virtual bool showDebugBorders(const GraphicsLayer*) const;
- virtual bool showRepaintCounter(const GraphicsLayer*) const;
+ virtual bool showDebugBorders(const GraphicsLayer*) const OVERRIDE;
+ virtual bool showRepaintCounter(const GraphicsLayer*) const OVERRIDE;
#if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
virtual void platformLayerChanged(GraphicsLayer*, PlatformLayer* oldPlatformLayer, PlatformLayer* newPlatformLayer);
// We allow the chrome to override the settings, in case the page is rendered
// on a chrome that doesn't allow accelerated compositing.
if (hasAcceleratedCompositing) {
- Frame* frame = m_renderView->frameView()->frame();
- Page* page = frame ? frame->page() : 0;
- if (page) {
+ if (Page* page = this->page()) {
ChromeClient* chromeClient = page->chrome()->client();
m_compositingTriggers = chromeClient->allowedCompositingTriggers();
hasAcceleratedCompositing = m_compositingTriggers;
void RenderLayerCompositor::scheduleLayerFlush()
{
- Frame* frame = m_renderView->frameView()->frame();
- Page* page = frame ? frame->page() : 0;
- if (!page)
- return;
-
- page->chrome()->client()->scheduleCompositingLayerSync();
+ if (Page* page = this->page())
+ page->chrome()->client()->scheduleCompositingLayerSync();
}
#if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
if (!isFlushRoot && rootLayerAttachment() == RootLayerAttachedViaEnclosingFrame)
return;
+ AnimationUpdateBlock animationUpdateBlock(m_renderView->frameView()->frame()->animation());
+
ASSERT(!m_flushingLayers);
m_flushingLayers = true;
{
}
+void RenderLayerCompositor::notifyFlushBeforeDisplayRefresh(const GraphicsLayer*)
+{
+ if (!m_layerUpdater) {
+ PlatformDisplayID displayID = 0;
+ if (Page* page = this->page())
+ displayID = page->displayID();
+
+ m_layerUpdater = adoptPtr(new GraphicsLayerUpdater(this, displayID));
+ }
+
+ m_layerUpdater->scheduleUpdate();
+}
+
+void RenderLayerCompositor::flushLayers(GraphicsLayerUpdater*)
+{
+ flushPendingLayerChanges(true); // FIXME: deal with iframes
+}
+
RenderLayerCompositor* RenderLayerCompositor::enclosingCompositorFlushingLayers() const
{
if (!m_renderView->frameView())
// On Mac, only propagate compositing if the frame is overlapped in the parent
// document, or the parent is already compositing, or the main frame is scaled.
- Frame* frame = m_renderView->frameView()->frame();
- Page* page = frame ? frame->page() : 0;
+ Page* page = this->page();
if (page && page->pageScaleFactor() != 1)
return true;
float RenderLayerCompositor::deviceScaleFactor() const
{
- Frame* frame = m_renderView->frameView()->frame();
- if (!frame)
- return 1;
- Page* page = frame->page();
- if (!page)
- return 1;
- return page->deviceScaleFactor();
+ Page* page = this->page();
+ return page ? page->deviceScaleFactor() : 1;
}
float RenderLayerCompositor::pageScaleFactor() const
{
- Frame* frame = m_renderView->frameView()->frame();
- if (!frame)
- return 1;
- Page* page = frame->page();
- if (!page)
- return 1;
- return page->pageScaleFactor();
+ Page* page = this->page();
+ return page ? page->pageScaleFactor() : 1;
}
void RenderLayerCompositor::didCommitChangesForLayer(const GraphicsLayer*) const
}
ASSERT(!m_scrollLayer);
m_rootContentLayer = nullptr;
+
+ m_layerUpdater = nullptr;
}
void RenderLayerCompositor::attachRootLayer(RootLayerAttachment attachment)
rootLayer->noteDeviceOrPageScaleFactorChangedIncludingDescendants();
}
+void RenderLayerCompositor::windowScreenDidChange(PlatformDisplayID displayID)
+{
+ if (m_layerUpdater)
+ m_layerUpdater->screenDidChange(displayID);
+}
+
ScrollingCoordinator* RenderLayerCompositor::scrollingCoordinator() const
{
- if (Frame* frame = m_renderView->frameView()->frame()) {
- if (Page* page = frame->page())
- return page->scrollingCoordinator();
- }
+ if (Page* page = this->page())
+ return page->scrollingCoordinator();
return 0;
}
chromeClient->removeScrollingLayer(layer->renderer()->node(), scrollingLayer, contentsLayer);
}
#endif
+Page* RenderLayerCompositor::page() const
+{
+ if (Frame* frame = m_renderView->frameView()->frame())
+ return frame->page();
+
+ return 0;
+}
} // namespace WebCore
#define RenderLayerCompositor_h
#include "ChromeClient.h"
+#include "Frame.h"
+#include "GraphicsLayerUpdater.h"
#include "RenderLayer.h"
#include "RenderLayerBacking.h"
namespace WebCore {
class GraphicsLayer;
+class GraphicsLayerUpdater;
class RenderEmbeddedObject;
class RenderPart;
class ScrollingCoordinator;
//
// There is one RenderLayerCompositor per RenderView.
-class RenderLayerCompositor : public GraphicsLayerClient {
+class RenderLayerCompositor : public GraphicsLayerClient, public GraphicsLayerUpdaterClient {
+ WTF_MAKE_FAST_ALLOCATED;
public:
RenderLayerCompositor(RenderView*);
~RenderLayerCompositor();
bool compositorShowDebugBorders() const { return m_showDebugBorders; }
bool compositorShowRepaintCounter() const { return m_showRepaintCounter; }
- virtual float deviceScaleFactor() const;
- virtual float pageScaleFactor() const;
- virtual void didCommitChangesForLayer(const GraphicsLayer*) const;
+ virtual float deviceScaleFactor() const OVERRIDE;
+ virtual float pageScaleFactor() const OVERRIDE;
+ virtual void didCommitChangesForLayer(const GraphicsLayer*) const OVERRIDE;
+ virtual void notifyFlushBeforeDisplayRefresh(const GraphicsLayer*) OVERRIDE;
bool keepLayersPixelAligned() const;
bool acceleratedDrawingEnabled() const { return m_acceleratedDrawingEnabled; }
void deviceOrPageScaleFactorChanged();
+ void windowScreenDidChange(PlatformDisplayID);
+
GraphicsLayer* layerForHorizontalScrollbar() const { return m_layerForHorizontalScrollbar.get(); }
GraphicsLayer* layerForVerticalScrollbar() const { return m_layerForVerticalScrollbar.get(); }
GraphicsLayer* layerForScrollCorner() const { return m_layerForScrollCorner.get(); }
class OverlapMap;
// GraphicsLayerClient Implementation
- virtual void notifyAnimationStarted(const GraphicsLayer*, double) { }
virtual void notifySyncRequired(const GraphicsLayer*) { scheduleLayerFlush(); }
- virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect&);
-
- virtual bool showDebugBorders(const GraphicsLayer*) const;
- virtual bool showRepaintCounter(const GraphicsLayer*) const;
#if ENABLE(TIZEN_CSS_OVERFLOW_SCROLL_ACCELERATION)
virtual void platformLayerChanged(GraphicsLayer*, PlatformLayer* /* oldPlatformLayer */, PlatformLayer* /* newPlatformLayer */) { }
#endif
+ // GraphicsLayerClient implementation
+ virtual void notifyAnimationStarted(const GraphicsLayer*, double) OVERRIDE { }
+ virtual void notifyFlushRequired(const GraphicsLayer*) OVERRIDE { scheduleLayerFlush(); }
+ virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect&) OVERRIDE;
+
+ virtual bool showDebugBorders(const GraphicsLayer*) const OVERRIDE;
+ virtual bool showRepaintCounter(const GraphicsLayer*) const OVERRIDE;
+
+ // GraphicsLayerUpdaterClient implementation
+ virtual void flushLayers(GraphicsLayerUpdater*) OVERRIDE;
// Whether the given RL needs a compositing layer.
bool needsToBeComposited(const RenderLayer*) const;
bool isFlushingLayers() const { return m_flushingLayers; }
+ Page* page() const;
+
ScrollingCoordinator* scrollingCoordinator() const;
// Whether a running transition or animation enforces the need for a compositing layer.
OwnPtr<GraphicsLayer> m_contentShadowLayer;
#endif
+ OwnPtr<GraphicsLayerUpdater> m_layerUpdater; // Updates tiled layer visible area periodically while animations are running.
+
#if !LOG_DISABLED
int m_rootLayerUpdateCount;
int m_obligateCompositedLayerCount; // count of layer that have to be composited.