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

Side by Side Diff: cc/surfaces/display_scheduler.h

Issue 1251823005: cc: Make DisplayScheduler aware of resize and add tracing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests; small logic changes Created 5 years, 5 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
« no previous file with comments | « cc/surfaces/display.cc ('k') | cc/surfaces/display_scheduler.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CC_SURFACES_DISPLAY_SCHEDULER_H_ 5 #ifndef CC_SURFACES_DISPLAY_SCHEDULER_H_
6 #define CC_SURFACES_DISPLAY_SCHEDULER_H_ 6 #define CC_SURFACES_DISPLAY_SCHEDULER_H_
7 7
8 #include "base/cancelable_callback.h" 8 #include "base/cancelable_callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 18 matching lines...) Expand all
29 class CC_SURFACES_EXPORT DisplayScheduler : public BeginFrameObserverBase { 29 class CC_SURFACES_EXPORT DisplayScheduler : public BeginFrameObserverBase {
30 public: 30 public:
31 DisplayScheduler(DisplaySchedulerClient* client, 31 DisplayScheduler(DisplaySchedulerClient* client,
32 BeginFrameSource* begin_frame_source, 32 BeginFrameSource* begin_frame_source,
33 base::SingleThreadTaskRunner* task_runner, 33 base::SingleThreadTaskRunner* task_runner,
34 int max_pending_swaps); 34 int max_pending_swaps);
35 ~DisplayScheduler() override; 35 ~DisplayScheduler() override;
36 36
37 void SetRootSurfaceResourcesLocked(bool locked); 37 void SetRootSurfaceResourcesLocked(bool locked);
38 void ForceImmediateSwapIfPossible(); 38 void ForceImmediateSwapIfPossible();
39 virtual void EntireDisplayDamaged(SurfaceId root_surface_id); 39 virtual void DisplayResized();
40 virtual void SetNewRootSurface(SurfaceId root_surface_id);
40 virtual void SurfaceDamaged(SurfaceId surface_id); 41 virtual void SurfaceDamaged(SurfaceId surface_id);
41 42
42 virtual void DidSwapBuffers(); 43 virtual void DidSwapBuffers();
43 void DidSwapBuffersComplete(); 44 void DidSwapBuffersComplete();
44 45
45 void OutputSurfaceLost(); 46 void OutputSurfaceLost();
46 47
47 // BeginFrameObserverBase implementation 48 // BeginFrameObserverBase implementation
48 bool OnBeginFrameDerivedImpl(const BeginFrameArgs& args) override; 49 bool OnBeginFrameDerivedImpl(const BeginFrameArgs& args) override;
49 50
(...skipping 11 matching lines...) Expand all
61 BeginFrameArgs current_begin_frame_args_; 62 BeginFrameArgs current_begin_frame_args_;
62 base::Closure begin_frame_deadline_closure_; 63 base::Closure begin_frame_deadline_closure_;
63 base::CancelableClosure begin_frame_deadline_task_; 64 base::CancelableClosure begin_frame_deadline_task_;
64 base::TimeTicks begin_frame_deadline_task_time_; 65 base::TimeTicks begin_frame_deadline_task_time_;
65 66
66 bool output_surface_lost_; 67 bool output_surface_lost_;
67 bool root_surface_resources_locked_; 68 bool root_surface_resources_locked_;
68 69
69 bool inside_begin_frame_deadline_interval_; 70 bool inside_begin_frame_deadline_interval_;
70 bool needs_draw_; 71 bool needs_draw_;
71 bool entire_display_damaged_; 72 bool expecting_root_surface_damage_because_of_resize_;
72 bool all_active_child_surfaces_ready_to_draw_; 73 bool all_active_child_surfaces_ready_to_draw_;
73 74
74 int pending_swaps_; 75 int pending_swaps_;
75 int max_pending_swaps_; 76 int max_pending_swaps_;
76 77
77 SurfaceId root_surface_id_; 78 SurfaceId root_surface_id_;
78 bool root_surface_damaged_; 79 bool root_surface_damaged_;
79 bool expect_damage_from_root_surface_; 80 bool expect_damage_from_root_surface_;
80 81
81 std::set<SurfaceId> child_surface_ids_damaged_; 82 std::set<SurfaceId> child_surface_ids_damaged_;
82 std::set<SurfaceId> child_surface_ids_damaged_prev_; 83 std::set<SurfaceId> child_surface_ids_damaged_prev_;
83 std::vector<SurfaceId> child_surface_ids_to_expect_damage_from_; 84 std::vector<SurfaceId> child_surface_ids_to_expect_damage_from_;
84 85
85 base::WeakPtrFactory<DisplayScheduler> weak_ptr_factory_; 86 base::WeakPtrFactory<DisplayScheduler> weak_ptr_factory_;
86 87
87 private: 88 private:
88 DISALLOW_COPY_AND_ASSIGN(DisplayScheduler); 89 DISALLOW_COPY_AND_ASSIGN(DisplayScheduler);
89 }; 90 };
90 91
91 } // namespace cc 92 } // namespace cc
92 93
93 #endif // CC_SURFACES_DISPLAY_SCHEDULER_H_ 94 #endif // CC_SURFACES_DISPLAY_SCHEDULER_H_
OLDNEW
« no previous file with comments | « cc/surfaces/display.cc ('k') | cc/surfaces/display_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698