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

Side by Side Diff: ui/gfx/compositor/layer.h

Issue 8247009: Explicit animation support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix VS2010 Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « ui/gfx/compositor/compositor.gyp ('k') | ui/gfx/compositor/layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_COMPOSITOR_LAYER_H_ 5 #ifndef UI_GFX_COMPOSITOR_LAYER_H_
6 #define UI_GFX_COMPOSITOR_LAYER_H_ 6 #define UI_GFX_COMPOSITOR_LAYER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/message_loop.h" 14 #include "base/message_loop.h"
15 #include "ui/gfx/rect.h" 15 #include "ui/gfx/rect.h"
16 #include "ui/gfx/transform.h" 16 #include "ui/gfx/transform.h"
17 #include "ui/gfx/compositor/compositor.h" 17 #include "ui/gfx/compositor/compositor.h"
18 #include "ui/gfx/compositor/layer_animator.h" 18 #include "ui/gfx/compositor/layer_animation_manager.h"
19 #include "ui/gfx/compositor/layer_animator_delegate.h" 19 #include "ui/gfx/compositor/layer_animator_delegate.h"
20 #include "ui/gfx/compositor/layer_delegate.h" 20 #include "ui/gfx/compositor/layer_delegate.h"
21 21
22 class SkCanvas; 22 class SkCanvas;
23 23
24 namespace ui { 24 namespace ui {
25 25
26 class Animation; 26 class Animation;
27 class Compositor; 27 class Compositor;
28 class Texture; 28 class Texture;
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 Transform* transform) const; 220 Transform* transform) const;
221 221
222 // The only externally updated layers are ones that get their pixels from 222 // The only externally updated layers are ones that get their pixels from
223 // WebKit and WebKit does not produce valid alpha values. All other layers 223 // WebKit and WebKit does not produce valid alpha values. All other layers
224 // should have valid alpha. 224 // should have valid alpha.
225 bool has_valid_alpha_channel() const { return !layer_updated_externally_; } 225 bool has_valid_alpha_channel() const { return !layer_updated_externally_; }
226 226
227 // If the animation is running and has progressed, it is stopped and all 227 // If the animation is running and has progressed, it is stopped and all
228 // properties that are animated (except |property|) are immediately set to 228 // properties that are animated (except |property|) are immediately set to
229 // their target value. 229 // their target value.
230 void StopAnimatingIfNecessary(LayerAnimator::AnimationProperty property); 230 void StopAnimatingIfNecessary(
231 LayerAnimationManager::AnimationProperty property);
231 232
232 // Following are invoked from the animation or if no animation exists to 233 // Following are invoked from the animation or if no animation exists to
233 // update the values immediately. 234 // update the values immediately.
234 void SetBoundsImmediately(const gfx::Rect& bounds); 235 void SetBoundsImmediately(const gfx::Rect& bounds);
235 void SetTransformImmediately(const ui::Transform& transform); 236 void SetTransformImmediately(const ui::Transform& transform);
236 void SetOpacityImmediately(float opacity); 237 void SetOpacityImmediately(float opacity);
237 238
238 // LayerAnimatorDelegate overrides: 239 // LayerAnimatorDelegate overrides:
239 virtual void SetBoundsFromAnimator(const gfx::Rect& bounds) OVERRIDE; 240 virtual void SetBoundsFromAnimator(const gfx::Rect& bounds) OVERRIDE;
240 virtual void SetTransformFromAnimator(const Transform& transform) OVERRIDE; 241 virtual void SetTransformFromAnimator(const Transform& transform) OVERRIDE;
(...skipping 22 matching lines...) Expand all
263 264
264 gfx::Rect invalid_rect_; 265 gfx::Rect invalid_rect_;
265 266
266 // If true the layer is always up to date. 267 // If true the layer is always up to date.
267 bool layer_updated_externally_; 268 bool layer_updated_externally_;
268 269
269 float opacity_; 270 float opacity_;
270 271
271 LayerDelegate* delegate_; 272 LayerDelegate* delegate_;
272 273
273 scoped_ptr<LayerAnimator> animator_; 274 scoped_ptr<LayerAnimationManager> animator_;
274 275
275 DISALLOW_COPY_AND_ASSIGN(Layer); 276 DISALLOW_COPY_AND_ASSIGN(Layer);
276 }; 277 };
277 278
278 } // namespace ui 279 } // namespace ui
279 280
280 #endif // UI_GFX_COMPOSITOR_LAYER_H_ 281 #endif // UI_GFX_COMPOSITOR_LAYER_H_
OLDNEW
« no previous file with comments | « ui/gfx/compositor/compositor.gyp ('k') | ui/gfx/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698