Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: Source/core/paint/LayerPainter.h

Issue 723683002: Factor remaining filter code of out LayerPainter and into FilterPainter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/paint/FilterPainter.cpp ('k') | Source/core/paint/LayerPainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/paint/ClipRecorder.h" 8 #include "core/paint/ClipRecorder.h"
9 #include "core/rendering/LayerFragment.h" 9 #include "core/rendering/LayerFragment.h"
10 #include "core/rendering/LayerPaintingInfo.h" 10 #include "core/rendering/LayerPaintingInfo.h"
(...skipping 13 matching lines...) Expand all
24 void paint(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior = P aintBehaviorNormal, RenderObject* paintingRoot = 0, PaintLayerFlags = 0); 24 void paint(GraphicsContext*, const LayoutRect& damageRect, PaintBehavior = P aintBehaviorNormal, RenderObject* paintingRoot = 0, PaintLayerFlags = 0);
25 // paintLayer() assumes that the caller will clip to the bounds of the paint ing dirty if necessary. 25 // paintLayer() assumes that the caller will clip to the bounds of the paint ing dirty if necessary.
26 void paintLayer(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags) ; 26 void paintLayer(GraphicsContext*, const LayerPaintingInfo&, PaintLayerFlags) ;
27 // paintLayerContents() assumes that the caller will clip to the bounds of t he painting dirty rect if necessary. 27 // paintLayerContents() assumes that the caller will clip to the bounds of t he painting dirty rect if necessary.
28 void paintLayerContents(GraphicsContext*, const LayerPaintingInfo&, PaintLay erFlags); 28 void paintLayerContents(GraphicsContext*, const LayerPaintingInfo&, PaintLay erFlags);
29 29
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 enum BorderRadiusClippingRule { IncludeSelfForBorderRadius, DoNotIncludeSelf ForBorderRadius }; 32 enum BorderRadiusClippingRule { IncludeSelfForBorderRadius, DoNotIncludeSelf ForBorderRadius };
33 static void applyRoundedRectClips(RenderLayer&, const LayerPaintingInfo&, Gr aphicsContext*, PaintLayerFlags, ClipRecorder&, BorderRadiusClippingRule = Inclu deSelfForBorderRadius); 33 static void applyRoundedRectClips(RenderLayer&, const LayerPaintingInfo&, Gr aphicsContext*, PaintLayerFlags, ClipRecorder&, BorderRadiusClippingRule = Inclu deSelfForBorderRadius);
34 static void beginTransparencyLayers(GraphicsContext*, RenderLayer&, const Re nderLayer* rootLayer, const LayoutRect& paintDirtyRect, const LayoutSize& subPix elAccumulation, PaintBehavior);
34 35
35 private: 36 private:
36 enum ClipState { HasNotClipped, HasClipped }; 37 enum ClipState { HasNotClipped, HasClipped };
37 38
38 void paintLayerContentsAndReflection(GraphicsContext*, const LayerPaintingIn fo&, PaintLayerFlags); 39 void paintLayerContentsAndReflection(GraphicsContext*, const LayerPaintingIn fo&, PaintLayerFlags);
39 void paintLayerByApplyingTransform(GraphicsContext*, const LayerPaintingInfo &, PaintLayerFlags, const LayoutPoint& translationOffset = LayoutPoint()); 40 void paintLayerByApplyingTransform(GraphicsContext*, const LayerPaintingInfo &, PaintLayerFlags, const LayoutPoint& translationOffset = LayoutPoint());
40 41
41 void paintChildren(unsigned childrenToVisit, GraphicsContext*, const LayerPa intingInfo&, PaintLayerFlags); 42 void paintChildren(unsigned childrenToVisit, GraphicsContext*, const LayerPa intingInfo&, PaintLayerFlags);
42 void paintPaginatedChildLayer(RenderLayer* childLayer, GraphicsContext*, con st LayerPaintingInfo&, PaintLayerFlags); 43 void paintPaginatedChildLayer(RenderLayer* childLayer, GraphicsContext*, con st LayerPaintingInfo&, PaintLayerFlags);
43 void paintChildLayerIntoColumns(RenderLayer* childLayer, GraphicsContext*, c onst LayerPaintingInfo&, PaintLayerFlags, const Vector<RenderLayer*>& columnLaye rs, size_t columnIndex); 44 void paintChildLayerIntoColumns(RenderLayer* childLayer, GraphicsContext*, c onst LayerPaintingInfo&, PaintLayerFlags, const Vector<RenderLayer*>& columnLaye rs, size_t columnIndex);
44 bool atLeastOneFragmentIntersectsDamageRect(LayerFragments&, const LayerPain tingInfo&, PaintLayerFlags, const LayoutPoint& offsetFromRoot); 45 bool atLeastOneFragmentIntersectsDamageRect(LayerFragments&, const LayerPain tingInfo&, PaintLayerFlags, const LayoutPoint& offsetFromRoot);
45 void paintFragmentWithPhase(PaintPhase, const LayerFragment&, GraphicsContex t*, const ClipRect&, const LayerPaintingInfo&, PaintBehavior, RenderObject* pain tingRootForRenderer, PaintLayerFlags, ClipState); 46 void paintFragmentWithPhase(PaintPhase, const LayerFragment&, GraphicsContex t*, const ClipRect&, const LayerPaintingInfo&, PaintBehavior, RenderObject* pain tingRootForRenderer, PaintLayerFlags, ClipState);
46 void paintBackgroundForFragments(const LayerFragments&, GraphicsContext*, 47 void paintBackgroundForFragments(const LayerFragments&, GraphicsContext*,
47 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, Pai ntLayerFlags); 48 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, Pai ntLayerFlags);
48 void paintForegroundForFragments(const LayerFragments&, GraphicsContext*, 49 void paintForegroundForFragments(const LayerFragments&, GraphicsContext*,
49 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, 50 const LayoutRect& transparencyPaintDirtyRect, bool haveTransparency, con st LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer,
50 bool selectionOnly, PaintLayerFlags); 51 bool selectionOnly, PaintLayerFlags);
51 void paintForegroundForFragmentsWithPhase(PaintPhase, const LayerFragments&, GraphicsContext*, const LayerPaintingInfo&, PaintBehavior, RenderObject* painti ngRootForRenderer, PaintLayerFlags, ClipState); 52 void paintForegroundForFragmentsWithPhase(PaintPhase, const LayerFragments&, GraphicsContext*, const LayerPaintingInfo&, PaintBehavior, RenderObject* painti ngRootForRenderer, PaintLayerFlags, ClipState);
52 void paintOutlineForFragments(const LayerFragments&, GraphicsContext*, const LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, Paint LayerFlags); 53 void paintOutlineForFragments(const LayerFragments&, GraphicsContext*, const LayerPaintingInfo&, PaintBehavior, RenderObject* paintingRootForRenderer, Paint LayerFlags);
53 void paintOverflowControlsForFragments(const LayerFragments&, GraphicsContex t*, const LayerPaintingInfo&, PaintLayerFlags); 54 void paintOverflowControlsForFragments(const LayerFragments&, GraphicsContex t*, const LayerPaintingInfo&, PaintLayerFlags);
54 void paintMaskForFragments(const LayerFragments&, GraphicsContext*, const La yerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintLayerFlags); 55 void paintMaskForFragments(const LayerFragments&, GraphicsContext*, const La yerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintLayerFlags);
55 void paintChildClippingMaskForFragments(const LayerFragments&, GraphicsConte xt*, const LayerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintLayer Flags); 56 void paintChildClippingMaskForFragments(const LayerFragments&, GraphicsConte xt*, const LayerPaintingInfo&, RenderObject* paintingRootForRenderer, PaintLayer Flags);
56 void paintTransformedLayerIntoFragments(GraphicsContext*, const LayerPaintin gInfo&, PaintLayerFlags); 57 void paintTransformedLayerIntoFragments(GraphicsContext*, const LayerPaintin gInfo&, PaintLayerFlags);
57 void beginTransparencyLayers(GraphicsContext*, const RenderLayer* rootLayer, const LayoutRect& paintDirtyRect, const LayoutSize& subPixelAccumulation, Paint Behavior);
58 58
59 static bool needsToClip(const LayerPaintingInfo& localPaintingInfo, const Cl ipRect&); 59 static bool needsToClip(const LayerPaintingInfo& localPaintingInfo, const Cl ipRect&);
60 60
61 // Returns whether this layer should be painted during sofware painting (i.e ., not via calls from CompositedLayerMapping to draw into composited 61 // Returns whether this layer should be painted during sofware painting (i.e ., not via calls from CompositedLayerMapping to draw into composited
62 // layers). 62 // layers).
63 bool shouldPaintLayerInSoftwareMode(const LayerPaintingInfo&, PaintLayerFlag s paintFlags); 63 bool shouldPaintLayerInSoftwareMode(const LayerPaintingInfo&, PaintLayerFlag s paintFlags);
64 64
65 RenderLayer& m_renderLayer; 65 RenderLayer& m_renderLayer;
66 }; 66 };
67 67
68 } // namespace blink 68 } // namespace blink
69 69
70 #endif // LayerPainter_h 70 #endif // LayerPainter_h
OLDNEW
« no previous file with comments | « Source/core/paint/FilterPainter.cpp ('k') | Source/core/paint/LayerPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698