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

Side by Side Diff: third_party/WebKit/public/platform/WebLayer.h

Issue 1739743003: Blink Compositor Animation: Erase old animation system. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Exclude histograms.xml Created 4 years, 9 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 23 matching lines...) Expand all
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;
45 class Layer; 44 class Layer;
46 class LayerClient; 45 class LayerClient;
47 class FilterOperations; 46 class FilterOperations;
48 } 47 }
49 48
50 namespace blink { 49 namespace blink {
51 50
52 class WebCompositorAnimationDelegate;
53 class WebLayerScrollClient; 51 class WebLayerScrollClient;
54 struct WebFloatPoint; 52 struct WebFloatPoint;
55 struct WebLayerPositionConstraint; 53 struct WebLayerPositionConstraint;
56 54
57 class WebLayer { 55 class WebLayer {
58 public: 56 public:
59 virtual ~WebLayer() { } 57 virtual ~WebLayer() { }
60 58
61 // Returns a positive ID that will be unique across all WebLayers allocated in this process. 59 // Returns a positive ID that will be unique across all WebLayers allocated in this process.
62 virtual int id() const = 0; 60 virtual int id() const = 0;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 132
135 // Clear the filters in use by passing in a newly instantiated 133 // Clear the filters in use by passing in a newly instantiated
136 // FilterOperations object. 134 // FilterOperations object.
137 virtual void setFilters(const cc::FilterOperations&) = 0; 135 virtual void setFilters(const cc::FilterOperations&) = 0;
138 136
139 // Clear the background filters in use by passing in a newly instantiated 137 // Clear the background filters in use by passing in a newly instantiated
140 // FilterOperations object. 138 // FilterOperations object.
141 // TODO(loyso): This should use CompositorFilterOperation. crbug.com/584551 139 // TODO(loyso): This should use CompositorFilterOperation. crbug.com/584551
142 virtual void setBackgroundFilters(const cc::FilterOperations&) = 0; 140 virtual void setBackgroundFilters(const cc::FilterOperations&) = 0;
143 141
144 // An animation delegate is notified when animations are started and
145 // stopped. The WebLayer does not take ownership of the delegate, and it is
146 // the responsibility of the client to reset the layer's delegate before
147 // deleting the delegate.
148 virtual void setAnimationDelegate(WebCompositorAnimationDelegate*) = 0;
149
150 // Returns false if the animation cannot be added.
151 // Takes ownership of the cc::Animation object.
152 // TODO(loyso): Erase it. crbug.com/575041
153 virtual bool addAnimation(cc::Animation*) = 0;
154
155 // Removes all animations with the given id.
156 virtual void removeAnimation(int animationId) = 0;
157
158 // Pauses all animations with the given id.
159 virtual void pauseAnimation(int animationId, double timeOffset) = 0;
160
161 // Aborts all animations with the given id. Different from removeAnimation
162 // in that aborting an animation stops it from affecting both the pending
163 // and active tree.
164 virtual void abortAnimation(int animationId) = 0;
165
166 // Returns true if this layer has any active animations - useful for tests. 142 // Returns true if this layer has any active animations - useful for tests.
167 virtual bool hasActiveAnimation() = 0; 143 virtual bool hasActiveAnimationForTesting() = 0;
168 144
169 // If a scroll parent is set, this layer will inherit its parent's scroll 145 // If a scroll parent is set, this layer will inherit its parent's scroll
170 // delta and offset even though it will not be a descendant of the scroll 146 // delta and offset even though it will not be a descendant of the scroll
171 // in the layer hierarchy. 147 // in the layer hierarchy.
172 virtual void setScrollParent(WebLayer*) = 0; 148 virtual void setScrollParent(WebLayer*) = 0;
173 149
174 // A layer will not respect any clips established by layers between it and 150 // A layer will not respect any clips established by layers between it and
175 // its nearest clipping ancestor. Note, the clip parent must be an ancestor. 151 // its nearest clipping ancestor. Note, the clip parent must be an ancestor.
176 // This is not a requirement of the scroll parent. 152 // This is not a requirement of the scroll parent.
177 virtual void setClipParent(WebLayer*) = 0; 153 virtual void setClipParent(WebLayer*) = 0;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 virtual void setElementId(uint64_t) = 0; 220 virtual void setElementId(uint64_t) = 0;
245 virtual uint64_t elementId() const = 0; 221 virtual uint64_t elementId() const = 0;
246 222
247 virtual void setCompositorMutableProperties(uint32_t) = 0; 223 virtual void setCompositorMutableProperties(uint32_t) = 0;
248 virtual uint32_t compositorMutableProperties() const = 0; 224 virtual uint32_t compositorMutableProperties() const = 0;
249 }; 225 };
250 226
251 } // namespace blink 227 } // namespace blink
252 228
253 #endif // WebLayer_h 229 #endif // WebLayer_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/public/platform/WebLayerTreeView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698