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

Side by Side Diff: Source/platform/graphics/paint/DrawingRecorder.cpp

Issue 1192443003: [Slimming Paint] Blink-side contiguous allocation of display items. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: need a constructor with WTF_MAKE_NONCOPYABLE 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 | Annotate | Revision Log
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 CachedDisplayItem cachedDisplayItem(m_displayItemClient, DisplayItem::dr awingTypeToCachedType(m_displayItemType));
95 m_context.displayItemList()->add(cachedDisplayItem);
95 } else { 96 } else {
96 OwnPtr<DrawingDisplayItem> drawingDisplayItem = DrawingDisplayItem::crea te(m_displayItemClient, m_displayItemType, m_context.endRecording()); 97 DrawingDisplayItem drawingDisplayItem(m_displayItemClient, m_displayItem Type, m_context.endRecording());
97 #if ENABLE(ASSERT) 98 #if ENABLE(ASSERT)
98 drawingDisplayItem->setUnderInvalidationCheckingMode(m_underInvalidation CheckingMode); 99 drawingDisplayItem.setUnderInvalidationCheckingMode(m_underInvalidationC heckingMode);
99 #endif 100 #endif
100 m_context.displayItemList()->add(drawingDisplayItem.release()); 101 m_context.displayItemList()->add(drawingDisplayItem);
101 } 102 }
102 } 103 }
103 104
104 } // namespace blink 105 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/paint/DrawingDisplayItem.cpp ('k') | Source/platform/graphics/paint/FilterDisplayItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698