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

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

Issue 1251693002: cc: Consider Surface active if frame received recently (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 20fps + single surface 20fps 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 | « no previous file | cc/surfaces/display_scheduler.cc » ('j') | cc/surfaces/display_scheduler.cc » ('J')
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 void OutputSurfaceLost(); 45 void OutputSurfaceLost();
46 46
47 // BeginFrameObserverBase implementation 47 // BeginFrameObserverBase implementation
48 bool OnBeginFrameDerivedImpl(const BeginFrameArgs& args) override; 48 bool OnBeginFrameDerivedImpl(const BeginFrameArgs& args) override;
49 49
50 protected: 50 protected:
51 base::TimeTicks DesiredBeginFrameDeadlineTime(); 51 base::TimeTicks DesiredBeginFrameDeadlineTime();
52 virtual void ScheduleBeginFrameDeadline(); 52 virtual void ScheduleBeginFrameDeadline();
53 void AttemptDrawAndSwap(); 53 void AttemptDrawAndSwap();
54 void OnBeginFrameDeadline(); 54 void OnBeginFrameDeadline();
55 void UpdateSurfaceDamageExpectations();
55 void DrawAndSwap(); 56 void DrawAndSwap();
56 57
57 DisplaySchedulerClient* client_; 58 DisplaySchedulerClient* client_;
58 BeginFrameSource* begin_frame_source_; 59 BeginFrameSource* begin_frame_source_;
59 base::SingleThreadTaskRunner* task_runner_; 60 base::SingleThreadTaskRunner* task_runner_;
60 61
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 entire_display_damaged_;
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_;
84 std::set<SurfaceId> child_surface_ids_damaged_prev_prev_;
sunnyps 2015/07/23 03:02:40 Can you use an array of sets here? Optional: I've
brianderson 2015/07/23 18:21:46 Sure, although I'd like to keep child_surface_ids_
sunnyps 2015/07/23 21:10:38 It doesn't look like this could ever be a performa
83 std::vector<SurfaceId> child_surface_ids_to_expect_damage_from_; 85 std::vector<SurfaceId> child_surface_ids_to_expect_damage_from_;
84 86
85 base::WeakPtrFactory<DisplayScheduler> weak_ptr_factory_; 87 base::WeakPtrFactory<DisplayScheduler> weak_ptr_factory_;
86 88
87 private: 89 private:
88 DISALLOW_COPY_AND_ASSIGN(DisplayScheduler); 90 DISALLOW_COPY_AND_ASSIGN(DisplayScheduler);
89 }; 91 };
90 92
91 } // namespace cc 93 } // namespace cc
92 94
93 #endif // CC_SURFACES_DISPLAY_SCHEDULER_H_ 95 #endif // CC_SURFACES_DISPLAY_SCHEDULER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/surfaces/display_scheduler.cc » ('j') | cc/surfaces/display_scheduler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698