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

Side by Side Diff: Source/platform/graphics/paint/DrawingRecorder.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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "platform/graphics/paint/DrawingRecorder.h" 6 #include "platform/graphics/paint/DrawingRecorder.h"
7 7
8 #include "platform/RuntimeEnabledFeatures.h" 8 #include "platform/RuntimeEnabledFeatures.h"
9 #include "platform/graphics/GraphicsContext.h" 9 #include "platform/graphics/GraphicsContext.h"
10 #include "platform/graphics/GraphicsLayer.h" 10 #include "platform/graphics/GraphicsLayer.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 #endif 84 #endif
85 85
86 if (m_canUseCachedDrawing) { 86 if (m_canUseCachedDrawing) {
87 #ifndef NDEBUG 87 #ifndef NDEBUG
88 RefPtr<const SkPicture> picture = m_context.endRecording(); 88 RefPtr<const SkPicture> picture = m_context.endRecording();
89 if (picture && picture->approximateOpCount()) { 89 if (picture && picture->approximateOpCount()) {
90 WTF_LOG_ERROR("Unnecessary painting for %s\n. Should check recorder. canUseCachedDrawing() before painting", 90 WTF_LOG_ERROR("Unnecessary painting for %s\n. Should check recorder. canUseCachedDrawing() before painting",
91 m_displayItemClient.debugName().utf8().data()); 91 m_displayItemClient.debugName().utf8().data());
92 } 92 }
93 #endif 93 #endif
94 m_context.displayItemList()->add(CachedDisplayItem::create(m_displayItem Client, DisplayItem::drawingTypeToCachedType(m_displayItemType))); 94 m_context.displayItemList()->createAndAppend<CachedDisplayItem>(m_displa yItemClient, DisplayItem::drawingTypeToCachedType(m_displayItemType));
95 } else { 95 } else {
96 OwnPtr<DrawingDisplayItem> drawingDisplayItem = DrawingDisplayItem::crea te(m_displayItemClient 96 m_context.displayItemList()->createAndAppend<DrawingDisplayItem>(m_displ ayItemClient
97 , m_displayItemType 97 , m_displayItemType
98 , m_context.endRecording() 98 , m_context.endRecording()
99 #if ENABLE(ASSERT) 99 #if ENABLE(ASSERT)
100 , m_underInvalidationCheckingMode 100 , m_underInvalidationCheckingMode
101 #endif 101 #endif
102 ); 102 );
103 m_context.displayItemList()->add(drawingDisplayItem.release());
104 } 103 }
105 } 104 }
106 105
107 } // namespace blink 106 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/paint/DrawingDisplayItem.h ('k') | Source/platform/graphics/paint/FilterDisplayItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698