Chromium Code Reviews| 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; |
| 342 bool m_transformOriginSet : 1; | |
|
ojan
2014/06/05 21:52:21
This doesn't pack well (wastes 32 bits). Please pu
| |
| 349 | 343 |
| 350 Color m_backgroundColor; | 344 Color m_backgroundColor; |
| 351 float m_opacity; | 345 float m_opacity; |
| 352 float m_zPosition; | 346 float m_zPosition; |
| 353 | 347 |
| 354 blink::WebBlendMode m_blendMode; | 348 blink::WebBlendMode m_blendMode; |
| 355 | 349 |
| 356 FilterOperations m_filters; | 350 FilterOperations m_filters; |
| 357 | 351 |
| 358 bool m_contentsOpaque : 1; | 352 bool m_contentsOpaque : 1; |
| (...skipping 45 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 |