OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 3 * Copyright (C) 2013 Intel Corporation. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 }; | 140 }; |
141 | 141 |
142 // Offset is origin of the renderer minus origin of the graphics layer (so e
ither zero or negative). | 142 // Offset is origin of the renderer minus origin of the graphics layer (so e
ither zero or negative). |
143 IntSize offsetFromRenderer() const { return m_offsetFromRenderer; } | 143 IntSize offsetFromRenderer() const { return m_offsetFromRenderer; } |
144 void setOffsetFromRenderer(const IntSize&, ShouldSetNeedsDisplay = SetNeedsD
isplay); | 144 void setOffsetFromRenderer(const IntSize&, ShouldSetNeedsDisplay = SetNeedsD
isplay); |
145 | 145 |
146 // The position of the layer (the location of its top-left corner in its par
ent) | 146 // The position of the layer (the location of its top-left corner in its par
ent) |
147 const FloatPoint& position() const { return m_position; } | 147 const FloatPoint& position() const { return m_position; } |
148 void setPosition(const FloatPoint&); | 148 void setPosition(const FloatPoint&); |
149 | 149 |
150 // Anchor point: (0, 0) is top left, (1, 1) is bottom right. The anchor poin
t | |
151 // affects the origin of the transforms. | |
152 // DEPRECATED, to be removed soon. | |
153 const FloatPoint3D& anchorPoint() const { return m_anchorPoint; } | |
154 void setAnchorPoint(const FloatPoint3D&); | |
155 | |
156 const FloatPoint3D& transformOrigin() const { return m_transformOrigin; } | 150 const FloatPoint3D& transformOrigin() const { return m_transformOrigin; } |
157 void setTransformOrigin(const FloatPoint3D&); | 151 void setTransformOrigin(const FloatPoint3D&); |
158 | 152 |
159 // The size of the layer. | 153 // The size of the layer. |
160 const FloatSize& size() const { return m_size; } | 154 const FloatSize& size() const { return m_size; } |
161 void setSize(const FloatSize&); | 155 void setSize(const FloatSize&); |
162 | 156 |
163 // The boundOrigin affects the offset at which content is rendered, and subl
ayers are positioned. | 157 // The boundOrigin affects the offset at which content is rendered, and subl
ayers are positioned. |
164 const FloatPoint& boundsOrigin() const { return m_boundsOrigin; } | 158 const FloatPoint& boundsOrigin() const { return m_boundsOrigin; } |
165 void setBoundsOrigin(const FloatPoint& origin) { m_boundsOrigin = origin; } | 159 void setBoundsOrigin(const FloatPoint& origin) { m_boundsOrigin = origin; } |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 void clearContentsLayerIfUnregistered(); | 327 void clearContentsLayerIfUnregistered(); |
334 blink::WebLayer* contentsLayerIfRegistered(); | 328 blink::WebLayer* contentsLayerIfRegistered(); |
335 | 329 |
336 GraphicsLayerClient* m_client; | 330 GraphicsLayerClient* m_client; |
337 | 331 |
338 // Offset from the owning renderer | 332 // Offset from the owning renderer |
339 IntSize m_offsetFromRenderer; | 333 IntSize m_offsetFromRenderer; |
340 | 334 |
341 // Position is relative to the parent GraphicsLayer | 335 // Position is relative to the parent GraphicsLayer |
342 FloatPoint m_position; | 336 FloatPoint m_position; |
343 FloatPoint3D m_anchorPoint; | |
344 FloatSize m_size; | 337 FloatSize m_size; |
345 FloatPoint m_boundsOrigin; | 338 FloatPoint m_boundsOrigin; |
346 | 339 |
347 TransformationMatrix m_transform; | 340 TransformationMatrix m_transform; |
348 FloatPoint3D m_transformOrigin; | 341 FloatPoint3D m_transformOrigin; |
349 | 342 |
350 Color m_backgroundColor; | 343 Color m_backgroundColor; |
351 float m_opacity; | 344 float m_opacity; |
352 float m_zPosition; | 345 float m_zPosition; |
353 | 346 |
354 blink::WebBlendMode m_blendMode; | 347 blink::WebBlendMode m_blendMode; |
355 | 348 |
356 FilterOperations m_filters; | 349 FilterOperations m_filters; |
357 | 350 |
| 351 bool m_hasTransformOrigin : 1; |
358 bool m_contentsOpaque : 1; | 352 bool m_contentsOpaque : 1; |
359 bool m_shouldFlattenTransform: 1; | 353 bool m_shouldFlattenTransform: 1; |
360 bool m_backfaceVisibility : 1; | 354 bool m_backfaceVisibility : 1; |
361 bool m_masksToBounds : 1; | 355 bool m_masksToBounds : 1; |
362 bool m_drawsContent : 1; | 356 bool m_drawsContent : 1; |
363 bool m_contentsVisible : 1; | 357 bool m_contentsVisible : 1; |
364 bool m_isRootForIsolatedGroup : 1; | 358 bool m_isRootForIsolatedGroup : 1; |
365 | 359 |
366 bool m_hasScrollParent : 1; | 360 bool m_hasScrollParent : 1; |
367 bool m_hasClipParent : 1; | 361 bool m_hasClipParent : 1; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 }; | 398 }; |
405 | 399 |
406 } // namespace WebCore | 400 } // namespace WebCore |
407 | 401 |
408 #ifndef NDEBUG | 402 #ifndef NDEBUG |
409 // Outside the WebCore namespace for ease of invocation from gdb. | 403 // Outside the WebCore namespace for ease of invocation from gdb. |
410 void PLATFORM_EXPORT showGraphicsLayerTree(const WebCore::GraphicsLayer*); | 404 void PLATFORM_EXPORT showGraphicsLayerTree(const WebCore::GraphicsLayer*); |
411 #endif | 405 #endif |
412 | 406 |
413 #endif // GraphicsLayer_h | 407 #endif // GraphicsLayer_h |
OLD | NEW |