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

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: Ready for review Created 5 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 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/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 13 matching lines...) Expand all
24 24
25 ASSERT(m_displayItemList); 25 ASSERT(m_displayItemList);
26 } 26 }
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 m_displayItemList->add(EndSubtreeDisplayItem::create(m_subtreeRoot, Disp layItem::paintPhaseToEndSubtreeType(m_paintPhase))); 34 m_displayItemList->createAndAppendIfNeeded<EndSubtreeDisplayItem>(m_subt reeRoot, DisplayItem::paintPhaseToEndSubtreeType(m_paintPhase));
35 } 35 }
36 36
37 void SubtreeRecorder::begin() 37 void SubtreeRecorder::begin()
38 { 38 {
39 if (!RuntimeEnabledFeatures::slimmingPaintEnabled()) 39 if (!RuntimeEnabledFeatures::slimmingPaintEnabled())
40 return; 40 return;
41 if (m_displayItemList->displayItemConstructionIsDisabled()) 41 if (m_displayItemList->displayItemConstructionIsDisabled())
42 return; 42 return;
43 m_displayItemList->add(BeginSubtreeDisplayItem::create(m_subtreeRoot, Displa yItem::paintPhaseToBeginSubtreeType(m_paintPhase))); 43 m_displayItemList->createAndAppendIfNeeded<BeginSubtreeDisplayItem>(m_subtre eRoot, DisplayItem::paintPhaseToBeginSubtreeType(m_paintPhase));
44 m_begun = true; 44 m_begun = true;
45 } 45 }
46 46
47 } // namespace blink 47 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698