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 LayerPainter_h | 5 #ifndef LayerPainter_h |
6 #define LayerPainter_h | 6 #define LayerPainter_h |
7 | 7 |
8 #include "core/rendering/LayerFragment.h" | 8 #include "core/rendering/LayerFragment.h" |
9 #include "core/rendering/LayerPaintingInfo.h" | 9 #include "core/rendering/LayerPaintingInfo.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class ClipRect; | 13 class ClipRect; |
| 14 class PaintClipRecorder; |
14 struct PaintInfo; | 15 struct PaintInfo; |
15 class LayoutPoint; | 16 class LayoutPoint; |
16 class RenderLayer; | 17 class RenderLayer; |
17 | 18 |
18 class LayerPainter { | 19 class LayerPainter { |
19 public: | 20 public: |
20 LayerPainter(RenderLayer& renderLayer) : m_renderLayer(renderLayer) { } | 21 LayerPainter(RenderLayer& renderLayer) : m_renderLayer(renderLayer) { } |
21 | 22 |
22 // The paint() method paints the layers that intersect the damage rect from
back to front. | 23 // The paint() method paints the layers that intersect the damage rect from
back to front. |
23 // paint() assumes that the caller will clip to the bounds of damageRect if
necessary. | 24 // paint() assumes that the caller will clip to the bounds of damageRect if
necessary. |
(...skipping 22 matching lines...) Expand all Loading... |
46 void paintForegroundForFragmentsWithPhase(PaintPhase, const LayerFragments&,
GraphicsContext*, const LayerPaintingInfo&, PaintBehavior, RenderObject* painti
ngRootForRenderer, PaintLayerFlags); | 47 void paintForegroundForFragmentsWithPhase(PaintPhase, const LayerFragments&,
GraphicsContext*, const LayerPaintingInfo&, PaintBehavior, RenderObject* painti
ngRootForRenderer, PaintLayerFlags); |
47 void paintOutlineForFragments(const LayerFragments&, GraphicsContext*, const
LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, Paint
LayerFlags); | 48 void paintOutlineForFragments(const LayerFragments&, GraphicsContext*, const
LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, Paint
LayerFlags); |
48 void paintOverflowControlsForFragments(const LayerFragments&, GraphicsContex
t*, const LayerPaintingInfo&, PaintLayerFlags); | 49 void paintOverflowControlsForFragments(const LayerFragments&, GraphicsContex
t*, const LayerPaintingInfo&, PaintLayerFlags); |
49 void paintMaskForFragments(const LayerFragments&, GraphicsContext*, const La
yerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintLayerFlags); | 50 void paintMaskForFragments(const LayerFragments&, GraphicsContext*, const La
yerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintLayerFlags); |
50 void paintChildClippingMaskForFragments(const LayerFragments&, GraphicsConte
xt*, const LayerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintLayer
Flags); | 51 void paintChildClippingMaskForFragments(const LayerFragments&, GraphicsConte
xt*, const LayerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintLayer
Flags); |
51 void paintTransformedLayerIntoFragments(GraphicsContext*, const LayerPaintin
gInfo&, PaintLayerFlags); | 52 void paintTransformedLayerIntoFragments(GraphicsContext*, const LayerPaintin
gInfo&, PaintLayerFlags); |
52 void beginTransparencyLayers(GraphicsContext*, const RenderLayer* rootLayer,
const LayoutRect& paintDirtyRect, const LayoutSize& subPixelAccumulation, Paint
Behavior); | 53 void beginTransparencyLayers(GraphicsContext*, const RenderLayer* rootLayer,
const LayoutRect& paintDirtyRect, const LayoutSize& subPixelAccumulation, Paint
Behavior); |
53 | 54 |
54 enum BorderRadiusClippingRule { IncludeSelfForBorderRadius, DoNotIncludeSelf
ForBorderRadius }; | 55 enum BorderRadiusClippingRule { IncludeSelfForBorderRadius, DoNotIncludeSelf
ForBorderRadius }; |
55 | 56 |
56 void clipToRect(const LayerPaintingInfo&, GraphicsContext*, const ClipRect&,
PaintLayerFlags, BorderRadiusClippingRule = IncludeSelfForBorderRadius); | 57 void clipToRect(const LayerPaintingInfo&, GraphicsContext*, const ClipRect&,
PaintLayerFlags, PaintClipRecorder*, BorderRadiusClippingRule = IncludeSelfForB
orderRadius); |
57 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C
lipRect&); | 58 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C
lipRect&, PaintClipRecorder*); |
58 | 59 |
59 // Returns whether this layer should be painted during sofware painting (i.e
., not via calls from CompositedLayerMapping to draw into composited | 60 // Returns whether this layer should be painted during sofware painting (i.e
., not via calls from CompositedLayerMapping to draw into composited |
60 // layers). | 61 // layers). |
61 bool shouldPaintLayerInSoftwareMode(const LayerPaintingInfo&, PaintLayerFlag
s paintFlags); | 62 bool shouldPaintLayerInSoftwareMode(const LayerPaintingInfo&, PaintLayerFlag
s paintFlags); |
62 | 63 |
63 RenderLayer& m_renderLayer; | 64 RenderLayer& m_renderLayer; |
64 }; | 65 }; |
65 | 66 |
66 } // namespace blink | 67 } // namespace blink |
67 | 68 |
68 #endif // LayerPainter_h | 69 #endif // LayerPainter_h |
OLD | NEW |