Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: sky/engine/public/platform/WebLayer.h

Issue 874633003: Remove WebCompositorSupport (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 11 matching lines...) Expand all
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 SKY_ENGINE_PUBLIC_PLATFORM_WEBLAYER_H_ 26 #ifndef SKY_ENGINE_PUBLIC_PLATFORM_WEBLAYER_H_
27 #define SKY_ENGINE_PUBLIC_PLATFORM_WEBLAYER_H_ 27 #define SKY_ENGINE_PUBLIC_PLATFORM_WEBLAYER_H_
28 28
29 #include "sky/engine/public/platform/WebBlendMode.h" 29 #include "sky/engine/public/platform/WebBlendMode.h"
30 #include "sky/engine/public/platform/WebColor.h" 30 #include "sky/engine/public/platform/WebColor.h"
31 #include "sky/engine/public/platform/WebCommon.h" 31 #include "sky/engine/public/platform/WebCommon.h"
32 #include "sky/engine/public/platform/WebCompositorAnimation.h"
33 #include "sky/engine/public/platform/WebFloatPoint3D.h" 32 #include "sky/engine/public/platform/WebFloatPoint3D.h"
34 #include "sky/engine/public/platform/WebPoint.h" 33 #include "sky/engine/public/platform/WebPoint.h"
35 #include "sky/engine/public/platform/WebRect.h" 34 #include "sky/engine/public/platform/WebRect.h"
36 #include "sky/engine/public/platform/WebSize.h" 35 #include "sky/engine/public/platform/WebSize.h"
37 #include "sky/engine/public/platform/WebString.h" 36 #include "sky/engine/public/platform/WebString.h"
38 #include "sky/engine/public/platform/WebVector.h" 37 #include "sky/engine/public/platform/WebVector.h"
39 38
40 class SkMatrix44; 39 class SkMatrix44;
41 class SkImageFilter; 40 class SkImageFilter;
42 41
43 namespace blink { 42 namespace blink {
44 class WebCompositorAnimationDelegate;
45 class WebFilterOperations;
46 class WebLayerScrollClient; 43 class WebLayerScrollClient;
47 struct WebFloatPoint; 44 struct WebFloatPoint;
48 struct WebFloatRect; 45 struct WebFloatRect;
49 struct WebLayerPositionConstraint; 46 struct WebLayerPositionConstraint;
50 47
51 class WebLayer { 48 class WebLayer {
52 public: 49 public:
53 virtual ~WebLayer() { } 50 virtual ~WebLayer() { }
54 51
55 // Returns a positive ID that will be unique across all WebLayers allocated in this process. 52 // Returns a positive ID that will be unique across all WebLayers allocated in this process.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // using its own properties. If this property is set, this layer must 103 // using its own properties. If this property is set, this layer must
107 // have a parent, and the parent may not have this property set. 104 // have a parent, and the parent may not have this property set.
108 // Note: This API is to work around issues with visibility the handling of 105 // Note: This API is to work around issues with visibility the handling of
109 // WebKit layers that have a contents layer (canvas, plugin, WebGL, video, 106 // WebKit layers that have a contents layer (canvas, plugin, WebGL, video,
110 // etc). 107 // etc).
111 virtual void setUseParentBackfaceVisibility(bool) = 0; 108 virtual void setUseParentBackfaceVisibility(bool) = 0;
112 109
113 virtual void setBackgroundColor(WebColor) = 0; 110 virtual void setBackgroundColor(WebColor) = 0;
114 virtual WebColor backgroundColor() const = 0; 111 virtual WebColor backgroundColor() const = 0;
115 112
116 // Clear the filters in use by passing in a newly instantiated
117 // WebFilterOperations object.
118 virtual void setFilters(const WebFilterOperations&) = 0;
119
120 // An animation delegate is notified when animations are started and
121 // stopped. The WebLayer does not take ownership of the delegate, and it is
122 // the responsibility of the client to reset the layer's delegate before
123 // deleting the delegate.
124 virtual void setAnimationDelegate(WebCompositorAnimationDelegate*) = 0;
125
126
127 // Returns false if the animation cannot be added.
128 // Takes ownership of the WebCompositorAnimation object.
129 virtual bool addAnimation(WebCompositorAnimation*) = 0;
130
131 // Removes all animations with the given id. 113 // Removes all animations with the given id.
132 virtual void removeAnimation(int animationId) = 0; 114 virtual void removeAnimation(int animationId) = 0;
133 115
134 // Removes all animations with the given id targeting the given property.
135 virtual void removeAnimation(int animationId, WebCompositorAnimation::Target Property) = 0;
136
137 // Pauses all animations with the given id. 116 // Pauses all animations with the given id.
138 virtual void pauseAnimation(int animationId, double timeOffset) = 0; 117 virtual void pauseAnimation(int animationId, double timeOffset) = 0;
139 118
140 // Returns true if this layer has any active animations - useful for tests. 119 // Returns true if this layer has any active animations - useful for tests.
141 virtual bool hasActiveAnimation() = 0; 120 virtual bool hasActiveAnimation() = 0;
142 121
143 // If a scroll parent is set, this layer will inherit its parent's scroll 122 // If a scroll parent is set, this layer will inherit its parent's scroll
144 // delta and offset even though it will not be a descendant of the scroll 123 // delta and offset even though it will not be a descendant of the scroll
145 // in the layer hierarchy. 124 // in the layer hierarchy.
146 virtual void setScrollParent(WebLayer*) = 0; 125 virtual void setScrollParent(WebLayer*) = 0;
(...skipping 21 matching lines...) Expand all
168 // so, but this is to facilitate benchmarks and tests. 147 // so, but this is to facilitate benchmarks and tests.
169 virtual void setForceRenderSurface(bool) = 0; 148 virtual void setForceRenderSurface(bool) = 0;
170 149
171 // True if the layer is not part of a tree attached to a WebLayerTreeView. 150 // True if the layer is not part of a tree attached to a WebLayerTreeView.
172 virtual bool isOrphan() const = 0; 151 virtual bool isOrphan() const = 0;
173 }; 152 };
174 153
175 } // namespace blink 154 } // namespace blink
176 155
177 #endif // SKY_ENGINE_PUBLIC_PLATFORM_WEBLAYER_H_ 156 #endif // SKY_ENGINE_PUBLIC_PLATFORM_WEBLAYER_H_
OLDNEW
« no previous file with comments | « sky/engine/public/platform/WebFloatKeyframe.h ('k') | sky/engine/public/platform/WebLayerTreeView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698