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

Unified Diff: sky/engine/core/rendering/compositing/RenderLayerCompositor.cpp

Issue 762723002: Remove ENABLE(COMPOSITOR). (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/frame/FrameView.cpp ('k') | sky/engine/public/web/WebWidgetClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/compositing/RenderLayerCompositor.cpp
diff --git a/sky/engine/core/rendering/compositing/RenderLayerCompositor.cpp b/sky/engine/core/rendering/compositing/RenderLayerCompositor.cpp
index f1a715035cf9dcfe0309b0241a0bf12d97a8f58a..7dea52a413962516ee30ff0f407452285974bdfc 100644
--- a/sky/engine/core/rendering/compositing/RenderLayerCompositor.cpp
+++ b/sky/engine/core/rendering/compositing/RenderLayerCompositor.cpp
@@ -115,11 +115,7 @@ void RenderLayerCompositor::enableCompositingModeIfNeeded()
bool RenderLayerCompositor::rootShouldAlwaysComposite() const
{
-#if ENABLE(COMPOSITOR)
- return true;
-#else
return false;
-#endif
}
void RenderLayerCompositor::updateAcceleratedCompositingSettings()
@@ -130,11 +126,7 @@ void RenderLayerCompositor::updateAcceleratedCompositingSettings()
bool RenderLayerCompositor::hasAcceleratedCompositing() const
{
-#if ENABLE(COMPOSITOR)
- return true;
-#else
return false;
-#endif
}
bool RenderLayerCompositor::layerSquashingEnabled() const
@@ -218,89 +210,7 @@ void RenderLayerCompositor::updateWithoutAcceleratedCompositing(CompositingUpdat
void RenderLayerCompositor::updateIfNeeded()
{
- CompositingUpdateType updateType = m_pendingUpdateType;
m_pendingUpdateType = CompositingUpdateNone;
-
- if (!hasAcceleratedCompositing()) {
-#if ENABLE(COMPOSITOR)
- updateWithoutAcceleratedCompositing(updateType);
-#endif
- return;
- }
-
- if (updateType == CompositingUpdateNone)
- return;
-
- RenderLayer* updateRoot = rootRenderLayer();
-
- Vector<RenderLayer*> layersNeedingPaintInvalidation;
-
- if (updateType >= CompositingUpdateAfterCompositingInputChange) {
- CompositingInputsUpdater(updateRoot).update();
-
-#if ENABLE(ASSERT)
- // FIXME: Move this check to the end of the compositing update.
- CompositingInputsUpdater::assertNeedsCompositingInputsUpdateBitsCleared(updateRoot);
-#endif
-
- CompositingRequirementsUpdater(m_renderView, m_compositingReasonFinder).update(updateRoot);
-
- CompositingLayerAssigner layerAssigner(this);
- layerAssigner.assign(updateRoot, layersNeedingPaintInvalidation);
-
- bool layersChanged = layerAssigner.layersChanged();
-
- {
- TRACE_EVENT0("blink", "RenderLayerCompositor::updateAfterCompositingChange");
- if (const FrameView::ScrollableAreaSet* scrollableAreas = m_renderView.frameView()->scrollableAreas()) {
- for (FrameView::ScrollableAreaSet::iterator it = scrollableAreas->begin(); it != scrollableAreas->end(); ++it)
- layersChanged |= (*it)->updateAfterCompositingChange();
- }
- }
-
- if (layersChanged)
- updateType = std::max(updateType, CompositingUpdateRebuildTree);
- }
-
- if (updateType != CompositingUpdateNone) {
- GraphicsLayerUpdater updater;
- updater.update(*updateRoot, layersNeedingPaintInvalidation);
-
- if (updater.needsRebuildTree())
- updateType = std::max(updateType, CompositingUpdateRebuildTree);
-
-#if ENABLE(ASSERT)
- // FIXME: Move this check to the end of the compositing update.
- GraphicsLayerUpdater::assertNeedsToUpdateGraphicsLayerBitsCleared(*updateRoot);
-#endif
- }
-
- if (updateType >= CompositingUpdateRebuildTree) {
- GraphicsLayerTreeBuilder::AncestorInfo ancestorInfo;
- GraphicsLayerVector childList;
- ancestorInfo.childLayersOfEnclosingCompositedLayer = &childList;
- {
- TRACE_EVENT0("blink", "GraphicsLayerTreeBuilder::rebuild");
- GraphicsLayerTreeBuilder().rebuild(*updateRoot, ancestorInfo);
- }
-
- if (childList.isEmpty())
- destroyRootLayer();
- else
- m_rootContentLayer->setChildren(childList);
- }
-
- if (m_needsUpdateFixedBackground) {
- rootFixedBackgroundsChanged();
- m_needsUpdateFixedBackground = false;
- }
-
- for (unsigned i = 0; i < layersNeedingPaintInvalidation.size(); i++) {
- RenderLayer* layer = layersNeedingPaintInvalidation[i];
- layer->paintInvalidator().computePaintInvalidationRectsIncludingNonCompositingDescendants();
-
- paintInvalidationOnCompositingChange(layer);
- }
}
bool RenderLayerCompositor::allocateOrClearCompositedLayerMapping(RenderLayer* layer, const CompositingStateTransitionType compositedLayerUpdate)
« no previous file with comments | « sky/engine/core/frame/FrameView.cpp ('k') | sky/engine/public/web/WebWidgetClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698