| 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 BoxPainterBase_h | 5 #ifndef BoxPainterBase_h |
| 6 #define BoxPainterBase_h | 6 #define BoxPainterBase_h |
| 7 | 7 |
| 8 #include "core/style/ShadowData.h" | 8 #include "core/style/ShadowData.h" |
| 9 #include "platform/graphics/GraphicsTypes.h" | 9 #include "platform/graphics/GraphicsTypes.h" |
| 10 #include "platform/wtf/Allocator.h" | 10 #include "platform/wtf/Allocator.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class ComputedStyle; | 14 class ComputedStyle; |
| 15 class Document; | 15 class Document; |
| 16 class FloatRoundedRect; | 16 class FloatRoundedRect; |
| 17 class LayoutPoint; | 17 class LayoutPoint; |
| 18 class LayoutRect; | 18 class LayoutRect; |
| 19 class FillLayer; |
| 19 struct PaintInfo; | 20 struct PaintInfo; |
| 20 | 21 |
| 21 // Base class for box painting. Has no dependencies on the layout tree and thus | 22 // Base class for box painting. Has no dependencies on the layout tree and thus |
| 22 // provides functionality and definitions that can be shared between both legacy | 23 // provides functionality and definitions that can be shared between both legacy |
| 23 // layout and LayoutNG. For performance reasons no virtual methods are utilized. | 24 // layout and LayoutNG. For performance reasons no virtual methods are utilized. |
| 24 class BoxPainterBase { | 25 class BoxPainterBase { |
| 25 STACK_ALLOCATED(); | 26 STACK_ALLOCATED(); |
| 26 | 27 |
| 27 public: | 28 public: |
| 28 BoxPainterBase() {} | 29 BoxPainterBase() {} |
| (...skipping 20 matching lines...) Expand all Loading... |
| 49 const FloatRoundedRect& bounds, | 50 const FloatRoundedRect& bounds, |
| 50 const ComputedStyle&, | 51 const ComputedStyle&, |
| 51 bool include_logical_left_edge = true, | 52 bool include_logical_left_edge = true, |
| 52 bool include_logical_right_edge = true); | 53 bool include_logical_right_edge = true); |
| 53 | 54 |
| 54 static bool ShouldForceWhiteBackgroundForPrintEconomy(const Document&, | 55 static bool ShouldForceWhiteBackgroundForPrintEconomy(const Document&, |
| 55 const ComputedStyle&); | 56 const ComputedStyle&); |
| 56 | 57 |
| 57 LayoutRect BoundsForDrawingRecorder(const PaintInfo&, | 58 LayoutRect BoundsForDrawingRecorder(const PaintInfo&, |
| 58 const LayoutPoint& adjusted_paint_offset); | 59 const LayoutPoint& adjusted_paint_offset); |
| 60 |
| 61 typedef Vector<const FillLayer*, 8> FillLayerOcclusionOutputList; |
| 62 // Returns true if the result fill layers have non-associative blending or |
| 63 // compositing mode. (i.e. The rendering will be different without creating |
| 64 // isolation group by context.saveLayer().) Note that the output list will be |
| 65 // in top-bottom order. |
| 66 bool CalculateFillLayerOcclusionCulling( |
| 67 FillLayerOcclusionOutputList& reversed_paint_list, |
| 68 const FillLayer&, |
| 69 const Document&, |
| 70 const ComputedStyle&); |
| 59 }; | 71 }; |
| 60 | 72 |
| 61 } // namespace blink | 73 } // namespace blink |
| 62 | 74 |
| 63 #endif | 75 #endif |
| OLD | NEW |