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

Side by Side Diff: third_party/WebKit/Source/core/paint/LayerFixedPositionRecorder.cpp

Issue 1401363003: Rename DisplayItemList to PaintController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/paint/LayerFixedPositionRecorder.h" 6 #include "core/paint/LayerFixedPositionRecorder.h"
7 7
8 #include "core/layout/LayoutBoxModelObject.h" 8 #include "core/layout/LayoutBoxModelObject.h"
9 #include "platform/RuntimeEnabledFeatures.h" 9 #include "platform/RuntimeEnabledFeatures.h"
10 #include "platform/graphics/GraphicsContext.h" 10 #include "platform/graphics/GraphicsContext.h"
11 #include "platform/graphics/paint/DisplayItemList.h"
12 #include "platform/graphics/paint/FixedPositionContainerDisplayItem.h" 11 #include "platform/graphics/paint/FixedPositionContainerDisplayItem.h"
13 #include "platform/graphics/paint/FixedPositionDisplayItem.h" 12 #include "platform/graphics/paint/FixedPositionDisplayItem.h"
13 #include "platform/graphics/paint/PaintController.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 LayerFixedPositionRecorder::LayerFixedPositionRecorder(GraphicsContext& graphics Context, const LayoutBoxModelObject& layoutObject) 17 LayerFixedPositionRecorder::LayerFixedPositionRecorder(GraphicsContext& graphics Context, const LayoutBoxModelObject& layoutObject)
18 : m_graphicsContext(graphicsContext) 18 : m_graphicsContext(graphicsContext)
19 , m_layoutObject(layoutObject) 19 , m_layoutObject(layoutObject)
20 , m_isFixedPosition(layoutObject.style()->position() == FixedPosition) 20 , m_isFixedPosition(layoutObject.style()->position() == FixedPosition)
21 , m_isFixedPositionContainer(layoutObject.canContainFixedPositionObjects()) 21 , m_isFixedPositionContainer(layoutObject.canContainFixedPositionObjects())
22 { 22 {
23 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) 23 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled())
24 return; 24 return;
25 25
26 if (m_isFixedPosition) 26 if (m_isFixedPosition)
27 m_graphicsContext.displayItemList()->createAndAppend<BeginFixedPositionD isplayItem>(m_layoutObject); 27 m_graphicsContext.paintController()->createAndAppend<BeginFixedPositionD isplayItem>(m_layoutObject);
28 28
29 // TODO(trchen): Adding a pair of display items on every transformed 29 // TODO(trchen): Adding a pair of display items on every transformed
30 // element can be expensive. Investigate whether we can optimize out some 30 // element can be expensive. Investigate whether we can optimize out some
31 // of them if applicable. 31 // of them if applicable.
32 if (m_isFixedPositionContainer) 32 if (m_isFixedPositionContainer)
33 m_graphicsContext.displayItemList()->createAndAppend<BeginFixedPositionC ontainerDisplayItem>(m_layoutObject); 33 m_graphicsContext.paintController()->createAndAppend<BeginFixedPositionC ontainerDisplayItem>(m_layoutObject);
34 } 34 }
35 35
36 LayerFixedPositionRecorder::~LayerFixedPositionRecorder() 36 LayerFixedPositionRecorder::~LayerFixedPositionRecorder()
37 { 37 {
38 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) 38 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled())
39 return; 39 return;
40 40
41 ASSERT(m_graphicsContext.displayItemList()); 41 ASSERT(m_graphicsContext.paintController());
42 if (m_isFixedPositionContainer) 42 if (m_isFixedPositionContainer)
43 m_graphicsContext.displayItemList()->endItem<EndFixedPositionDisplayItem >(m_layoutObject); 43 m_graphicsContext.paintController()->endItem<EndFixedPositionDisplayItem >(m_layoutObject);
44 if (m_isFixedPosition) 44 if (m_isFixedPosition)
45 m_graphicsContext.displayItemList()->endItem<EndFixedPositionDisplayItem >(m_layoutObject); 45 m_graphicsContext.paintController()->endItem<EndFixedPositionDisplayItem >(m_layoutObject);
46 } 46 }
47 47
48 } // namespace blink 48 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698