| 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 // TODO(loyso): This should use CompositorFilterOperation. crbug.com/584551 |
| 142 virtual void setBackgroundFilters(const cc::FilterOperations&) = 0; |
| 141 | 143 |
| 142 // An animation delegate is notified when animations are started and | 144 // An animation delegate is notified when animations are started and |
| 143 // stopped. The WebLayer does not take ownership of the delegate, and it is | 145 // 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 | 146 // the responsibility of the client to reset the layer's delegate before |
| 145 // deleting the delegate. | 147 // deleting the delegate. |
| 146 virtual void setAnimationDelegate(WebCompositorAnimationDelegate*) = 0; | 148 virtual void setAnimationDelegate(WebCompositorAnimationDelegate*) = 0; |
| 147 | 149 |
| 148 | |
| 149 // Returns false if the animation cannot be added. | 150 // Returns false if the animation cannot be added. |
| 150 // Takes ownership of the WebCompositorAnimation object. | 151 // Takes ownership of the cc::Animation object. |
| 151 virtual bool addAnimation(WebCompositorAnimation*) = 0; | 152 // TODO(loyso): Erase it. crbug.com/575041 |
| 153 virtual bool addAnimation(cc::Animation*) = 0; |
| 152 | 154 |
| 153 // Removes all animations with the given id. | 155 // Removes all animations with the given id. |
| 154 virtual void removeAnimation(int animationId) = 0; | 156 virtual void removeAnimation(int animationId) = 0; |
| 155 | 157 |
| 156 // Pauses all animations with the given id. | 158 // Pauses all animations with the given id. |
| 157 virtual void pauseAnimation(int animationId, double timeOffset) = 0; | 159 virtual void pauseAnimation(int animationId, double timeOffset) = 0; |
| 158 | 160 |
| 159 // Aborts all animations with the given id. Different from removeAnimation | 161 // Aborts all animations with the given id. Different from removeAnimation |
| 160 // in that aborting an animation stops it from affecting both the pending | 162 // in that aborting an animation stops it from affecting both the pending |
| 161 // and active tree. | 163 // and active tree. |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 virtual void setElementId(uint64_t) = 0; | 244 virtual void setElementId(uint64_t) = 0; |
| 243 virtual uint64_t elementId() const = 0; | 245 virtual uint64_t elementId() const = 0; |
| 244 | 246 |
| 245 virtual void setCompositorMutableProperties(uint32_t) = 0; | 247 virtual void setCompositorMutableProperties(uint32_t) = 0; |
| 246 virtual uint32_t compositorMutableProperties() const = 0; | 248 virtual uint32_t compositorMutableProperties() const = 0; |
| 247 }; | 249 }; |
| 248 | 250 |
| 249 } // namespace blink | 251 } // namespace blink |
| 250 | 252 |
| 251 #endif // WebLayer_h | 253 #endif // WebLayer_h |
| OLD | NEW |