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

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

Issue 1533643003: CC Animations: Port UI Browser Compositor to use compositor animation timelines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eventobserver
Patch Set: Rebase. Created 5 years 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 | ui/compositor/compositor.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 #ifndef UI_COMPOSITOR_COMPOSITOR_H_ 5 #ifndef UI_COMPOSITOR_COMPOSITOR_H_
6 #define UI_COMPOSITOR_COMPOSITOR_H_ 6 #define UI_COMPOSITOR_COMPOSITOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 15 matching lines...) Expand all
26 #include "ui/gfx/geometry/vector2d.h" 26 #include "ui/gfx/geometry/vector2d.h"
27 #include "ui/gfx/gpu_memory_buffer.h" 27 #include "ui/gfx/gpu_memory_buffer.h"
28 #include "ui/gfx/native_widget_types.h" 28 #include "ui/gfx/native_widget_types.h"
29 29
30 namespace base { 30 namespace base {
31 class RunLoop; 31 class RunLoop;
32 class SingleThreadTaskRunner; 32 class SingleThreadTaskRunner;
33 } 33 }
34 34
35 namespace cc { 35 namespace cc {
36 class AnimationTimeline;
36 class ContextProvider; 37 class ContextProvider;
37 class Layer; 38 class Layer;
38 class LayerTreeDebugState; 39 class LayerTreeDebugState;
39 class LayerTreeHost; 40 class LayerTreeHost;
40 class RendererSettings; 41 class RendererSettings;
41 class SharedBitmapManager; 42 class SharedBitmapManager;
42 class SurfaceIdAllocator; 43 class SurfaceIdAllocator;
43 class TaskGraphRunner; 44 class TaskGraphRunner;
44 } 45 }
45 46
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 171
171 // Sets the root of the layer tree drawn by this Compositor. The root layer 172 // Sets the root of the layer tree drawn by this Compositor. The root layer
172 // must have no parent. The compositor's root layer is reset if the root layer 173 // must have no parent. The compositor's root layer is reset if the root layer
173 // is destroyed. NULL can be passed to reset the root layer, in which case the 174 // is destroyed. NULL can be passed to reset the root layer, in which case the
174 // compositor will stop drawing anything. 175 // compositor will stop drawing anything.
175 // The Compositor does not own the root layer. 176 // The Compositor does not own the root layer.
176 const Layer* root_layer() const { return root_layer_; } 177 const Layer* root_layer() const { return root_layer_; }
177 Layer* root_layer() { return root_layer_; } 178 Layer* root_layer() { return root_layer_; }
178 void SetRootLayer(Layer* root_layer); 179 void SetRootLayer(Layer* root_layer);
179 180
181 cc::AnimationTimeline* GetAnimationTimeline() const;
182
180 // Called when we need the compositor to preserve the alpha channel in the 183 // Called when we need the compositor to preserve the alpha channel in the
181 // output for situations when we want to render transparently atop something 184 // output for situations when we want to render transparently atop something
182 // else, e.g. Aero glass. 185 // else, e.g. Aero glass.
183 void SetHostHasTransparentBackground(bool host_has_transparent_background); 186 void SetHostHasTransparentBackground(bool host_has_transparent_background);
184 187
185 // The scale factor of the device that this compositor is 188 // The scale factor of the device that this compositor is
186 // compositing layers on. 189 // compositing layers on.
187 float device_scale_factor() const { return device_scale_factor_; } 190 float device_scale_factor() const { return device_scale_factor_; }
188 191
189 // Where possible, draws are scissored to a damage region calculated from 192 // Where possible, draws are scissored to a damage region calculated from
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 // layers on. 364 // layers on.
362 float device_scale_factor_; 365 float device_scale_factor_;
363 366
364 int last_started_frame_; 367 int last_started_frame_;
365 int last_ended_frame_; 368 int last_ended_frame_;
366 369
367 bool locks_will_time_out_; 370 bool locks_will_time_out_;
368 CompositorLock* compositor_lock_; 371 CompositorLock* compositor_lock_;
369 372
370 LayerAnimatorCollection layer_animator_collection_; 373 LayerAnimatorCollection layer_animator_collection_;
374 scoped_refptr<cc::AnimationTimeline> animation_timeline_;
371 375
372 // Used to send to any new CompositorBeginFrameObserver immediately. 376 // Used to send to any new CompositorBeginFrameObserver immediately.
373 cc::BeginFrameArgs missed_begin_frame_args_; 377 cc::BeginFrameArgs missed_begin_frame_args_;
374 378
375 base::WeakPtrFactory<Compositor> weak_ptr_factory_; 379 base::WeakPtrFactory<Compositor> weak_ptr_factory_;
376 380
377 DISALLOW_COPY_AND_ASSIGN(Compositor); 381 DISALLOW_COPY_AND_ASSIGN(Compositor);
378 }; 382 };
379 383
380 } // namespace ui 384 } // namespace ui
381 385
382 #endif // UI_COMPOSITOR_COMPOSITOR_H_ 386 #endif // UI_COMPOSITOR_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « no previous file | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698