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