| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #if ENABLE(ASSERT) | 44 #if ENABLE(ASSERT) |
| 45 , m_displayItemPosition(m_context.displayItemList()->newDisplayItems().size(
)) | 45 , m_displayItemPosition(m_context.displayItemList()->newDisplayItems().size(
)) |
| 46 , m_underInvalidationCheckingMode(DrawingDisplayItem::CheckPicture) | 46 , m_underInvalidationCheckingMode(DrawingDisplayItem::CheckPicture) |
| 47 #endif | 47 #endif |
| 48 { | 48 { |
| 49 ASSERT(context.displayItemList()); | 49 ASSERT(context.displayItemList()); |
| 50 if (context.displayItemList()->displayItemConstructionIsDisabled()) | 50 if (context.displayItemList()->displayItemConstructionIsDisabled()) |
| 51 return; | 51 return; |
| 52 | 52 |
| 53 // Must check DrawingRecorder::useCachedDrawingIfPossible before creating th
e DrawingRecorder. | 53 // Must check DrawingRecorder::useCachedDrawingIfPossible before creating th
e DrawingRecorder. |
| 54 ASSERT((RuntimeEnabledFeatures::slimmingPaintV2Enabled() && context.displayI
temList()->paintOffsetWasInvalidated(displayItemClient.displayItemClient())) | 54 ASSERT((RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled() && conte
xt.displayItemList()->paintOffsetWasInvalidated(displayItemClient.displayItemCli
ent())) |
| 55 || RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabled
() | 55 || RuntimeEnabledFeatures::slimmingPaintUnderInvalidationCheckingEnabled
() |
| 56 || !useCachedDrawingIfPossible(m_context, m_displayItemClient, m_display
ItemType)); | 56 || !useCachedDrawingIfPossible(m_context, m_displayItemClient, m_display
ItemType)); |
| 57 | 57 |
| 58 ASSERT(DisplayItem::isDrawingType(displayItemType)); | 58 ASSERT(DisplayItem::isDrawingType(displayItemType)); |
| 59 | 59 |
| 60 #if ENABLE(ASSERT) | 60 #if ENABLE(ASSERT) |
| 61 context.setInDrawingRecorder(true); | 61 context.setInDrawingRecorder(true); |
| 62 #endif | 62 #endif |
| 63 | 63 |
| 64 context.beginRecording(cullRect); | 64 context.beginRecording(cullRect); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |