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

Unified Diff: Source/core/paint/LayerFixedPositionRecorder.cpp

Issue 1110063006: Revert "Correct fixed-position recording for Slimming Paint" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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/paint/LayerFixedPositionRecorder.h ('k') | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/paint/LayerFixedPositionRecorder.cpp
diff --git a/Source/core/paint/LayerFixedPositionRecorder.cpp b/Source/core/paint/LayerFixedPositionRecorder.cpp
deleted file mode 100644
index 966c99925587a33f5481c0efa860ab0e7d717692..0000000000000000000000000000000000000000
--- a/Source/core/paint/LayerFixedPositionRecorder.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "config.h"
-#include "core/paint/LayerFixedPositionRecorder.h"
-
-#include "core/layout/LayoutBoxModelObject.h"
-#include "platform/RuntimeEnabledFeatures.h"
-#include "platform/graphics/GraphicsContext.h"
-#include "platform/graphics/paint/DisplayItemList.h"
-#include "platform/graphics/paint/FixedPositionContainerDisplayItem.h"
-#include "platform/graphics/paint/FixedPositionDisplayItem.h"
-
-namespace blink {
-
-LayerFixedPositionRecorder::LayerFixedPositionRecorder(GraphicsContext& graphicsContext, const LayoutBoxModelObject& layoutObject)
- : m_graphicsContext(graphicsContext)
- , m_layoutObject(layoutObject)
- , m_isFixedPosition(layoutObject.style()->position() == FixedPosition)
- , m_isFixedPositionContainer(layoutObject.canContainFixedPositionObjects())
-{
- if (!RuntimeEnabledFeatures::slimmingPaintCompositorLayerizationEnabled())
- return;
-
- if (m_graphicsContext.displayItemList()->displayItemConstructionIsDisabled())
- return;
-
- if (m_isFixedPosition)
- m_graphicsContext.displayItemList()->add(BeginFixedPositionDisplayItem::create(m_layoutObject));
-
- // TODO(trchen): Adding a pair of display items on every transformed
- // element can be expensive. Investigate whether we can optimize out some
- // of them if applicable.
- if (m_isFixedPositionContainer)
- m_graphicsContext.displayItemList()->add(BeginFixedPositionContainerDisplayItem::create(m_layoutObject));
-}
-
-LayerFixedPositionRecorder::~LayerFixedPositionRecorder()
-{
- if (!RuntimeEnabledFeatures::slimmingPaintCompositorLayerizationEnabled())
- return;
-
- if (m_graphicsContext.displayItemList()->displayItemConstructionIsDisabled())
- return;
-
- if (m_isFixedPositionContainer)
- m_graphicsContext.displayItemList()->add(EndFixedPositionContainerDisplayItem::create(m_layoutObject));
-
- if (m_isFixedPosition)
- m_graphicsContext.displayItemList()->add(EndFixedPositionDisplayItem::create(m_layoutObject));
-}
-
-} // namespace blink
« no previous file with comments | « Source/core/paint/LayerFixedPositionRecorder.h ('k') | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698