| 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 DrawingDisplayItem_h | 5 #ifndef DrawingDisplayItem_h |
| 6 #define DrawingDisplayItem_h | 6 #define DrawingDisplayItem_h |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "platform/PlatformExport.h" | 9 #include "platform/PlatformExport.h" |
| 10 #include "platform/RuntimeEnabledFeatures.h" | 10 #include "platform/RuntimeEnabledFeatures.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 const FloatRect& record_bounds, | 35 const FloatRect& record_bounds, |
| 36 bool known_to_be_opaque = false) | 36 bool known_to_be_opaque = false) |
| 37 : DisplayItem(client, type, sizeof(*this)), | 37 : DisplayItem(client, type, sizeof(*this)), |
| 38 record_(record && record->size() ? std::move(record) : nullptr), | 38 record_(record && record->size() ? std::move(record) : nullptr), |
| 39 record_bounds_(record_bounds), | 39 record_bounds_(record_bounds), |
| 40 known_to_be_opaque_(known_to_be_opaque) { | 40 known_to_be_opaque_(known_to_be_opaque) { |
| 41 DCHECK(IsDrawingType(type)); | 41 DCHECK(IsDrawingType(type)); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void Replay(GraphicsContext&) const override; | 44 void Replay(GraphicsContext&) const override; |
| 45 void AppendToWebDisplayItemList(const IntRect& visual_rect, | 45 void AppendToWebDisplayItemList(const LayoutSize&, |
| 46 WebDisplayItemList*) const override; | 46 WebDisplayItemList*) const override; |
| 47 bool DrawsContent() const override; | 47 bool DrawsContent() const override; |
| 48 | 48 |
| 49 const sk_sp<const PaintRecord>& GetPaintRecord() const { return record_; } | 49 const sk_sp<const PaintRecord>& GetPaintRecord() const { return record_; } |
| 50 // This rect is described in the coordinate space relative to the PaintRecord | 50 // This rect is described in the coordinate space relative to the PaintRecord |
| 51 // whose bounds it describes. | 51 // whose bounds it describes. |
| 52 FloatRect GetPaintRecordBounds() const { return record_bounds_; } | 52 FloatRect GetPaintRecordBounds() const { return record_bounds_; } |
| 53 | 53 |
| 54 bool KnownToBeOpaque() const { | 54 bool KnownToBeOpaque() const { |
| 55 DCHECK(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); | 55 DCHECK(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 67 sk_sp<const PaintRecord> record_; | 67 sk_sp<const PaintRecord> record_; |
| 68 FloatRect record_bounds_; | 68 FloatRect record_bounds_; |
| 69 | 69 |
| 70 // True if there are no transparent areas. Only used for SlimmingPaintV2. | 70 // True if there are no transparent areas. Only used for SlimmingPaintV2. |
| 71 const bool known_to_be_opaque_; | 71 const bool known_to_be_opaque_; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace blink | 74 } // namespace blink |
| 75 | 75 |
| 76 #endif // DrawingDisplayItem_h | 76 #endif // DrawingDisplayItem_h |
| OLD | NEW |