| 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 #ifndef DrawingRecorder_h | 5 #ifndef DrawingRecorder_h |
| 6 #define DrawingRecorder_h | 6 #define DrawingRecorder_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 | 9 |
| 10 #include "platform/geometry/FloatRect.h" | 10 #include "platform/geometry/FloatRect.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 known_to_be_opaque_ = true; | 46 known_to_be_opaque_ = true; |
| 47 } | 47 } |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 GraphicsContext& context_; | 50 GraphicsContext& context_; |
| 51 const DisplayItemClient& display_item_client_; | 51 const DisplayItemClient& display_item_client_; |
| 52 const DisplayItem::Type display_item_type_; | 52 const DisplayItem::Type display_item_type_; |
| 53 | 53 |
| 54 // True if there are no transparent areas. Only used for SlimmingPaintV2. | 54 // True if there are no transparent areas. Only used for SlimmingPaintV2. |
| 55 bool known_to_be_opaque_; | 55 bool known_to_be_opaque_; |
| 56 // The bounds of the area being recorded. |
| 57 IntRect recording_bounds_; |
| 56 | 58 |
| 57 #if DCHECK_IS_ON() | 59 #if DCHECK_IS_ON() |
| 58 // Ensures the list size does not change during the recorder's scope. | 60 // Ensures the list size does not change during the recorder's scope. |
| 59 size_t initial_display_item_list_size_; | 61 size_t initial_display_item_list_size_; |
| 60 #endif | 62 #endif |
| 61 }; | 63 }; |
| 62 | 64 |
| 63 #if DCHECK_IS_ON() | 65 #if DCHECK_IS_ON() |
| 64 class DisableListModificationCheck { | 66 class DisableListModificationCheck { |
| 65 STACK_ALLOCATED(); | 67 STACK_ALLOCATED(); |
| 66 WTF_MAKE_NONCOPYABLE(DisableListModificationCheck); | 68 WTF_MAKE_NONCOPYABLE(DisableListModificationCheck); |
| 67 | 69 |
| 68 public: | 70 public: |
| 69 DisableListModificationCheck(); | 71 DisableListModificationCheck(); |
| 70 | 72 |
| 71 private: | 73 private: |
| 72 AutoReset<bool> disabler_; | 74 AutoReset<bool> disabler_; |
| 73 }; | 75 }; |
| 74 #endif // DCHECK_IS_ON() | 76 #endif // DCHECK_IS_ON() |
| 75 | 77 |
| 76 } // namespace blink | 78 } // namespace blink |
| 77 | 79 |
| 78 #endif // DrawingRecorder_h | 80 #endif // DrawingRecorder_h |
| OLD | NEW |