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

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

Issue 2549553002: Verify paintedOutputOfObjectHasNoEffectRegardlessOfSize during painting (Closed)
Patch Set: Remove from LayoutObject.h Created 4 years 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 "platform/graphics/paint/DrawingRecorder.h" 5 #include "platform/graphics/paint/DrawingRecorder.h"
6 6
7 #include "platform/RuntimeEnabledFeatures.h" 7 #include "platform/RuntimeEnabledFeatures.h"
8 #include "platform/graphics/GraphicsContext.h" 8 #include "platform/graphics/GraphicsContext.h"
9 #include "platform/graphics/GraphicsLayer.h" 9 #include "platform/graphics/GraphicsLayer.h"
10 #include "platform/graphics/paint/PaintController.h" 10 #include "platform/graphics/paint/PaintController.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 #if DCHECK_IS_ON() 73 #if DCHECK_IS_ON()
74 if (RuntimeEnabledFeatures::slimmingPaintStrictCullRectClippingEnabled()) 74 if (RuntimeEnabledFeatures::slimmingPaintStrictCullRectClippingEnabled())
75 m_context.restore(); 75 m_context.restore();
76 76
77 m_context.setInDrawingRecorder(false); 77 m_context.setInDrawingRecorder(false);
78 DCHECK(m_displayItemPosition == 78 DCHECK(m_displayItemPosition ==
79 m_context.getPaintController().newDisplayItemList().size()); 79 m_context.getPaintController().newDisplayItemList().size());
80 #endif 80 #endif
81 81
82 sk_sp<const SkPicture> picture = m_context.endRecording();
83
84 #if DCHECK_IS_ON()
85 if (!RuntimeEnabledFeatures::slimmingPaintStrictCullRectClippingEnabled() &&
86 !m_context.getPaintController().isForSkPictureBuilder() &&
87 m_displayItemClient.paintedOutputOfObjectHasNoEffectRegardlessOfSize()) {
88 DCHECK_EQ(0, picture->approximateOpCount())
89 << m_displayItemClient.debugName();
90 }
91 #endif
92
82 m_context.getPaintController().createAndAppend<DrawingDisplayItem>( 93 m_context.getPaintController().createAndAppend<DrawingDisplayItem>(
83 m_displayItemClient, m_displayItemType, m_context.endRecording(), 94 m_displayItemClient, m_displayItemType, picture, m_knownToBeOpaque);
84 m_knownToBeOpaque);
85 } 95 }
86 96
87 } // namespace blink 97 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698