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 23 matching lines...) Expand all Loading... |
34 #include "WebPoint.h" | 34 #include "WebPoint.h" |
35 #include "WebRect.h" | 35 #include "WebRect.h" |
36 #include "WebSize.h" | 36 #include "WebSize.h" |
37 #include "WebString.h" | 37 #include "WebString.h" |
38 #include "WebVector.h" | 38 #include "WebVector.h" |
39 | 39 |
40 class SkMatrix44; | 40 class SkMatrix44; |
41 class SkImageFilter; | 41 class SkImageFilter; |
42 | 42 |
43 namespace cc { | 43 namespace cc { |
| 44 class Animation; |
44 class Layer; | 45 class Layer; |
45 class LayerClient; | 46 class LayerClient; |
| 47 class FilterOperations; |
46 } | 48 } |
47 | 49 |
48 namespace blink { | 50 namespace blink { |
49 class WebCompositorAnimation; | 51 |
50 class WebCompositorAnimationDelegate; | 52 class WebCompositorAnimationDelegate; |
51 class WebFilterOperations; | |
52 class WebLayerScrollClient; | 53 class WebLayerScrollClient; |
53 struct WebFloatPoint; | 54 struct WebFloatPoint; |
54 struct WebLayerPositionConstraint; | 55 struct WebLayerPositionConstraint; |
55 | 56 |
56 class WebLayer { | 57 class WebLayer { |
57 public: | 58 public: |
58 virtual ~WebLayer() { } | 59 virtual ~WebLayer() { } |
59 | 60 |
60 // Returns a positive ID that will be unique across all WebLayers allocated
in this process. | 61 // Returns a positive ID that will be unique across all WebLayers allocated
in this process. |
61 virtual int id() const = 0; | 62 virtual int id() const = 0; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // have a parent, and the parent may not have this property set. | 126 // have a parent, and the parent may not have this property set. |
126 // Note: This API is to work around issues with visibility the handling of | 127 // Note: This API is to work around issues with visibility the handling of |
127 // WebKit layers that have a contents layer (canvas, plugin, WebGL, video, | 128 // WebKit layers that have a contents layer (canvas, plugin, WebGL, video, |
128 // etc). | 129 // etc). |
129 virtual void setUseParentBackfaceVisibility(bool) = 0; | 130 virtual void setUseParentBackfaceVisibility(bool) = 0; |
130 | 131 |
131 virtual void setBackgroundColor(WebColor) = 0; | 132 virtual void setBackgroundColor(WebColor) = 0; |
132 virtual WebColor backgroundColor() const = 0; | 133 virtual WebColor backgroundColor() const = 0; |
133 | 134 |
134 // Clear the filters in use by passing in a newly instantiated | 135 // Clear the filters in use by passing in a newly instantiated |
135 // WebFilterOperations object. | 136 // FilterOperations object. |
136 virtual void setFilters(const WebFilterOperations&) = 0; | 137 virtual void setFilters(const cc::FilterOperations&) = 0; |
137 | 138 |
138 // Clear the background filters in use by passing in a newly instantiated | 139 // Clear the background filters in use by passing in a newly instantiated |
139 // WebFilterOperations object. | 140 // FilterOperations object. |
140 virtual void setBackgroundFilters(const WebFilterOperations&) = 0; | 141 virtual void setBackgroundFilters(const cc::FilterOperations&) = 0; |
141 | 142 |
142 // An animation delegate is notified when animations are started and | 143 // An animation delegate is notified when animations are started and |
143 // stopped. The WebLayer does not take ownership of the delegate, and it is | 144 // stopped. The WebLayer does not take ownership of the delegate, and it is |
144 // the responsibility of the client to reset the layer's delegate before | 145 // the responsibility of the client to reset the layer's delegate before |
145 // deleting the delegate. | 146 // deleting the delegate. |
146 virtual void setAnimationDelegate(WebCompositorAnimationDelegate*) = 0; | 147 virtual void setAnimationDelegate(WebCompositorAnimationDelegate*) = 0; |
147 | 148 |
148 | |
149 // Returns false if the animation cannot be added. | 149 // Returns false if the animation cannot be added. |
150 // Takes ownership of the WebCompositorAnimation object. | 150 // Takes ownership of the cc::Animation object. |
151 virtual bool addAnimation(WebCompositorAnimation*) = 0; | 151 // TODO(loyso): Erase it. crbug.com/575041 |
| 152 virtual bool addAnimation(cc::Animation*) = 0; |
152 | 153 |
153 // Removes all animations with the given id. | 154 // Removes all animations with the given id. |
154 virtual void removeAnimation(int animationId) = 0; | 155 virtual void removeAnimation(int animationId) = 0; |
155 | 156 |
156 // Pauses all animations with the given id. | 157 // Pauses all animations with the given id. |
157 virtual void pauseAnimation(int animationId, double timeOffset) = 0; | 158 virtual void pauseAnimation(int animationId, double timeOffset) = 0; |
158 | 159 |
159 // Aborts all animations with the given id. Different from removeAnimation | 160 // Aborts all animations with the given id. Different from removeAnimation |
160 // in that aborting an animation stops it from affecting both the pending | 161 // in that aborting an animation stops it from affecting both the pending |
161 // and active tree. | 162 // and active tree. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 virtual void setElementId(uint64_t) = 0; | 252 virtual void setElementId(uint64_t) = 0; |
252 virtual uint64_t elementId() const = 0; | 253 virtual uint64_t elementId() const = 0; |
253 | 254 |
254 virtual void setCompositorMutableProperties(uint32_t) = 0; | 255 virtual void setCompositorMutableProperties(uint32_t) = 0; |
255 virtual uint32_t compositorMutableProperties() const = 0; | 256 virtual uint32_t compositorMutableProperties() const = 0; |
256 }; | 257 }; |
257 | 258 |
258 } // namespace blink | 259 } // namespace blink |
259 | 260 |
260 #endif // WebLayer_h | 261 #endif // WebLayer_h |
OLD | NEW |