| 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 25 matching lines...) Expand all Loading... |
| 36 #include "platform/graphics/GraphicsLayerClient.h" | 36 #include "platform/graphics/GraphicsLayerClient.h" |
| 37 #include "platform/graphics/GraphicsLayerDebugInfo.h" | 37 #include "platform/graphics/GraphicsLayerDebugInfo.h" |
| 38 #include "platform/graphics/OpaqueRectTrackingContentLayerDelegate.h" | 38 #include "platform/graphics/OpaqueRectTrackingContentLayerDelegate.h" |
| 39 #include "platform/graphics/filters/FilterOperations.h" | 39 #include "platform/graphics/filters/FilterOperations.h" |
| 40 #include "platform/transforms/TransformationMatrix.h" | 40 #include "platform/transforms/TransformationMatrix.h" |
| 41 #include "public/platform/WebCompositorAnimationDelegate.h" | 41 #include "public/platform/WebCompositorAnimationDelegate.h" |
| 42 #include "public/platform/WebContentLayer.h" | 42 #include "public/platform/WebContentLayer.h" |
| 43 #include "public/platform/WebImageLayer.h" | 43 #include "public/platform/WebImageLayer.h" |
| 44 #include "public/platform/WebLayerClient.h" | 44 #include "public/platform/WebLayerClient.h" |
| 45 #include "public/platform/WebLayerScrollClient.h" | 45 #include "public/platform/WebLayerScrollClient.h" |
| 46 #include "public/platform/WebNinePatchLayer.h" | |
| 47 #include "wtf/OwnPtr.h" | 46 #include "wtf/OwnPtr.h" |
| 48 #include "wtf/PassOwnPtr.h" | 47 #include "wtf/PassOwnPtr.h" |
| 49 #include "wtf/Vector.h" | 48 #include "wtf/Vector.h" |
| 50 | 49 |
| 51 namespace blink { | 50 namespace blink { |
| 52 | 51 |
| 53 class FloatRect; | 52 class FloatRect; |
| 54 class GraphicsContext; | 53 class GraphicsContext; |
| 55 class GraphicsLayer; | 54 class GraphicsLayer; |
| 56 class GraphicsLayerFactory; | 55 class GraphicsLayerFactory; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 183 |
| 185 // Return true if the animation is handled by the compositing system. If thi
s returns | 184 // Return true if the animation is handled by the compositing system. If thi
s returns |
| 186 // false, the animation will be run by AnimationController. | 185 // false, the animation will be run by AnimationController. |
| 187 // These methods handle both transitions and keyframe animations. | 186 // These methods handle both transitions and keyframe animations. |
| 188 bool addAnimation(PassOwnPtr<WebCompositorAnimation>); | 187 bool addAnimation(PassOwnPtr<WebCompositorAnimation>); |
| 189 void pauseAnimation(int animationId, double /*timeOffset*/); | 188 void pauseAnimation(int animationId, double /*timeOffset*/); |
| 190 void removeAnimation(int animationId); | 189 void removeAnimation(int animationId); |
| 191 | 190 |
| 192 // Layer contents | 191 // Layer contents |
| 193 void setContentsToImage(Image*); | 192 void setContentsToImage(Image*); |
| 194 void setContentsToNinePatch(Image*, const IntRect& aperture); | |
| 195 void setContentsToPlatformLayer(WebLayer* layer) { setContentsTo(layer); } | 193 void setContentsToPlatformLayer(WebLayer* layer) { setContentsTo(layer); } |
| 196 bool hasContentsLayer() const { return m_contentsLayer; } | 194 bool hasContentsLayer() const { return m_contentsLayer; } |
| 197 | 195 |
| 198 // For hosting this GraphicsLayer in a native layer hierarchy. | 196 // For hosting this GraphicsLayer in a native layer hierarchy. |
| 199 WebLayer* platformLayer() const; | 197 WebLayer* platformLayer() const; |
| 200 | 198 |
| 201 typedef HashMap<int, int> RenderingContextMap; | 199 typedef HashMap<int, int> RenderingContextMap; |
| 202 PassRefPtr<JSONObject> layerTreeAsJSON(LayerTreeFlags, RenderingContextMap&)
const; | 200 PassRefPtr<JSONObject> layerTreeAsJSON(LayerTreeFlags, RenderingContextMap&)
const; |
| 203 | 201 |
| 204 int paintCount() const { return m_paintCount; } | 202 int paintCount() const { return m_paintCount; } |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 | 302 |
| 305 GraphicsLayer* m_maskLayer; // Reference to mask layer. We don't own this. | 303 GraphicsLayer* m_maskLayer; // Reference to mask layer. We don't own this. |
| 306 GraphicsLayer* m_contentsClippingMaskLayer; // Reference to clipping mask la
yer. We don't own this. | 304 GraphicsLayer* m_contentsClippingMaskLayer; // Reference to clipping mask la
yer. We don't own this. |
| 307 | 305 |
| 308 IntRect m_contentsRect; | 306 IntRect m_contentsRect; |
| 309 | 307 |
| 310 int m_paintCount; | 308 int m_paintCount; |
| 311 | 309 |
| 312 OwnPtr<WebContentLayer> m_layer; | 310 OwnPtr<WebContentLayer> m_layer; |
| 313 OwnPtr<WebImageLayer> m_imageLayer; | 311 OwnPtr<WebImageLayer> m_imageLayer; |
| 314 OwnPtr<WebNinePatchLayer> m_ninePatchLayer; | |
| 315 WebLayer* m_contentsLayer; | 312 WebLayer* m_contentsLayer; |
| 316 // We don't have ownership of m_contentsLayer, but we do want to know if a g
iven layer is the | 313 // We don't have ownership of m_contentsLayer, but we do want to know if a g
iven layer is the |
| 317 // same as our current layer in setContentsTo(). Since m_contentsLayer may b
e deleted at this point, | 314 // same as our current layer in setContentsTo(). Since m_contentsLayer may b
e deleted at this point, |
| 318 // we stash an ID away when we know m_contentsLayer is alive and use that fo
r comparisons from that point | 315 // we stash an ID away when we know m_contentsLayer is alive and use that fo
r comparisons from that point |
| 319 // on. | 316 // on. |
| 320 int m_contentsLayerId; | 317 int m_contentsLayerId; |
| 321 | 318 |
| 322 Vector<LinkHighlightClient*> m_linkHighlights; | 319 Vector<LinkHighlightClient*> m_linkHighlights; |
| 323 | 320 |
| 324 OwnPtr<OpaqueRectTrackingContentLayerDelegate> m_opaqueRectTrackingContentLa
yerDelegate; | 321 OwnPtr<OpaqueRectTrackingContentLayerDelegate> m_opaqueRectTrackingContentLa
yerDelegate; |
| 325 | 322 |
| 326 ScrollableArea* m_scrollableArea; | 323 ScrollableArea* m_scrollableArea; |
| 327 GraphicsLayerDebugInfo m_debugInfo; | 324 GraphicsLayerDebugInfo m_debugInfo; |
| 328 int m_3dRenderingContext; | 325 int m_3dRenderingContext; |
| 329 }; | 326 }; |
| 330 | 327 |
| 331 } // namespace blink | 328 } // namespace blink |
| 332 | 329 |
| 333 #ifndef NDEBUG | 330 #ifndef NDEBUG |
| 334 // Outside the WebCore namespace for ease of invocation from gdb. | 331 // Outside the WebCore namespace for ease of invocation from gdb. |
| 335 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); | 332 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); |
| 336 #endif | 333 #endif |
| 337 | 334 |
| 338 #endif // GraphicsLayer_h | 335 #endif // GraphicsLayer_h |
| OLD | NEW |