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

Side by Side Diff: ash/wm/window_animations.cc

Issue 26880010: gfx: Add FrameTime and DisplayTime classes (Closed) Base URL: http://git.chromium.org/chromium/src.git@checkHighResNow4
Patch Set: WIP Created 7 years, 1 month 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
« no previous file with comments | « no previous file | ash/wm/window_animations_unittest.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "ash/wm/window_animations.h" 5 #include "ash/wm/window_animations.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 14 matching lines...) Expand all
25 #include "ui/aura/client/aura_constants.h" 25 #include "ui/aura/client/aura_constants.h"
26 #include "ui/aura/window.h" 26 #include "ui/aura/window.h"
27 #include "ui/aura/window_observer.h" 27 #include "ui/aura/window_observer.h"
28 #include "ui/aura/window_property.h" 28 #include "ui/aura/window_property.h"
29 #include "ui/compositor/compositor_observer.h" 29 #include "ui/compositor/compositor_observer.h"
30 #include "ui/compositor/layer.h" 30 #include "ui/compositor/layer.h"
31 #include "ui/compositor/layer_animation_observer.h" 31 #include "ui/compositor/layer_animation_observer.h"
32 #include "ui/compositor/layer_animation_sequence.h" 32 #include "ui/compositor/layer_animation_sequence.h"
33 #include "ui/compositor/layer_animator.h" 33 #include "ui/compositor/layer_animator.h"
34 #include "ui/compositor/scoped_layer_animation_settings.h" 34 #include "ui/compositor/scoped_layer_animation_settings.h"
35 #include "ui/gfx/frame_time.h"
35 #include "ui/gfx/interpolated_transform.h" 36 #include "ui/gfx/interpolated_transform.h"
36 #include "ui/gfx/screen.h" 37 #include "ui/gfx/screen.h"
37 #include "ui/gfx/vector3d_f.h" 38 #include "ui/gfx/vector3d_f.h"
38 #include "ui/views/corewm/window_util.h" 39 #include "ui/views/corewm/window_util.h"
39 #include "ui/views/view.h" 40 #include "ui/views/view.h"
40 #include "ui/views/widget/widget.h" 41 #include "ui/views/widget/widget.h"
41 42
42 namespace ash { 43 namespace ash {
43 namespace { 44 namespace {
44 const int kLayerAnimationsForMinimizeDurationMS = 200; 45 const int kLayerAnimationsForMinimizeDurationMS = 200;
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 window_ = NULL; 268 window_ = NULL;
268 layer_->GetCompositor()->RemoveObserver(this); 269 layer_->GetCompositor()->RemoveObserver(this);
269 views::corewm::DeepDeleteLayers(layer_); 270 views::corewm::DeepDeleteLayers(layer_);
270 layer_ = NULL; 271 layer_ = NULL;
271 } 272 }
272 273
273 // ui::CompositorObserver overrides: 274 // ui::CompositorObserver overrides:
274 virtual void OnCompositingDidCommit(ui::Compositor* compositor) OVERRIDE { 275 virtual void OnCompositingDidCommit(ui::Compositor* compositor) OVERRIDE {
275 } 276 }
276 virtual void OnCompositingStarted(ui::Compositor* compositor, 277 virtual void OnCompositingStarted(ui::Compositor* compositor,
277 base::TimeTicks start_time) OVERRIDE { 278 gfx::FrameTime start_time) OVERRIDE {
278 } 279 }
279 virtual void OnCompositingEnded(ui::Compositor* compositor) OVERRIDE { 280 virtual void OnCompositingEnded(ui::Compositor* compositor) OVERRIDE {
280 } 281 }
281 virtual void OnCompositingAborted(ui::Compositor* compositor) OVERRIDE { 282 virtual void OnCompositingAborted(ui::Compositor* compositor) OVERRIDE {
282 // Triggers OnImplicitAnimationsCompleted() to be called and deletes us. 283 // Triggers OnImplicitAnimationsCompleted() to be called and deletes us.
283 layer_->GetAnimator()->StopAnimating(); 284 layer_->GetAnimator()->StopAnimating();
284 } 285 }
285 virtual void OnCompositingLockStateChanged( 286 virtual void OnCompositingLockStateChanged(
286 ui::Compositor* compositor) OVERRIDE { 287 ui::Compositor* compositor) OVERRIDE {
287 } 288 }
288 virtual void OnUpdateVSyncParameters(ui::Compositor* compositor, 289 virtual void OnUpdateVSyncParameters(ui::Compositor* compositor,
289 base::TimeTicks timebase, 290 gfx::FrameTime timebase,
290 base::TimeDelta interval) OVERRIDE { 291 base::TimeDelta interval) OVERRIDE {
291 } 292 }
292 293
293 // aura::WindowObserver overrides: 294 // aura::WindowObserver overrides:
294 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE { 295 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE {
295 // Triggers OnImplicitAnimationsCompleted() to be called and deletes us. 296 // Triggers OnImplicitAnimationsCompleted() to be called and deletes us.
296 layer_->GetAnimator()->StopAnimating(); 297 layer_->GetAnimator()->StopAnimating();
297 } 298 }
298 virtual void OnWindowRemovingFromRootWindow(aura::Window* window) OVERRIDE { 299 virtual void OnWindowRemovingFromRootWindow(aura::Window* window) OVERRIDE {
299 layer_->GetAnimator()->StopAnimating(); 300 layer_->GetAnimator()->StopAnimating();
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 } 555 }
555 556
556 // Assume the launcher is overflowed, zoom off to the bottom right of the 557 // Assume the launcher is overflowed, zoom off to the bottom right of the
557 // work area. 558 // work area.
558 gfx::Rect work_area = 559 gfx::Rect work_area =
559 Shell::GetScreen()->GetDisplayNearestWindow(window).work_area(); 560 Shell::GetScreen()->GetDisplayNearestWindow(window).work_area();
560 return gfx::Rect(work_area.right(), work_area.bottom(), 0, 0); 561 return gfx::Rect(work_area.right(), work_area.bottom(), 0, 0);
561 } 562 }
562 563
563 } // namespace ash 564 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/wm/window_animations_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698