OLD | NEW |
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 context_.GetPaintController().NewDisplayItemList().size()); | 87 context_.GetPaintController().NewDisplayItemList().size()); |
88 } | 88 } |
89 #endif | 89 #endif |
90 | 90 |
91 sk_sp<const PaintRecord> picture = context_.EndRecording(); | 91 sk_sp<const PaintRecord> picture = context_.EndRecording(); |
92 | 92 |
93 #if DCHECK_IS_ON() | 93 #if DCHECK_IS_ON() |
94 if (!RuntimeEnabledFeatures::slimmingPaintStrictCullRectClippingEnabled() && | 94 if (!RuntimeEnabledFeatures::slimmingPaintStrictCullRectClippingEnabled() && |
95 !context_.GetPaintController().IsForPaintRecordBuilder() && | 95 !context_.GetPaintController().IsForPaintRecordBuilder() && |
96 display_item_client_.PaintedOutputOfObjectHasNoEffectRegardlessOfSize()) { | 96 display_item_client_.PaintedOutputOfObjectHasNoEffectRegardlessOfSize()) { |
97 DCHECK_EQ(0, picture->approximateOpCount()) | 97 DCHECK_EQ(0u, picture->size()) << display_item_client_.DebugName(); |
98 << display_item_client_.DebugName(); | |
99 } | 98 } |
100 #endif | 99 #endif |
101 | 100 |
102 context_.GetPaintController().CreateAndAppend<DrawingDisplayItem>( | 101 context_.GetPaintController().CreateAndAppend<DrawingDisplayItem>( |
103 display_item_client_, display_item_type_, picture, known_to_be_opaque_); | 102 display_item_client_, display_item_type_, picture, known_to_be_opaque_); |
104 } | 103 } |
105 | 104 |
106 } // namespace blink | 105 } // namespace blink |
OLD | NEW |