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 "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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #endif | 42 #endif |
43 { | 43 { |
44 if (!RuntimeEnabledFeatures::slimmingPaintEnabled()) | 44 if (!RuntimeEnabledFeatures::slimmingPaintEnabled()) |
45 return; | 45 return; |
46 | 46 |
47 ASSERT(context.displayItemList()); | 47 ASSERT(context.displayItemList()); |
48 if (context.displayItemList()->displayItemConstructionIsDisabled()) | 48 if (context.displayItemList()->displayItemConstructionIsDisabled()) |
49 return; | 49 return; |
50 | 50 |
51 // Must check DrawingRecorder::useCachedDrawingIfPossible before creating th
e DrawingRecorder. | 51 // Must check DrawingRecorder::useCachedDrawingIfPossible before creating th
e DrawingRecorder. |
52 ASSERT(!useCachedDrawingIfPossible(m_context, m_displayItemClient, m_display
ItemType)); | 52 ASSERT((RuntimeEnabledFeatures::slimmingPaintV2Enabled() && context.displayI
temList()->paintOffsetWasInvalidated(displayItemClient.displayItemClient())) |
| 53 || !useCachedDrawingIfPossible(m_context, m_displayItemClient, m_display
ItemType)); |
53 | 54 |
54 ASSERT(DisplayItem::isDrawingType(displayItemType)); | 55 ASSERT(DisplayItem::isDrawingType(displayItemType)); |
55 | 56 |
56 #if ENABLE(ASSERT) | 57 #if ENABLE(ASSERT) |
57 context.setInDrawingRecorder(true); | 58 context.setInDrawingRecorder(true); |
58 #endif | 59 #endif |
59 | 60 |
60 context.beginRecording(cullRect); | 61 context.beginRecording(cullRect); |
61 | 62 |
62 #if ENABLE(ASSERT) | 63 #if ENABLE(ASSERT) |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 m_context.displayItemList()->createAndAppend<DrawingDisplayItem>(m_displayIt
emClient | 97 m_context.displayItemList()->createAndAppend<DrawingDisplayItem>(m_displayIt
emClient |
97 , m_displayItemType | 98 , m_displayItemType |
98 , m_context.endRecording() | 99 , m_context.endRecording() |
99 #if ENABLE(ASSERT) | 100 #if ENABLE(ASSERT) |
100 , m_underInvalidationCheckingMode | 101 , m_underInvalidationCheckingMode |
101 #endif | 102 #endif |
102 ); | 103 ); |
103 } | 104 } |
104 | 105 |
105 } // namespace blink | 106 } // namespace blink |
OLD | NEW |