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 |
(...skipping 19 matching lines...) Expand all Loading... |
30 void paintOverlayScrollbars(GraphicsContext*, const LayoutRect& damageRect,
PaintBehavior, RenderObject* paintingRoot = 0); | 30 void paintOverlayScrollbars(GraphicsContext*, const LayoutRect& damageRect,
PaintBehavior, RenderObject* paintingRoot = 0); |
31 | 31 |
32 private: | 32 private: |
33 | 33 |
34 void paintLayerContentsAndReflection(GraphicsContext*, const LayerPaintingIn
fo&, PaintLayerFlags); | 34 void paintLayerContentsAndReflection(GraphicsContext*, const LayerPaintingIn
fo&, PaintLayerFlags); |
35 void paintLayerByApplyingTransform(GraphicsContext*, const LayerPaintingInfo
&, PaintLayerFlags, const LayoutPoint& translationOffset = LayoutPoint()); | 35 void paintLayerByApplyingTransform(GraphicsContext*, const LayerPaintingInfo
&, PaintLayerFlags, const LayoutPoint& translationOffset = LayoutPoint()); |
36 | 36 |
37 void paintChildren(unsigned childrenToVisit, GraphicsContext*, const LayerPa
intingInfo&, PaintLayerFlags); | 37 void paintChildren(unsigned childrenToVisit, GraphicsContext*, const LayerPa
intingInfo&, PaintLayerFlags); |
38 void paintPaginatedChildLayer(RenderLayer* childLayer, GraphicsContext*, con
st LayerPaintingInfo&, PaintLayerFlags); | 38 void paintPaginatedChildLayer(RenderLayer* childLayer, GraphicsContext*, con
st LayerPaintingInfo&, PaintLayerFlags); |
39 void paintChildLayerIntoColumns(RenderLayer* childLayer, GraphicsContext*, c
onst LayerPaintingInfo&, PaintLayerFlags, const Vector<RenderLayer*>& columnLaye
rs, size_t columnIndex); | 39 void paintChildLayerIntoColumns(RenderLayer* childLayer, GraphicsContext*, c
onst LayerPaintingInfo&, PaintLayerFlags, const Vector<RenderLayer*>& columnLaye
rs, size_t columnIndex); |
40 void updatePaintingInfoForFragments(LayerFragments&, const LayerPaintingInfo
&, PaintLayerFlags, bool shouldPaintContent, const LayoutPoint* offsetFromRoot); | |
41 void paintBackgroundForFragments(const LayerFragments&, GraphicsContext*, | 40 void paintBackgroundForFragments(const LayerFragments&, GraphicsContext*, |
42 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con
st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, Pai
ntLayerFlags); | 41 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con
st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, Pai
ntLayerFlags); |
43 void paintForegroundForFragments(const LayerFragments&, GraphicsContext*, | 42 void paintForegroundForFragments(const LayerFragments&, GraphicsContext*, |
44 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con
st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, | 43 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con
st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, |
45 bool selectionOnly, PaintLayerFlags); | 44 bool selectionOnly, PaintLayerFlags); |
46 void paintForegroundForFragmentsWithPhase(PaintPhase, const LayerFragments&,
GraphicsContext*, const LayerPaintingInfo&, PaintBehavior, RenderObject* painti
ngRootForRenderer, PaintLayerFlags); | 45 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); | 46 void paintOutlineForFragments(const LayerFragments&, GraphicsContext*, const
LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, Paint
LayerFlags); |
48 void paintOverflowControlsForFragments(const LayerFragments&, GraphicsContex
t*, const LayerPaintingInfo&, PaintLayerFlags); | 47 void paintOverflowControlsForFragments(const LayerFragments&, GraphicsContex
t*, const LayerPaintingInfo&, PaintLayerFlags); |
49 void paintMaskForFragments(const LayerFragments&, GraphicsContext*, const La
yerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintLayerFlags); | 48 void paintMaskForFragments(const LayerFragments&, GraphicsContext*, const La
yerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintLayerFlags); |
50 void paintChildClippingMaskForFragments(const LayerFragments&, GraphicsConte
xt*, const LayerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintLayer
Flags); | 49 void paintChildClippingMaskForFragments(const LayerFragments&, GraphicsConte
xt*, const LayerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintLayer
Flags); |
51 void paintTransformedLayerIntoFragments(GraphicsContext*, const LayerPaintin
gInfo&, PaintLayerFlags); | 50 void paintTransformedLayerIntoFragments(GraphicsContext*, const LayerPaintin
gInfo&, PaintLayerFlags); |
52 void beginTransparencyLayers(GraphicsContext*, const RenderLayer* rootLayer,
const LayoutRect& paintDirtyRect, const LayoutSize& subPixelAccumulation, Paint
Behavior); | 51 void beginTransparencyLayers(GraphicsContext*, const RenderLayer* rootLayer,
const LayoutRect& paintDirtyRect, const LayoutSize& subPixelAccumulation, Paint
Behavior); |
53 | 52 |
54 enum BorderRadiusClippingRule { IncludeSelfForBorderRadius, DoNotIncludeSelf
ForBorderRadius }; | 53 enum BorderRadiusClippingRule { IncludeSelfForBorderRadius, DoNotIncludeSelf
ForBorderRadius }; |
55 | 54 |
56 void clipToRect(const LayerPaintingInfo&, GraphicsContext*, const ClipRect&,
PaintLayerFlags, BorderRadiusClippingRule = IncludeSelfForBorderRadius); | 55 void clipToRect(const LayerPaintingInfo&, GraphicsContext*, const ClipRect&,
PaintLayerFlags, BorderRadiusClippingRule = IncludeSelfForBorderRadius); |
57 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C
lipRect&); | 56 void restoreClip(GraphicsContext*, const LayoutRect& paintDirtyRect, const C
lipRect&); |
58 | 57 |
59 // Returns whether this layer should be painted during sofware painting (i.e
., not via calls from CompositedLayerMapping to draw into composited | 58 // Returns whether this layer should be painted during sofware painting (i.e
., not via calls from CompositedLayerMapping to draw into composited |
60 // layers). | 59 // layers). |
61 bool shouldPaintLayerInSoftwareMode(const LayerPaintingInfo&, PaintLayerFlag
s paintFlags); | 60 bool shouldPaintLayerInSoftwareMode(const LayerPaintingInfo&, PaintLayerFlag
s paintFlags); |
62 | 61 |
63 RenderLayer& m_renderLayer; | 62 RenderLayer& m_renderLayer; |
64 }; | 63 }; |
65 | 64 |
66 } // namespace blink | 65 } // namespace blink |
67 | 66 |
68 #endif // LayerPainter_h | 67 #endif // LayerPainter_h |
OLD | NEW |