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

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

Issue 945803004: Merge back LayoutLayerModelObject into RenderBoxModelObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Better rebasing. Created 5 years, 10 months 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/BoxPainter.cpp ('k') | Source/core/paint/LayerClipRecorder.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 LayerClipRecorder_h 5 #ifndef LayerClipRecorder_h
6 #define LayerClipRecorder_h 6 #define LayerClipRecorder_h
7 7
8 #include "core/layout/LayerPaintingInfo.h" 8 #include "core/layout/LayerPaintingInfo.h"
9 #include "core/layout/PaintPhase.h" 9 #include "core/layout/PaintPhase.h"
10 #include "platform/graphics/paint/ClipDisplayItem.h" 10 #include "platform/graphics/paint/ClipDisplayItem.h"
11 #include "platform/graphics/paint/DisplayItem.h" 11 #include "platform/graphics/paint/DisplayItem.h"
12 #include "wtf/Vector.h" 12 #include "wtf/Vector.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class ClipRect; 16 class ClipRect;
17 class GraphicsContext; 17 class GraphicsContext;
18 class LayoutLayerModelObject; 18 class LayoutBoxModelObject;
19 19
20 class LayerClipRecorder { 20 class LayerClipRecorder {
21 public: 21 public:
22 22
23 enum BorderRadiusClippingRule { IncludeSelfForBorderRadius, DoNotIncludeSelf ForBorderRadius }; 23 enum BorderRadiusClippingRule { IncludeSelfForBorderRadius, DoNotIncludeSelf ForBorderRadius };
24 24
25 // Set rounded clip rectangles defined by border radii all the way from the LayerPaintingInfo 25 // Set rounded clip rectangles defined by border radii all the way from the LayerPaintingInfo
26 // "root" layer down to the specified layer (or the parent of said layer, in case 26 // "root" layer down to the specified layer (or the parent of said layer, in case
27 // BorderRadiusClippingRule says to skip self). fragmentOffset is used for m ulticol, to specify 27 // BorderRadiusClippingRule says to skip self). fragmentOffset is used for m ulticol, to specify
28 // the translation required to get from flow thread coordinates to visual co ordinates for a 28 // the translation required to get from flow thread coordinates to visual co ordinates for a
29 // certain column. 29 // certain column.
30 // FIXME: The BorderRadiusClippingRule parameter is really useless now. If w e want to skip self, 30 // FIXME: The BorderRadiusClippingRule parameter is really useless now. If w e want to skip self,
31 // why not just supply the parent layer as the first parameter instead? 31 // why not just supply the parent layer as the first parameter instead?
32 // FIXME: The ClipRect passed is in visual coordinates (not flow thread coor dinates), but at the 32 // FIXME: The ClipRect passed is in visual coordinates (not flow thread coor dinates), but at the
33 // same time we pass a fragmentOffset, so that we can translate from flow th read coordinates to 33 // same time we pass a fragmentOffset, so that we can translate from flow th read coordinates to
34 // visual coordinates. This may look rather confusing/redundant, but it is n eeded for rounded 34 // visual coordinates. This may look rather confusing/redundant, but it is n eeded for rounded
35 // border clipping. Would be nice to clean up this. 35 // border clipping. Would be nice to clean up this.
36 explicit LayerClipRecorder(const LayoutLayerModelObject*, GraphicsContext*, DisplayItem::Type, const ClipRect&, const LayerPaintingInfo* localPaintingInfo, const LayoutPoint& fragmentOffset, PaintLayerFlags, BorderRadiusClippingRule = I ncludeSelfForBorderRadius); 36 explicit LayerClipRecorder(const LayoutBoxModelObject*, GraphicsContext*, Di splayItem::Type, const ClipRect&, const LayerPaintingInfo* localPaintingInfo, co nst LayoutPoint& fragmentOffset, PaintLayerFlags, BorderRadiusClippingRule = Inc ludeSelfForBorderRadius);
37 37
38 ~LayerClipRecorder(); 38 ~LayerClipRecorder();
39 39
40 private: 40 private:
41 41
42 void collectRoundedRectClips(Layer&, const LayerPaintingInfo& localPaintingI nfo, GraphicsContext*, const LayoutPoint& fragmentOffset, PaintLayerFlags, 42 void collectRoundedRectClips(Layer&, const LayerPaintingInfo& localPaintingI nfo, GraphicsContext*, const LayoutPoint& fragmentOffset, PaintLayerFlags,
43 BorderRadiusClippingRule, Vector<FloatRoundedRect>& roundedRectClips); 43 BorderRadiusClippingRule, Vector<FloatRoundedRect>& roundedRectClips);
44 44
45 GraphicsContext* m_graphicsContext; 45 GraphicsContext* m_graphicsContext;
46 const LayoutLayerModelObject* m_renderer; 46 const LayoutBoxModelObject* m_renderer;
47 DisplayItem::Type m_clipType; 47 DisplayItem::Type m_clipType;
48 }; 48 };
49 49
50 } // namespace blink 50 } // namespace blink
51 51
52 #endif // LayerDisplayList_h 52 #endif // LayerDisplayList_h
OLDNEW
« no previous file with comments | « Source/core/paint/BoxPainter.cpp ('k') | Source/core/paint/LayerClipRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698