Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(599)

Side by Side Diff: Source/platform/graphics/GraphicsLayer.h

Issue 412123002: Rename WebAnimation to WebCompositorAnimation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 20 matching lines...) Expand all
31 #include "platform/geometry/FloatPoint.h" 31 #include "platform/geometry/FloatPoint.h"
32 #include "platform/geometry/FloatPoint3D.h" 32 #include "platform/geometry/FloatPoint3D.h"
33 #include "platform/geometry/FloatSize.h" 33 #include "platform/geometry/FloatSize.h"
34 #include "platform/geometry/IntRect.h" 34 #include "platform/geometry/IntRect.h"
35 #include "platform/graphics/Color.h" 35 #include "platform/graphics/Color.h"
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/WebAnimationDelegate.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" 46 #include "public/platform/WebNinePatchLayer.h"
47 #include "public/platform/WebSolidColorLayer.h" 47 #include "public/platform/WebSolidColorLayer.h"
48 #include "wtf/OwnPtr.h" 48 #include "wtf/OwnPtr.h"
49 #include "wtf/PassOwnPtr.h" 49 #include "wtf/PassOwnPtr.h"
50 #include "wtf/Vector.h" 50 #include "wtf/Vector.h"
51 51
52 namespace blink { 52 namespace blink {
53 class GraphicsLayerFactoryChromium; 53 class GraphicsLayerFactoryChromium;
54 class WebAnimation; 54 class WebCompositorAnimation;
55 class WebLayer; 55 class WebLayer;
56 } 56 }
57 57
58 namespace blink { 58 namespace blink {
59 59
60 class FloatRect; 60 class FloatRect;
61 class GraphicsContext; 61 class GraphicsContext;
62 class GraphicsLayer; 62 class GraphicsLayer;
63 class GraphicsLayerFactory; 63 class GraphicsLayerFactory;
64 class Image; 64 class Image;
(...skipping 10 matching lines...) Expand all
75 75
76 protected: 76 protected:
77 virtual ~LinkHighlightClient() { } 77 virtual ~LinkHighlightClient() { }
78 }; 78 };
79 79
80 typedef Vector<GraphicsLayer*, 64> GraphicsLayerVector; 80 typedef Vector<GraphicsLayer*, 64> GraphicsLayerVector;
81 81
82 // GraphicsLayer is an abstraction for a rendering surface with backing store, 82 // GraphicsLayer is an abstraction for a rendering surface with backing store,
83 // which may have associated transformation and animations. 83 // which may have associated transformation and animations.
84 84
85 class PLATFORM_EXPORT GraphicsLayer : public GraphicsContextPainter, public blin k::WebAnimationDelegate, public blink::WebLayerScrollClient, public blink::WebLa yerClient { 85 class PLATFORM_EXPORT GraphicsLayer : public GraphicsContextPainter, public blin k::WebCompositorAnimationDelegate, public blink::WebLayerScrollClient, public bl ink::WebLayerClient {
86 WTF_MAKE_NONCOPYABLE(GraphicsLayer); WTF_MAKE_FAST_ALLOCATED; 86 WTF_MAKE_NONCOPYABLE(GraphicsLayer); WTF_MAKE_FAST_ALLOCATED;
87 public: 87 public:
88 static PassOwnPtr<GraphicsLayer> create(GraphicsLayerFactory*, GraphicsLayer Client*); 88 static PassOwnPtr<GraphicsLayer> create(GraphicsLayerFactory*, GraphicsLayer Client*);
89 89
90 virtual ~GraphicsLayer(); 90 virtual ~GraphicsLayer();
91 91
92 GraphicsLayerClient* client() const { return m_client; } 92 GraphicsLayerClient* client() const { return m_client; }
93 93
94 // blink::WebLayerClient implementation. 94 // blink::WebLayerClient implementation.
95 virtual blink::WebGraphicsLayerDebugInfo* takeDebugInfoFor(blink::WebLayer*) OVERRIDE; 95 virtual blink::WebGraphicsLayerDebugInfo* takeDebugInfoFor(blink::WebLayer*) OVERRIDE;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 void setNeedsDisplayInRect(const FloatRect&); 197 void setNeedsDisplayInRect(const FloatRect&);
198 198
199 void setContentsNeedsDisplay(); 199 void setContentsNeedsDisplay();
200 200
201 // Set that the position/size of the contents (image or video). 201 // Set that the position/size of the contents (image or video).
202 void setContentsRect(const IntRect&); 202 void setContentsRect(const IntRect&);
203 203
204 // Return true if the animation is handled by the compositing system. If thi s returns 204 // Return true if the animation is handled by the compositing system. If thi s returns
205 // false, the animation will be run by AnimationController. 205 // false, the animation will be run by AnimationController.
206 // These methods handle both transitions and keyframe animations. 206 // These methods handle both transitions and keyframe animations.
207 bool addAnimation(PassOwnPtr<blink::WebAnimation>); 207 bool addAnimation(PassOwnPtr<blink::WebCompositorAnimation>);
208 void pauseAnimation(int animationId, double /*timeOffset*/); 208 void pauseAnimation(int animationId, double /*timeOffset*/);
209 void removeAnimation(int animationId); 209 void removeAnimation(int animationId);
210 210
211 // Layer contents 211 // Layer contents
212 void setContentsToImage(Image*); 212 void setContentsToImage(Image*);
213 void setContentsToNinePatch(Image*, const IntRect& aperture); 213 void setContentsToNinePatch(Image*, const IntRect& aperture);
214 void setContentsToPlatformLayer(blink::WebLayer* layer) { setContentsTo(laye r); } 214 void setContentsToPlatformLayer(blink::WebLayer* layer) { setContentsTo(laye r); }
215 bool hasContentsLayer() const { return m_contentsLayer; } 215 bool hasContentsLayer() const { return m_contentsLayer; }
216 216
217 // Callback from the underlying graphics system to draw layer contents. 217 // Callback from the underlying graphics system to draw layer contents.
(...skipping 27 matching lines...) Expand all
245 ScrollableArea* scrollableArea() const { return m_scrollableArea; } 245 ScrollableArea* scrollableArea() const { return m_scrollableArea; }
246 246
247 blink::WebContentLayer* contentLayer() const { return m_layer.get(); } 247 blink::WebContentLayer* contentLayer() const { return m_layer.get(); }
248 248
249 static void registerContentsLayer(blink::WebLayer*); 249 static void registerContentsLayer(blink::WebLayer*);
250 static void unregisterContentsLayer(blink::WebLayer*); 250 static void unregisterContentsLayer(blink::WebLayer*);
251 251
252 // GraphicsContextPainter implementation. 252 // GraphicsContextPainter implementation.
253 virtual void paint(GraphicsContext&, const IntRect& clip) OVERRIDE; 253 virtual void paint(GraphicsContext&, const IntRect& clip) OVERRIDE;
254 254
255 // WebAnimationDelegate implementation. 255 // WebCompositorAnimationDelegate implementation.
256 virtual void notifyAnimationStarted(double monotonicTime, blink::WebAnimatio n::TargetProperty) OVERRIDE; 256 virtual void notifyAnimationStarted(double monotonicTime, blink::WebComposit orAnimation::TargetProperty) OVERRIDE;
257 virtual void notifyAnimationFinished(double monotonicTime, blink::WebAnimati on::TargetProperty) OVERRIDE; 257 virtual void notifyAnimationFinished(double monotonicTime, blink::WebComposi torAnimation::TargetProperty) OVERRIDE;
258 258
259 // WebLayerScrollClient implementation. 259 // WebLayerScrollClient implementation.
260 virtual void didScroll() OVERRIDE; 260 virtual void didScroll() OVERRIDE;
261 261
262 protected: 262 protected:
263 explicit GraphicsLayer(GraphicsLayerClient*); 263 explicit GraphicsLayer(GraphicsLayerClient*);
264 // GraphicsLayerFactoryChromium that wants to create a GraphicsLayer need to be friends. 264 // GraphicsLayerFactoryChromium that wants to create a GraphicsLayer need to be friends.
265 friend class blink::GraphicsLayerFactoryChromium; 265 friend class blink::GraphicsLayerFactoryChromium;
266 266
267 // Exposed for tests. 267 // Exposed for tests.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 }; 364 };
365 365
366 } // namespace blink 366 } // namespace blink
367 367
368 #ifndef NDEBUG 368 #ifndef NDEBUG
369 // Outside the WebCore namespace for ease of invocation from gdb. 369 // Outside the WebCore namespace for ease of invocation from gdb.
370 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); 370 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*);
371 #endif 371 #endif
372 372
373 #endif // GraphicsLayer_h 373 #endif // GraphicsLayer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698