OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
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 "WebRect.h" | 36 #include "WebRect.h" |
37 #include "WebScrollBlocksOn.h" | 37 #include "WebScrollBlocksOn.h" |
38 #include "WebSize.h" | 38 #include "WebSize.h" |
39 #include "WebString.h" | 39 #include "WebString.h" |
40 #include "WebVector.h" | 40 #include "WebVector.h" |
41 | 41 |
42 class SkMatrix44; | 42 class SkMatrix44; |
43 class SkImageFilter; | 43 class SkImageFilter; |
44 | 44 |
45 namespace blink { | 45 namespace blink { |
46 class WebCompositorAnimationDelegate; | |
47 class WebFilterOperations; | 46 class WebFilterOperations; |
48 class WebLayerClient; | 47 class WebLayerClient; |
49 class WebLayerScrollClient; | 48 class WebLayerScrollClient; |
50 struct WebFloatPoint; | 49 struct WebFloatPoint; |
51 struct WebLayerPositionConstraint; | 50 struct WebLayerPositionConstraint; |
52 | 51 |
53 class WebLayer { | 52 class WebLayer { |
54 public: | 53 public: |
55 virtual ~WebLayer() { } | 54 virtual ~WebLayer() { } |
56 | 55 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // etc). | 120 // etc). |
122 virtual void setUseParentBackfaceVisibility(bool) = 0; | 121 virtual void setUseParentBackfaceVisibility(bool) = 0; |
123 | 122 |
124 virtual void setBackgroundColor(WebColor) = 0; | 123 virtual void setBackgroundColor(WebColor) = 0; |
125 virtual WebColor backgroundColor() const = 0; | 124 virtual WebColor backgroundColor() const = 0; |
126 | 125 |
127 // Clear the filters in use by passing in a newly instantiated | 126 // Clear the filters in use by passing in a newly instantiated |
128 // WebFilterOperations object. | 127 // WebFilterOperations object. |
129 virtual void setFilters(const WebFilterOperations&) = 0; | 128 virtual void setFilters(const WebFilterOperations&) = 0; |
130 | 129 |
131 // An animation delegate is notified when animations are started and | |
132 // stopped. The WebLayer does not take ownership of the delegate, and it is | |
133 // the responsibility of the client to reset the layer's delegate before | |
134 // deleting the delegate. | |
135 virtual void setAnimationDelegate(WebCompositorAnimationDelegate*) = 0; | |
136 | |
137 | |
138 // Returns false if the animation cannot be added. | |
139 // Takes ownership of the WebCompositorAnimation object. | |
140 virtual bool addAnimation(WebCompositorAnimation*) = 0; | |
141 | |
142 // Removes all animations with the given id. | |
143 virtual void removeAnimation(int animationId) = 0; | |
144 | |
145 // Removes all animations with the given id targeting the given property. | |
146 virtual void removeAnimation(int animationId, WebCompositorAnimation::Target
Property) = 0; | |
147 | |
148 // Pauses all animations with the given id. | |
149 virtual void pauseAnimation(int animationId, double timeOffset) = 0; | |
150 | |
151 // Returns true if this layer has any active animations - useful for tests. | |
152 virtual bool hasActiveAnimation() = 0; | |
153 | |
154 // If a scroll parent is set, this layer will inherit its parent's scroll | 130 // If a scroll parent is set, this layer will inherit its parent's scroll |
155 // delta and offset even though it will not be a descendant of the scroll | 131 // delta and offset even though it will not be a descendant of the scroll |
156 // in the layer hierarchy. | 132 // in the layer hierarchy. |
157 virtual void setScrollParent(WebLayer*) = 0; | 133 virtual void setScrollParent(WebLayer*) = 0; |
158 | 134 |
159 // A layer will not respect any clips established by layers between it and | 135 // A layer will not respect any clips established by layers between it and |
160 // its nearest clipping ancestor. Note, the clip parent must be an ancestor. | 136 // its nearest clipping ancestor. Note, the clip parent must be an ancestor. |
161 // This is not a requirement of the scroll parent. | 137 // This is not a requirement of the scroll parent. |
162 virtual void setClipParent(WebLayer*) = 0; | 138 virtual void setClipParent(WebLayer*) = 0; |
163 | 139 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 | 200 |
225 // True if the layer is not part of a tree attached to a WebLayerTreeView. | 201 // True if the layer is not part of a tree attached to a WebLayerTreeView. |
226 virtual bool isOrphan() const = 0; | 202 virtual bool isOrphan() const = 0; |
227 | 203 |
228 virtual void setWebLayerClient(WebLayerClient*) = 0; | 204 virtual void setWebLayerClient(WebLayerClient*) = 0; |
229 }; | 205 }; |
230 | 206 |
231 } // namespace blink | 207 } // namespace blink |
232 | 208 |
233 #endif // WebLayer_h | 209 #endif // WebLayer_h |
OLD | NEW |