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

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

Issue 1198583004: Move all drawing display item parameters to the constructor (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix release build 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
« no previous file with comments | « Source/platform/graphics/paint/DrawingDisplayItem.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
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()->add(CachedDisplayItem::create(m_displayItem Client, DisplayItem::drawingTypeToCachedType(m_displayItemType)));
95 } else { 95 } else {
96 OwnPtr<DrawingDisplayItem> drawingDisplayItem = DrawingDisplayItem::crea te(m_displayItemClient, m_displayItemType, m_context.endRecording()); 96 OwnPtr<DrawingDisplayItem> drawingDisplayItem = DrawingDisplayItem::crea te(m_displayItemClient
97 , m_displayItemType
98 , m_context.endRecording()
97 #if ENABLE(ASSERT) 99 #if ENABLE(ASSERT)
98 drawingDisplayItem->setUnderInvalidationCheckingMode(m_underInvalidation CheckingMode); 100 , m_underInvalidationCheckingMode
99 #endif 101 #endif
102 );
100 m_context.displayItemList()->add(drawingDisplayItem.release()); 103 m_context.displayItemList()->add(drawingDisplayItem.release());
101 } 104 }
102 } 105 }
103 106
104 } // namespace blink 107 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/paint/DrawingDisplayItem.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698