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

Side by Side Diff: sky/engine/core/rendering/style/FillLayer.h

Issue 893093002: Delete remaining masks dead code. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 EFillAttachment attachment() const { return static_cast<EFillAttachment>(m_a ttachment); } 73 EFillAttachment attachment() const { return static_cast<EFillAttachment>(m_a ttachment); }
74 EFillBox clip() const { return static_cast<EFillBox>(m_clip); } 74 EFillBox clip() const { return static_cast<EFillBox>(m_clip); }
75 EFillBox origin() const { return static_cast<EFillBox>(m_origin); } 75 EFillBox origin() const { return static_cast<EFillBox>(m_origin); }
76 EFillRepeat repeatX() const { return static_cast<EFillRepeat>(m_repeatX); } 76 EFillRepeat repeatX() const { return static_cast<EFillRepeat>(m_repeatX); }
77 EFillRepeat repeatY() const { return static_cast<EFillRepeat>(m_repeatY); } 77 EFillRepeat repeatY() const { return static_cast<EFillRepeat>(m_repeatY); }
78 CompositeOperator composite() const { return static_cast<CompositeOperator>( m_composite); } 78 CompositeOperator composite() const { return static_cast<CompositeOperator>( m_composite); }
79 WebBlendMode blendMode() const { return static_cast<WebBlendMode>(m_blendMod e); } 79 WebBlendMode blendMode() const { return static_cast<WebBlendMode>(m_blendMod e); }
80 const LengthSize& sizeLength() const { return m_sizeLength; } 80 const LengthSize& sizeLength() const { return m_sizeLength; }
81 EFillSizeType sizeType() const { return static_cast<EFillSizeType>(m_sizeTyp e); } 81 EFillSizeType sizeType() const { return static_cast<EFillSizeType>(m_sizeTyp e); }
82 FillSize size() const { return FillSize(static_cast<EFillSizeType>(m_sizeTyp e), m_sizeLength); } 82 FillSize size() const { return FillSize(static_cast<EFillSizeType>(m_sizeTyp e), m_sizeLength); }
83 EMaskSourceType maskSourceType() const { return static_cast<EMaskSourceType> (m_maskSourceType); }
84 83
85 const FillLayer* next() const { return m_next; } 84 const FillLayer* next() const { return m_next; }
86 FillLayer* next() { return m_next; } 85 FillLayer* next() { return m_next; }
87 FillLayer* ensureNext() 86 FillLayer* ensureNext()
88 { 87 {
89 if (!m_next) 88 if (!m_next)
90 m_next = new FillLayer(type()); 89 m_next = new FillLayer(type());
91 return m_next; 90 return m_next;
92 } 91 }
93 92
94 bool isImageSet() const { return m_imageSet; } 93 bool isImageSet() const { return m_imageSet; }
95 bool isXPositionSet() const { return m_xPosSet; } 94 bool isXPositionSet() const { return m_xPosSet; }
96 bool isYPositionSet() const { return m_yPosSet; } 95 bool isYPositionSet() const { return m_yPosSet; }
97 bool isBackgroundXOriginSet() const { return m_backgroundXOriginSet; } 96 bool isBackgroundXOriginSet() const { return m_backgroundXOriginSet; }
98 bool isBackgroundYOriginSet() const { return m_backgroundYOriginSet; } 97 bool isBackgroundYOriginSet() const { return m_backgroundYOriginSet; }
99 bool isAttachmentSet() const { return m_attachmentSet; } 98 bool isAttachmentSet() const { return m_attachmentSet; }
100 bool isClipSet() const { return m_clipSet; } 99 bool isClipSet() const { return m_clipSet; }
101 bool isOriginSet() const { return m_originSet; } 100 bool isOriginSet() const { return m_originSet; }
102 bool isRepeatXSet() const { return m_repeatXSet; } 101 bool isRepeatXSet() const { return m_repeatXSet; }
103 bool isRepeatYSet() const { return m_repeatYSet; } 102 bool isRepeatYSet() const { return m_repeatYSet; }
104 bool isCompositeSet() const { return m_compositeSet; } 103 bool isCompositeSet() const { return m_compositeSet; }
105 bool isBlendModeSet() const { return m_blendModeSet; } 104 bool isBlendModeSet() const { return m_blendModeSet; }
106 bool isSizeSet() const { return m_sizeType != SizeNone; } 105 bool isSizeSet() const { return m_sizeType != SizeNone; }
107 bool isMaskSourceTypeSet() const { return m_maskSourceTypeSet; }
108 106
109 void setImage(PassRefPtr<StyleImage> i) { m_image = i; m_imageSet = true; } 107 void setImage(PassRefPtr<StyleImage> i) { m_image = i; m_imageSet = true; }
110 void setXPosition(const Length& position) { m_xPosition = position; m_xPosSe t = true; m_backgroundXOriginSet = false; m_backgroundXOrigin = LeftEdge; } 108 void setXPosition(const Length& position) { m_xPosition = position; m_xPosSe t = true; m_backgroundXOriginSet = false; m_backgroundXOrigin = LeftEdge; }
111 void setYPosition(const Length& position) { m_yPosition = position; m_yPosSe t = true; m_backgroundYOriginSet = false; m_backgroundYOrigin = TopEdge; } 109 void setYPosition(const Length& position) { m_yPosition = position; m_yPosSe t = true; m_backgroundYOriginSet = false; m_backgroundYOrigin = TopEdge; }
112 void setBackgroundXOrigin(BackgroundEdgeOrigin origin) { m_backgroundXOrigin = origin; m_backgroundXOriginSet = true; } 110 void setBackgroundXOrigin(BackgroundEdgeOrigin origin) { m_backgroundXOrigin = origin; m_backgroundXOriginSet = true; }
113 void setBackgroundYOrigin(BackgroundEdgeOrigin origin) { m_backgroundYOrigin = origin; m_backgroundYOriginSet = true; } 111 void setBackgroundYOrigin(BackgroundEdgeOrigin origin) { m_backgroundYOrigin = origin; m_backgroundYOriginSet = true; }
114 void setAttachment(EFillAttachment attachment) { m_attachment = attachment; m_attachmentSet = true; } 112 void setAttachment(EFillAttachment attachment) { m_attachment = attachment; m_attachmentSet = true; }
115 void setClip(EFillBox b) { m_clip = b; m_clipSet = true; } 113 void setClip(EFillBox b) { m_clip = b; m_clipSet = true; }
116 void setOrigin(EFillBox b) { m_origin = b; m_originSet = true; } 114 void setOrigin(EFillBox b) { m_origin = b; m_originSet = true; }
117 void setRepeatX(EFillRepeat r) { m_repeatX = r; m_repeatXSet = true; } 115 void setRepeatX(EFillRepeat r) { m_repeatX = r; m_repeatXSet = true; }
118 void setRepeatY(EFillRepeat r) { m_repeatY = r; m_repeatYSet = true; } 116 void setRepeatY(EFillRepeat r) { m_repeatY = r; m_repeatYSet = true; }
119 void setComposite(CompositeOperator c) { m_composite = c; m_compositeSet = t rue; } 117 void setComposite(CompositeOperator c) { m_composite = c; m_compositeSet = t rue; }
120 void setBlendMode(WebBlendMode b) { m_blendMode = b; m_blendModeSet = true; } 118 void setBlendMode(WebBlendMode b) { m_blendMode = b; m_blendModeSet = true; }
121 void setSizeType(EFillSizeType b) { m_sizeType = b; } 119 void setSizeType(EFillSizeType b) { m_sizeType = b; }
122 void setSizeLength(const LengthSize& l) { m_sizeLength = l; } 120 void setSizeLength(const LengthSize& l) { m_sizeLength = l; }
123 void setSize(FillSize f) { m_sizeType = f.type; m_sizeLength = f.size; } 121 void setSize(FillSize f) { m_sizeType = f.type; m_sizeLength = f.size; }
124 void setMaskSourceType(EMaskSourceType m) { m_maskSourceType = m; m_maskSour ceTypeSet = true; }
125 122
126 void clearImage() { m_image.clear(); m_imageSet = false; } 123 void clearImage() { m_image.clear(); m_imageSet = false; }
127 void clearXPosition() 124 void clearXPosition()
128 { 125 {
129 m_xPosSet = false; 126 m_xPosSet = false;
130 m_backgroundXOriginSet = false; 127 m_backgroundXOriginSet = false;
131 } 128 }
132 void clearYPosition() 129 void clearYPosition()
133 { 130 {
134 m_yPosSet = false; 131 m_yPosSet = false;
135 m_backgroundYOriginSet = false; 132 m_backgroundYOriginSet = false;
136 } 133 }
137 134
138 void clearAttachment() { m_attachmentSet = false; } 135 void clearAttachment() { m_attachmentSet = false; }
139 void clearClip() { m_clipSet = false; } 136 void clearClip() { m_clipSet = false; }
140 void clearOrigin() { m_originSet = false; } 137 void clearOrigin() { m_originSet = false; }
141 void clearRepeatX() { m_repeatXSet = false; } 138 void clearRepeatX() { m_repeatXSet = false; }
142 void clearRepeatY() { m_repeatYSet = false; } 139 void clearRepeatY() { m_repeatYSet = false; }
143 void clearComposite() { m_compositeSet = false; } 140 void clearComposite() { m_compositeSet = false; }
144 void clearBlendMode() { m_blendModeSet = false; } 141 void clearBlendMode() { m_blendModeSet = false; }
145 void clearSize() { m_sizeType = SizeNone; } 142 void clearSize() { m_sizeType = SizeNone; }
146 void clearMaskSourceType() { m_maskSourceTypeSet = false; }
147 143
148 FillLayer& operator=(const FillLayer& o); 144 FillLayer& operator=(const FillLayer& o);
149 FillLayer(const FillLayer& o); 145 FillLayer(const FillLayer& o);
150 146
151 bool operator==(const FillLayer& o) const; 147 bool operator==(const FillLayer& o) const;
152 bool operator!=(const FillLayer& o) const 148 bool operator!=(const FillLayer& o) const
153 { 149 {
154 return !(*this == o); 150 return !(*this == o);
155 } 151 }
156 152
(...skipping 29 matching lines...) Expand all
186 static EFillRepeat initialFillRepeatX(EFillLayerType) { return NoRepeatFill; } 182 static EFillRepeat initialFillRepeatX(EFillLayerType) { return NoRepeatFill; }
187 static EFillRepeat initialFillRepeatY(EFillLayerType) { return NoRepeatFill; } 183 static EFillRepeat initialFillRepeatY(EFillLayerType) { return NoRepeatFill; }
188 static CompositeOperator initialFillComposite(EFillLayerType) { return Compo siteSourceOver; } 184 static CompositeOperator initialFillComposite(EFillLayerType) { return Compo siteSourceOver; }
189 static WebBlendMode initialFillBlendMode(EFillLayerType) { return WebBlendMo deNormal; } 185 static WebBlendMode initialFillBlendMode(EFillLayerType) { return WebBlendMo deNormal; }
190 static EFillSizeType initialFillSizeType(EFillLayerType) { return SizeLength ; } 186 static EFillSizeType initialFillSizeType(EFillLayerType) { return SizeLength ; }
191 static LengthSize initialFillSizeLength(EFillLayerType) { return LengthSize( ); } 187 static LengthSize initialFillSizeLength(EFillLayerType) { return LengthSize( ); }
192 static FillSize initialFillSize(EFillLayerType type) { return FillSize(initi alFillSizeType(type), initialFillSizeLength(type)); } 188 static FillSize initialFillSize(EFillLayerType type) { return FillSize(initi alFillSizeType(type), initialFillSizeLength(type)); }
193 static Length initialFillXPosition(EFillLayerType) { return Length(0.0, Perc ent); } 189 static Length initialFillXPosition(EFillLayerType) { return Length(0.0, Perc ent); }
194 static Length initialFillYPosition(EFillLayerType) { return Length(0.0, Perc ent); } 190 static Length initialFillYPosition(EFillLayerType) { return Length(0.0, Perc ent); }
195 static StyleImage* initialFillImage(EFillLayerType) { return 0; } 191 static StyleImage* initialFillImage(EFillLayerType) { return 0; }
196 static EMaskSourceType initialFillMaskSourceType(EFillLayerType) { return Ma skAlpha; }
197 192
198 private: 193 private:
199 friend class RenderStyle; 194 friend class RenderStyle;
200 195
201 void computeClipMax() const; 196 void computeClipMax() const;
202 197
203 FillLayer() { } 198 FillLayer() { }
204 199
205 FillLayer* m_next; 200 FillLayer* m_next;
206 201
207 RefPtr<StyleImage> m_image; 202 RefPtr<StyleImage> m_image;
208 203
209 Length m_xPosition; 204 Length m_xPosition;
210 Length m_yPosition; 205 Length m_yPosition;
211 206
212 LengthSize m_sizeLength; 207 LengthSize m_sizeLength;
213 208
214 unsigned m_attachment : 2; // EFillAttachment 209 unsigned m_attachment : 2; // EFillAttachment
215 unsigned m_clip : 2; // EFillBox 210 unsigned m_clip : 2; // EFillBox
216 unsigned m_origin : 2; // EFillBox 211 unsigned m_origin : 2; // EFillBox
217 unsigned m_repeatX : 3; // EFillRepeat 212 unsigned m_repeatX : 3; // EFillRepeat
218 unsigned m_repeatY : 3; // EFillRepeat 213 unsigned m_repeatY : 3; // EFillRepeat
219 unsigned m_composite : 4; // CompositeOperator 214 unsigned m_composite : 4; // CompositeOperator
220 unsigned m_sizeType : 2; // EFillSizeType 215 unsigned m_sizeType : 2; // EFillSizeType
221 unsigned m_blendMode : 5; // WebBlendMode 216 unsigned m_blendMode : 5; // WebBlendMode
222 unsigned m_maskSourceType : 1; // EMaskSourceType
223 unsigned m_backgroundXOrigin : 2; // BackgroundEdgeOrigin 217 unsigned m_backgroundXOrigin : 2; // BackgroundEdgeOrigin
224 unsigned m_backgroundYOrigin : 2; // BackgroundEdgeOrigin 218 unsigned m_backgroundYOrigin : 2; // BackgroundEdgeOrigin
225 219
226 unsigned m_imageSet : 1; 220 unsigned m_imageSet : 1;
227 unsigned m_attachmentSet : 1; 221 unsigned m_attachmentSet : 1;
228 unsigned m_clipSet : 1; 222 unsigned m_clipSet : 1;
229 unsigned m_originSet : 1; 223 unsigned m_originSet : 1;
230 unsigned m_repeatXSet : 1; 224 unsigned m_repeatXSet : 1;
231 unsigned m_repeatYSet : 1; 225 unsigned m_repeatYSet : 1;
232 unsigned m_xPosSet : 1; 226 unsigned m_xPosSet : 1;
233 unsigned m_yPosSet : 1; 227 unsigned m_yPosSet : 1;
234 unsigned m_backgroundXOriginSet : 1; 228 unsigned m_backgroundXOriginSet : 1;
235 unsigned m_backgroundYOriginSet : 1; 229 unsigned m_backgroundYOriginSet : 1;
236 unsigned m_compositeSet : 1; 230 unsigned m_compositeSet : 1;
237 unsigned m_blendModeSet : 1; 231 unsigned m_blendModeSet : 1;
238 unsigned m_maskSourceTypeSet : 1;
239 232
240 unsigned m_type : 1; // EFillLayerType 233 unsigned m_type : 1; // EFillLayerType
241 234
242 mutable unsigned m_clipMax : 2; // EFillBox, maximum m_clip value from this to bottom layer 235 mutable unsigned m_clipMax : 2; // EFillBox, maximum m_clip value from this to bottom layer
243 }; 236 };
244 237
245 } // namespace blink 238 } // namespace blink
246 239
247 #endif // SKY_ENGINE_CORE_RENDERING_STYLE_FILLLAYER_H_ 240 #endif // SKY_ENGINE_CORE_RENDERING_STYLE_FILLLAYER_H_
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderObject.cpp ('k') | sky/engine/core/rendering/style/FillLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698