| 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 // These methods handle both transitions and keyframe animations. | 219 // These methods handle both transitions and keyframe animations. |
| 220 bool addAnimation(PassOwnPtr<blink::WebAnimation>); | 220 bool addAnimation(PassOwnPtr<blink::WebAnimation>); |
| 221 void pauseAnimation(int animationId, double /*timeOffset*/); | 221 void pauseAnimation(int animationId, double /*timeOffset*/); |
| 222 void removeAnimation(int animationId); | 222 void removeAnimation(int animationId); |
| 223 | 223 |
| 224 // Layer contents | 224 // Layer contents |
| 225 void setContentsToImage(Image*); | 225 void setContentsToImage(Image*); |
| 226 void setContentsToNinePatch(Image*, const IntRect& aperture); | 226 void setContentsToNinePatch(Image*, const IntRect& aperture); |
| 227 bool shouldDirectlyCompositeImage(Image*) const { return true; } | 227 bool shouldDirectlyCompositeImage(Image*) const { return true; } |
| 228 // Pass an invalid color to remove the contents layer. | 228 // Pass an invalid color to remove the contents layer. |
| 229 void setContentsToSolidColor(const Color&) { } | 229 void setContentsToSolidColor(const Color&); |
| 230 void setContentsToPlatformLayer(blink::WebLayer* layer) { setContentsTo(laye
r); } | 230 void setContentsToPlatformLayer(blink::WebLayer* layer) { setContentsTo(laye
r); } |
| 231 bool hasContentsLayer() const { return m_contentsLayer; } | 231 bool hasContentsLayer() const { return m_contentsLayer; } |
| 232 | 232 |
| 233 // Callback from the underlying graphics system to draw layer contents. | 233 // Callback from the underlying graphics system to draw layer contents. |
| 234 void paintGraphicsLayerContents(GraphicsContext&, const IntRect& clip); | 234 void paintGraphicsLayerContents(GraphicsContext&, const IntRect& clip); |
| 235 // Callback from the underlying graphics system when the layer has been disp
layed | 235 // Callback from the underlying graphics system when the layer has been disp
layed |
| 236 void layerDidDisplay(blink::WebLayer*) { } | 236 void layerDidDisplay(blink::WebLayer*) { } |
| 237 | 237 |
| 238 // For hosting this GraphicsLayer in a native layer hierarchy. | 238 // For hosting this GraphicsLayer in a native layer hierarchy. |
| 239 blink::WebLayer* platformLayer() const; | 239 blink::WebLayer* platformLayer() const; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 262 // Return a string with a human readable form of the layer tree, If debug is
true | 262 // Return a string with a human readable form of the layer tree, If debug is
true |
| 263 // pointers for the layers and timing data will be included in the returned
string. | 263 // pointers for the layers and timing data will be included in the returned
string. |
| 264 String layerTreeAsText(LayerTreeFlags = LayerTreeNormal) const; | 264 String layerTreeAsText(LayerTreeFlags = LayerTreeNormal) const; |
| 265 | 265 |
| 266 // Return an estimate of the backing store memory cost (in bytes). May be in
correct for tiled layers. | 266 // Return an estimate of the backing store memory cost (in bytes). May be in
correct for tiled layers. |
| 267 double backingStoreMemoryEstimate() const; | 267 double backingStoreMemoryEstimate() const; |
| 268 | 268 |
| 269 void resetTrackedRepaints(); | 269 void resetTrackedRepaints(); |
| 270 void addRepaintRect(const FloatRect&); | 270 void addRepaintRect(const FloatRect&); |
| 271 | 271 |
| 272 static bool supportsBackgroundColorContent() | |
| 273 { | |
| 274 return false; | |
| 275 } | |
| 276 | |
| 277 void addLinkHighlight(LinkHighlightClient*); | 272 void addLinkHighlight(LinkHighlightClient*); |
| 278 void removeLinkHighlight(LinkHighlightClient*); | 273 void removeLinkHighlight(LinkHighlightClient*); |
| 279 // Exposed for tests | 274 // Exposed for tests |
| 280 unsigned numLinkHighlights() { return m_linkHighlights.size(); } | 275 unsigned numLinkHighlights() { return m_linkHighlights.size(); } |
| 281 LinkHighlightClient* linkHighlight(int i) { return m_linkHighlights[i]; } | 276 LinkHighlightClient* linkHighlight(int i) { return m_linkHighlights[i]; } |
| 282 | 277 |
| 283 void setScrollableArea(ScrollableArea*, bool isMainFrame); | 278 void setScrollableArea(ScrollableArea*, bool isMainFrame); |
| 284 ScrollableArea* scrollableArea() const { return m_scrollableArea; } | 279 ScrollableArea* scrollableArea() const { return m_scrollableArea; } |
| 285 | 280 |
| 286 blink::WebContentLayer* contentLayer() const { return m_layer.get(); } | 281 blink::WebContentLayer* contentLayer() const { return m_layer.get(); } |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 GraphicsLayer* m_replicatedLayer; // For a replica layer, a reference to the
original layer. | 372 GraphicsLayer* m_replicatedLayer; // For a replica layer, a reference to the
original layer. |
| 378 FloatPoint m_replicatedLayerPosition; // For a replica layer, the position o
f the replica. | 373 FloatPoint m_replicatedLayerPosition; // For a replica layer, the position o
f the replica. |
| 379 | 374 |
| 380 IntRect m_contentsRect; | 375 IntRect m_contentsRect; |
| 381 | 376 |
| 382 int m_paintCount; | 377 int m_paintCount; |
| 383 | 378 |
| 384 OwnPtr<blink::WebContentLayer> m_layer; | 379 OwnPtr<blink::WebContentLayer> m_layer; |
| 385 OwnPtr<blink::WebImageLayer> m_imageLayer; | 380 OwnPtr<blink::WebImageLayer> m_imageLayer; |
| 386 OwnPtr<blink::WebNinePatchLayer> m_ninePatchLayer; | 381 OwnPtr<blink::WebNinePatchLayer> m_ninePatchLayer; |
| 382 Color m_contentsSolidColor; |
| 383 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 blink::WebCompositingReasons m_compositingReasons; | 396 blink::WebCompositingReasons m_compositingReasons; |
| 400 }; | 397 }; |
| 401 | 398 |
| 402 | 399 |
| 403 } // namespace WebCore | 400 } // namespace WebCore |
| 404 | 401 |
| 405 #ifndef NDEBUG | 402 #ifndef NDEBUG |
| 406 // Outside the WebCore namespace for ease of invocation from gdb. | 403 // Outside the WebCore namespace for ease of invocation from gdb. |
| 407 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer); | 404 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer); |
| 408 #endif | 405 #endif |
| 409 | 406 |
| 410 #endif // GraphicsLayer_h | 407 #endif // GraphicsLayer_h |
| OLD | NEW |