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

Side by Side Diff: Source/core/paint/SubtreeRecorder.cpp

Issue 1193433004: Blink-side contiguous allocation of display items. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add ListContainer::AllocateAndConstructWithArguments and a TODO in DisplayItemList::findMatchingIte… Created 5 years, 5 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
« no previous file with comments | « Source/core/paint/ScrollRecorder.cpp ('k') | Source/core/paint/Transform3DRecorder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/SubtreeRecorder.h" 6 #include "core/paint/SubtreeRecorder.h"
7 7
8 #include "core/layout/LayoutObject.h" 8 #include "core/layout/LayoutObject.h"
9 #include "platform/RuntimeEnabledFeatures.h" 9 #include "platform/RuntimeEnabledFeatures.h"
10 #include "platform/graphics/GraphicsContext.h" 10 #include "platform/graphics/GraphicsContext.h"
(...skipping 16 matching lines...) Expand all
27 27
28 SubtreeRecorder::~SubtreeRecorder() 28 SubtreeRecorder::~SubtreeRecorder()
29 { 29 {
30 if (!RuntimeEnabledFeatures::slimmingPaintEnabled()) 30 if (!RuntimeEnabledFeatures::slimmingPaintEnabled())
31 return; 31 return;
32 32
33 if (m_begun) { 33 if (m_begun) {
34 if (m_displayItemList->lastDisplayItemIsNoopBegin()) 34 if (m_displayItemList->lastDisplayItemIsNoopBegin())
35 m_displayItemList->removeLastDisplayItem(); 35 m_displayItemList->removeLastDisplayItem();
36 else 36 else
37 m_displayItemList->add(EndSubtreeDisplayItem::create(m_subtreeRoot, DisplayItem::paintPhaseToEndSubtreeType(m_paintPhase))); 37 m_displayItemList->createAndAppend<EndSubtreeDisplayItem>(m_subtreeR oot, DisplayItem::paintPhaseToEndSubtreeType(m_paintPhase));
38 } 38 }
39 } 39 }
40 40
41 void SubtreeRecorder::begin() 41 void SubtreeRecorder::begin()
42 { 42 {
43 if (!RuntimeEnabledFeatures::slimmingPaintEnabled()) 43 if (!RuntimeEnabledFeatures::slimmingPaintEnabled())
44 return; 44 return;
45 if (m_displayItemList->displayItemConstructionIsDisabled()) 45 if (m_displayItemList->displayItemConstructionIsDisabled())
46 return; 46 return;
47 m_displayItemList->add(BeginSubtreeDisplayItem::create(m_subtreeRoot, Displa yItem::paintPhaseToBeginSubtreeType(m_paintPhase))); 47 m_displayItemList->createAndAppend<BeginSubtreeDisplayItem>(m_subtreeRoot, D isplayItem::paintPhaseToBeginSubtreeType(m_paintPhase));
48 m_begun = true; 48 m_begun = true;
49 } 49 }
50 50
51 } // namespace blink 51 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/paint/ScrollRecorder.cpp ('k') | Source/core/paint/Transform3DRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698