Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1833)

Unified Diff: Source/core/rendering/compositing/RenderLayerCompositor.cpp

Issue 302093002: Remove scheduleLayerUpdate from RenderLayerCompositor. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: merge to ToT Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/compositing/RenderLayerCompositor.cpp
diff --git a/Source/core/rendering/compositing/RenderLayerCompositor.cpp b/Source/core/rendering/compositing/RenderLayerCompositor.cpp
index a620ac9c5f3a3d4138dd39f396334ffee3e458f0..91bd8b05009088f75b8b681afbe6d35360e1439f 100644
--- a/Source/core/rendering/compositing/RenderLayerCompositor.cpp
+++ b/Source/core/rendering/compositing/RenderLayerCompositor.cpp
@@ -35,7 +35,6 @@
#include "core/dom/FullscreenElementStack.h"
#include "core/dom/NodeList.h"
#include "core/dom/ScriptForbiddenScope.h"
-#include "core/frame/DeprecatedScheduleStyleRecalcDuringCompositingUpdate.h"
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/Settings.h"
@@ -159,7 +158,10 @@ void RenderLayerCompositor::setCompositingModeEnabled(bool enable)
else
destroyRootLayer();
- notifyIFramesOfCompositingChange();
+ // Compositing also affects the answer to RenderIFrame::requiresAcceleratedCompositing(), so
+ // we need to schedule a style recalc in our parent document.
+ if (HTMLFrameOwnerElement* ownerElement = m_renderView.document().ownerElement())
+ ownerElement->setNeedsCompositingUpdate();
}
void RenderLayerCompositor::enableCompositingModeIfNeeded()
@@ -1268,10 +1270,9 @@ void RenderLayerCompositor::attachRootLayer(RootLayerAttachment attachment)
case RootLayerAttachedViaEnclosingFrame: {
HTMLFrameOwnerElement* ownerElement = m_renderView.document().ownerElement();
ASSERT(ownerElement);
- DeprecatedScheduleStyleRecalcDuringCompositingUpdate marker(ownerElement->document().lifecycle());
// The layer will get hooked up via CompositedLayerMapping::updateGraphicsLayerConfiguration()
// for the frame's renderer in the parent document.
- ownerElement->scheduleLayerUpdate();
+ ownerElement->setNeedsCompositingUpdate();
break;
}
}
@@ -1293,10 +1294,8 @@ void RenderLayerCompositor::detachRootLayer()
else
m_rootContentLayer->removeFromParent();
- if (HTMLFrameOwnerElement* ownerElement = m_renderView.document().ownerElement()) {
- DeprecatedScheduleStyleRecalcDuringCompositingUpdate marker(ownerElement->document().lifecycle());
- ownerElement->scheduleLayerUpdate();
- }
+ if (HTMLFrameOwnerElement* ownerElement = m_renderView.document().ownerElement())
+ ownerElement->setNeedsCompositingUpdate();
break;
}
case RootLayerAttachedViaChromeClient: {
@@ -1319,33 +1318,6 @@ void RenderLayerCompositor::updateRootLayerAttachment()
ensureRootLayer();
}
-// IFrames are special, because we hook compositing layers together across iframe boundaries
-// when both parent and iframe content are composited. So when this frame becomes composited, we have
-// to use a synthetic style change to get the iframes into RenderLayers in order to allow them to composite.
-void RenderLayerCompositor::notifyIFramesOfCompositingChange()
-{
- if (!m_renderView.frameView())
- return;
- LocalFrame& frame = m_renderView.frameView()->frame();
-
- for (LocalFrame* child = frame.tree().firstChild(); child; child = child->tree().traverseNext(&frame)) {
- if (!child->document())
- continue; // FIXME: Can this happen?
- if (HTMLFrameOwnerElement* ownerElement = child->document()->ownerElement()) {
- DeprecatedScheduleStyleRecalcDuringCompositingUpdate marker(ownerElement->document().lifecycle());
- ownerElement->scheduleLayerUpdate();
- }
- }
-
- // Compositing also affects the answer to RenderIFrame::requiresAcceleratedCompositing(), so
- // we need to schedule a style recalc in our parent document.
- if (HTMLFrameOwnerElement* ownerElement = m_renderView.document().ownerElement()) {
- ownerElement->document().renderView()->compositor()->setNeedsCompositingUpdate(CompositingUpdateAfterCompositingInputChange);
- DeprecatedScheduleStyleRecalcDuringCompositingUpdate marker(ownerElement->document().lifecycle());
- ownerElement->scheduleLayerUpdate();
- }
-}
-
ScrollingCoordinator* RenderLayerCompositor::scrollingCoordinator() const
{
if (Page* page = this->page())
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698