| 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 |
| 11 * notice, this list of conditions and the following disclaimer in the | 11 * notice, this list of conditions and the following disclaimer in the |
| 12 * documentation and/or other materials provided with the distribution. | 12 * documentation and/or other materials provided with the distribution. |
| 13 * | 13 * |
| 14 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY | 14 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
| 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 17 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY | 17 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
| 18 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 18 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 20 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 20 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef WebLayer_h | 26 #ifndef WebLayer_h |
| 27 #define WebLayer_h | 27 #define WebLayer_h |
| 28 | 28 |
| 29 #include "WebAnimation.h" |
| 29 #include "WebBlendMode.h" | 30 #include "WebBlendMode.h" |
| 30 #include "WebColor.h" | 31 #include "WebColor.h" |
| 31 #include "WebCommon.h" | 32 #include "WebCommon.h" |
| 32 #include "WebCompositorAnimation.h" | 33 #include "WebCompositorAnimationDelegate.h" |
| 33 #include "WebFloatPoint3D.h" | 34 #include "WebFloatPoint3D.h" |
| 34 #include "WebPoint.h" | 35 #include "WebPoint.h" |
| 35 #include "WebRect.h" | 36 #include "WebRect.h" |
| 36 #include "WebSize.h" | 37 #include "WebSize.h" |
| 37 #include "WebString.h" | 38 #include "WebString.h" |
| 38 #include "WebVector.h" | 39 #include "WebVector.h" |
| 39 | 40 |
| 40 class SkMatrix44; | 41 class SkMatrix44; |
| 41 class SkImageFilter; | 42 class SkImageFilter; |
| 42 | 43 |
| 43 namespace blink { | 44 namespace blink { |
| 44 class WebCompositorAnimationDelegate; | |
| 45 class WebFilterOperations; | 45 class WebFilterOperations; |
| 46 class WebLayerClient; | 46 class WebLayerClient; |
| 47 class WebLayerScrollClient; | 47 class WebLayerScrollClient; |
| 48 struct WebFloatPoint; | 48 struct WebFloatPoint; |
| 49 struct WebFloatRect; | 49 struct WebFloatRect; |
| 50 struct WebLayerPositionConstraint; | 50 struct WebLayerPositionConstraint; |
| 51 | 51 |
| 52 class WebLayer { | 52 class WebLayer { |
| 53 public: | 53 public: |
| 54 virtual ~WebLayer() { } | 54 virtual ~WebLayer() { } |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 virtual WebColor backgroundColor() const = 0; | 124 virtual WebColor backgroundColor() const = 0; |
| 125 | 125 |
| 126 // Clear the filters in use by passing in a newly instantiated | 126 // Clear the filters in use by passing in a newly instantiated |
| 127 // WebFilterOperations object. | 127 // WebFilterOperations object. |
| 128 virtual void setFilters(const WebFilterOperations&) = 0; | 128 virtual void setFilters(const WebFilterOperations&) = 0; |
| 129 | 129 |
| 130 // An animation delegate is notified when animations are started and | 130 // An animation delegate is notified when animations are started and |
| 131 // stopped. The WebLayer does not take ownership of the delegate, and it is | 131 // stopped. The WebLayer does not take ownership of the delegate, and it is |
| 132 // the responsibility of the client to reset the layer's delegate before | 132 // the responsibility of the client to reset the layer's delegate before |
| 133 // deleting the delegate. | 133 // deleting the delegate. |
| 134 virtual void setAnimationDelegate(WebCompositorAnimationDelegate*) = 0; | 134 virtual void setAnimationDelegate(WebAnimationDelegate*) = 0; |
| 135 | 135 |
| 136 | 136 |
| 137 // Returns false if the animation cannot be added. | 137 // Returns false if the animation cannot be added. |
| 138 // Takes ownership of the WebCompositorAnimation object. | 138 // Takes ownership of the WebAnimation object. |
| 139 virtual bool addAnimation(WebCompositorAnimation*) = 0; | 139 virtual bool addAnimation(WebCompositorAnimation*) = 0; |
| 140 | 140 |
| 141 // Removes all animations with the given id. | 141 // Removes all animations with the given id. |
| 142 virtual void removeAnimation(int animationId) = 0; | 142 virtual void removeAnimation(int animationId) = 0; |
| 143 | 143 |
| 144 // Removes all animations with the given id targeting the given property. | 144 // Removes all animations with the given id targeting the given property. |
| 145 virtual void removeAnimation(int animationId, WebCompositorAnimation::Target
Property) = 0; | 145 virtual void removeAnimation(int animationId, WebAnimation::TargetProperty)
= 0; |
| 146 | 146 |
| 147 // Pauses all animations with the given id. | 147 // Pauses all animations with the given id. |
| 148 virtual void pauseAnimation(int animationId, double timeOffset) = 0; | 148 virtual void pauseAnimation(int animationId, double timeOffset) = 0; |
| 149 | 149 |
| 150 // Returns true if this layer has any active animations - useful for tests. | 150 // Returns true if this layer has any active animations - useful for tests. |
| 151 virtual bool hasActiveAnimation() = 0; | 151 virtual bool hasActiveAnimation() = 0; |
| 152 | 152 |
| 153 // If a scroll parent is set, this layer will inherit its parent's scroll | 153 // If a scroll parent is set, this layer will inherit its parent's scroll |
| 154 // delta and offset even though it will not be a descendant of the scroll | 154 // delta and offset even though it will not be a descendant of the scroll |
| 155 // in the layer hierarchy. | 155 // in the layer hierarchy. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 | 207 |
| 208 // True if the layer is not part of a tree attached to a WebLayerTreeView. | 208 // True if the layer is not part of a tree attached to a WebLayerTreeView. |
| 209 virtual bool isOrphan() const = 0; | 209 virtual bool isOrphan() const = 0; |
| 210 | 210 |
| 211 virtual void setWebLayerClient(WebLayerClient*) = 0; | 211 virtual void setWebLayerClient(WebLayerClient*) = 0; |
| 212 }; | 212 }; |
| 213 | 213 |
| 214 } // namespace blink | 214 } // namespace blink |
| 215 | 215 |
| 216 #endif // WebLayer_h | 216 #endif // WebLayer_h |
| OLD | NEW |