| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 206 |
| 207 // Return true if the animation is handled by the compositing system. If thi
s returns | 207 // Return true if the animation is handled by the compositing system. If thi
s returns |
| 208 // false, the animation will be run by AnimationController. | 208 // false, the animation will be run by AnimationController. |
| 209 // These methods handle both transitions and keyframe animations. | 209 // These methods handle both transitions and keyframe animations. |
| 210 bool addAnimation(PassOwnPtr<WebCompositorAnimation>); | 210 bool addAnimation(PassOwnPtr<WebCompositorAnimation>); |
| 211 void pauseAnimation(int animationId, double /*timeOffset*/); | 211 void pauseAnimation(int animationId, double /*timeOffset*/); |
| 212 void removeAnimation(int animationId); | 212 void removeAnimation(int animationId); |
| 213 | 213 |
| 214 // Layer contents | 214 // Layer contents |
| 215 void setContentsToImage(Image*); | 215 void setContentsToImage(Image*); |
| 216 void setContentsToNinePatch(Image*, const IntRect& aperture); | |
| 217 void setContentsToPlatformLayer(WebLayer* layer) { setContentsTo(layer); } | 216 void setContentsToPlatformLayer(WebLayer* layer) { setContentsTo(layer); } |
| 218 bool hasContentsLayer() const { return m_contentsLayer; } | 217 bool hasContentsLayer() const { return m_contentsLayer; } |
| 219 | 218 |
| 220 // For hosting this GraphicsLayer in a native layer hierarchy. | 219 // For hosting this GraphicsLayer in a native layer hierarchy. |
| 221 WebLayer* platformLayer() const; | 220 WebLayer* platformLayer() const; |
| 222 | 221 |
| 223 typedef HashMap<int, int> RenderingContextMap; | 222 typedef HashMap<int, int> RenderingContextMap; |
| 224 PassRefPtr<JSONObject> layerTreeAsJSON(LayerTreeFlags, RenderingContextMap&)
const; | 223 PassRefPtr<JSONObject> layerTreeAsJSON(LayerTreeFlags, RenderingContextMap&)
const; |
| 225 | 224 |
| 226 int paintCount() const { return m_paintCount; } | 225 int paintCount() const { return m_paintCount; } |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 // The replica is not parented; this is the p
rimary reference to it. | 345 // The replica is not parented; this is the p
rimary reference to it. |
| 347 GraphicsLayer* m_replicatedLayer; // For a replica layer, a reference to the
original layer. | 346 GraphicsLayer* m_replicatedLayer; // For a replica layer, a reference to the
original layer. |
| 348 FloatPoint m_replicatedLayerPosition; // For a replica layer, the position o
f the replica. | 347 FloatPoint m_replicatedLayerPosition; // For a replica layer, the position o
f the replica. |
| 349 | 348 |
| 350 IntRect m_contentsRect; | 349 IntRect m_contentsRect; |
| 351 | 350 |
| 352 int m_paintCount; | 351 int m_paintCount; |
| 353 | 352 |
| 354 OwnPtr<WebContentLayer> m_layer; | 353 OwnPtr<WebContentLayer> m_layer; |
| 355 OwnPtr<WebImageLayer> m_imageLayer; | 354 OwnPtr<WebImageLayer> m_imageLayer; |
| 356 OwnPtr<WebNinePatchLayer> m_ninePatchLayer; | |
| 357 WebLayer* m_contentsLayer; | 355 WebLayer* m_contentsLayer; |
| 358 // We don't have ownership of m_contentsLayer, but we do want to know if a g
iven layer is the | 356 // We don't have ownership of m_contentsLayer, but we do want to know if a g
iven layer is the |
| 359 // same as our current layer in setContentsTo(). Since m_contentsLayer may b
e deleted at this point, | 357 // same as our current layer in setContentsTo(). Since m_contentsLayer may b
e deleted at this point, |
| 360 // we stash an ID away when we know m_contentsLayer is alive and use that fo
r comparisons from that point | 358 // we stash an ID away when we know m_contentsLayer is alive and use that fo
r comparisons from that point |
| 361 // on. | 359 // on. |
| 362 int m_contentsLayerId; | 360 int m_contentsLayerId; |
| 363 | 361 |
| 364 Vector<LinkHighlightClient*> m_linkHighlights; | 362 Vector<LinkHighlightClient*> m_linkHighlights; |
| 365 | 363 |
| 366 OwnPtr<ContentLayerDelegate> m_contentLayerDelegate; | 364 OwnPtr<ContentLayerDelegate> m_contentLayerDelegate; |
| 367 | 365 |
| 368 ScrollableArea* m_scrollableArea; | 366 ScrollableArea* m_scrollableArea; |
| 369 GraphicsLayerDebugInfo m_debugInfo; | 367 GraphicsLayerDebugInfo m_debugInfo; |
| 370 int m_3dRenderingContext; | 368 int m_3dRenderingContext; |
| 371 | 369 |
| 372 OwnPtr<DisplayItemList> m_displayItemList; | 370 OwnPtr<DisplayItemList> m_displayItemList; |
| 373 }; | 371 }; |
| 374 | 372 |
| 375 } // namespace blink | 373 } // namespace blink |
| 376 | 374 |
| 377 #ifndef NDEBUG | 375 #ifndef NDEBUG |
| 378 // Outside the blink namespace for ease of invocation from gdb. | 376 // Outside the blink namespace for ease of invocation from gdb. |
| 379 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); | 377 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); |
| 380 #endif | 378 #endif |
| 381 | 379 |
| 382 #endif // GraphicsLayer_h | 380 #endif // GraphicsLayer_h |
| OLD | NEW |