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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 // Return true if the animation is handled by the compositing system. If thi
s returns | 225 // Return true if the animation is handled by the compositing system. If thi
s returns |
226 // false, the animation will be run by AnimationController. | 226 // false, the animation will be run by AnimationController. |
227 // These methods handle both transitions and keyframe animations. | 227 // These methods handle both transitions and keyframe animations. |
228 bool addAnimation(PassOwnPtr<blink::WebAnimation>); | 228 bool addAnimation(PassOwnPtr<blink::WebAnimation>); |
229 void pauseAnimation(int animationId, double /*timeOffset*/); | 229 void pauseAnimation(int animationId, double /*timeOffset*/); |
230 void removeAnimation(int animationId); | 230 void removeAnimation(int animationId); |
231 | 231 |
232 // Layer contents | 232 // Layer contents |
233 void setContentsToImage(Image*); | 233 void setContentsToImage(Image*); |
234 void setContentsToNinePatch(Image*, const IntRect& aperture); | 234 void setContentsToNinePatch(Image*, const IntRect& aperture); |
235 void setContentsToSolidColor(const Color&); | |
236 void setContentsToPlatformLayer(blink::WebLayer* layer) { setContentsTo(laye
r); } | 235 void setContentsToPlatformLayer(blink::WebLayer* layer) { setContentsTo(laye
r); } |
237 bool hasContentsLayer() const { return m_contentsLayer; } | 236 bool hasContentsLayer() const { return m_contentsLayer; } |
238 | 237 |
239 // Callback from the underlying graphics system to draw layer contents. | 238 // Callback from the underlying graphics system to draw layer contents. |
240 void paintGraphicsLayerContents(GraphicsContext&, const IntRect& clip); | 239 void paintGraphicsLayerContents(GraphicsContext&, const IntRect& clip); |
241 | 240 |
242 // For hosting this GraphicsLayer in a native layer hierarchy. | 241 // For hosting this GraphicsLayer in a native layer hierarchy. |
243 blink::WebLayer* platformLayer() const; | 242 blink::WebLayer* platformLayer() const; |
244 | 243 |
245 enum CompositingCoordinatesOrientation { CompositingCoordinatesTopDown, Comp
ositingCoordinatesBottomUp }; | 244 enum CompositingCoordinatesOrientation { CompositingCoordinatesTopDown, Comp
ositingCoordinatesBottomUp }; |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 GraphicsLayer* m_replicatedLayer; // For a replica layer, a reference to the
original layer. | 374 GraphicsLayer* m_replicatedLayer; // For a replica layer, a reference to the
original layer. |
376 FloatPoint m_replicatedLayerPosition; // For a replica layer, the position o
f the replica. | 375 FloatPoint m_replicatedLayerPosition; // For a replica layer, the position o
f the replica. |
377 | 376 |
378 IntRect m_contentsRect; | 377 IntRect m_contentsRect; |
379 | 378 |
380 int m_paintCount; | 379 int m_paintCount; |
381 | 380 |
382 OwnPtr<blink::WebContentLayer> m_layer; | 381 OwnPtr<blink::WebContentLayer> m_layer; |
383 OwnPtr<blink::WebImageLayer> m_imageLayer; | 382 OwnPtr<blink::WebImageLayer> m_imageLayer; |
384 OwnPtr<blink::WebNinePatchLayer> m_ninePatchLayer; | 383 OwnPtr<blink::WebNinePatchLayer> m_ninePatchLayer; |
385 Color m_contentsSolidColor; | |
386 OwnPtr<blink::WebSolidColorLayer> m_solidColorLayer; | |
387 blink::WebLayer* m_contentsLayer; | 384 blink::WebLayer* m_contentsLayer; |
388 // We don't have ownership of m_contentsLayer, but we do want to know if a g
iven layer is the | 385 // We don't have ownership of m_contentsLayer, but we do want to know if a g
iven layer is the |
389 // same as our current layer in setContentsTo(). Since m_contentsLayer may b
e deleted at this point, | 386 // same as our current layer in setContentsTo(). Since m_contentsLayer may b
e deleted at this point, |
390 // we stash an ID away when we know m_contentsLayer is alive and use that fo
r comparisons from that point | 387 // we stash an ID away when we know m_contentsLayer is alive and use that fo
r comparisons from that point |
391 // on. | 388 // on. |
392 int m_contentsLayerId; | 389 int m_contentsLayerId; |
393 | 390 |
394 Vector<LinkHighlightClient*> m_linkHighlights; | 391 Vector<LinkHighlightClient*> m_linkHighlights; |
395 | 392 |
396 OwnPtr<OpaqueRectTrackingContentLayerDelegate> m_opaqueRectTrackingContentLa
yerDelegate; | 393 OwnPtr<OpaqueRectTrackingContentLayerDelegate> m_opaqueRectTrackingContentLa
yerDelegate; |
397 | 394 |
398 ScrollableArea* m_scrollableArea; | 395 ScrollableArea* m_scrollableArea; |
399 GraphicsLayerDebugInfo m_debugInfo; | 396 GraphicsLayerDebugInfo m_debugInfo; |
400 int m_3dRenderingContext; | 397 int m_3dRenderingContext; |
401 }; | 398 }; |
402 | 399 |
403 | 400 |
404 } // namespace WebCore | 401 } // namespace WebCore |
405 | 402 |
406 #ifndef NDEBUG | 403 #ifndef NDEBUG |
407 // Outside the WebCore namespace for ease of invocation from gdb. | 404 // Outside the WebCore namespace for ease of invocation from gdb. |
408 void PLATFORM_EXPORT showGraphicsLayerTree(const WebCore::GraphicsLayer*); | 405 void PLATFORM_EXPORT showGraphicsLayerTree(const WebCore::GraphicsLayer*); |
409 #endif | 406 #endif |
410 | 407 |
411 #endif // GraphicsLayer_h | 408 #endif // GraphicsLayer_h |
OLD | NEW |