| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 context.displayItemList()->createAndAppend<CachedDisplayItem>(client, Displa
yItem::drawingTypeToCachedDrawingType(type)); | 31 context.displayItemList()->createAndAppend<CachedDisplayItem>(client, Displa
yItem::drawingTypeToCachedDrawingType(type)); |
| 32 return true; | 32 return true; |
| 33 } | 33 } |
| 34 | 34 |
| 35 DrawingRecorder::DrawingRecorder(GraphicsContext& context, const DisplayItemClie
ntWrapper& displayItemClient, DisplayItem::Type displayItemType, const FloatRect
& cullRect) | 35 DrawingRecorder::DrawingRecorder(GraphicsContext& context, const DisplayItemClie
ntWrapper& displayItemClient, DisplayItem::Type displayItemType, const FloatRect
& cullRect) |
| 36 : m_context(context) | 36 : m_context(context) |
| 37 , m_displayItemClient(displayItemClient) | 37 , m_displayItemClient(displayItemClient) |
| 38 , m_displayItemType(displayItemType) | 38 , m_displayItemType(displayItemType) |
| 39 #if ENABLE(ASSERT) | 39 #if ENABLE(ASSERT) |
| 40 , m_displayItemPosition(RuntimeEnabledFeatures::slimmingPaintEnabled() ? m_c
ontext.displayItemList()->newDisplayItemsSize() : 0) | 40 , m_displayItemPosition(RuntimeEnabledFeatures::slimmingPaintEnabled() ? m_c
ontext.displayItemList()->newDisplayItems().size() : 0) |
| 41 , m_underInvalidationCheckingMode(DrawingDisplayItem::CheckPicture) | 41 , m_underInvalidationCheckingMode(DrawingDisplayItem::CheckPicture) |
| 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 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 ASSERT(m_context.displayItemList()); | 85 ASSERT(m_context.displayItemList()); |
| 86 if (m_context.displayItemList()->displayItemConstructionIsDisabled()) | 86 if (m_context.displayItemList()->displayItemConstructionIsDisabled()) |
| 87 return; | 87 return; |
| 88 | 88 |
| 89 #if ENABLE(ASSERT) | 89 #if ENABLE(ASSERT) |
| 90 if (RuntimeEnabledFeatures::slimmingPaintStrictCullRectClippingEnabled()) | 90 if (RuntimeEnabledFeatures::slimmingPaintStrictCullRectClippingEnabled()) |
| 91 m_context.restore(); | 91 m_context.restore(); |
| 92 | 92 |
| 93 m_context.setInDrawingRecorder(false); | 93 m_context.setInDrawingRecorder(false); |
| 94 ASSERT(m_displayItemPosition == m_context.displayItemList()->newDisplayItems
Size()); | 94 ASSERT(m_displayItemPosition == m_context.displayItemList()->newDisplayItems
().size()); |
| 95 #endif | 95 #endif |
| 96 | 96 |
| 97 m_context.displayItemList()->createAndAppend<DrawingDisplayItem>(m_displayIt
emClient | 97 m_context.displayItemList()->createAndAppend<DrawingDisplayItem>(m_displayIt
emClient |
| 98 , m_displayItemType | 98 , m_displayItemType |
| 99 , m_context.endRecording() | 99 , m_context.endRecording() |
| 100 #if ENABLE(ASSERT) | 100 #if ENABLE(ASSERT) |
| 101 , m_underInvalidationCheckingMode | 101 , m_underInvalidationCheckingMode |
| 102 #endif | 102 #endif |
| 103 ); | 103 ); |
| 104 } | 104 } |
| 105 | 105 |
| 106 } // namespace blink | 106 } // namespace blink |
| OLD | NEW |