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

Side by Side Diff: media/capture/content/video_capture_oracle.h

Issue 2770923003: TabCapture: enforce active refresh if there is un-sampled compositor update (Closed)
Patch Set: Apply suggested patch Created 3 years, 9 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 MEDIA_CAPTURE_CONTENT_VIDEO_CAPTURE_ORACLE_H_ 5 #ifndef MEDIA_CAPTURE_CONTENT_VIDEO_CAPTURE_ORACLE_H_
6 #define MEDIA_CAPTURE_CONTENT_VIDEO_CAPTURE_ORACLE_H_ 6 #define MEDIA_CAPTURE_CONTENT_VIDEO_CAPTURE_ORACLE_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "media/base/feedback_signal_accumulator.h" 10 #include "media/base/feedback_signal_accumulator.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // size in response to end-to-end utilization. 138 // size in response to end-to-end utilization.
139 const bool auto_throttling_enabled_; 139 const bool auto_throttling_enabled_;
140 140
141 // Incremented every time a paint or update event occurs. 141 // Incremented every time a paint or update event occurs.
142 int next_frame_number_; 142 int next_frame_number_;
143 143
144 // Stores the last |event_time| from the last observation/decision. Used to 144 // Stores the last |event_time| from the last observation/decision. Used to
145 // sanity-check that event times are monotonically non-decreasing. 145 // sanity-check that event times are monotonically non-decreasing.
146 base::TimeTicks last_event_time_[kNumEvents]; 146 base::TimeTicks last_event_time_[kNumEvents];
147 147
148 // Set to true if there have been updates to the source content that were not
149 // sampled. This will prevent passive refresh requests from being satisfied
150 // when an active refresh should be used instead.
151 bool source_is_dirty_;
152
153 // The last |event| passed to ObserveEventAndDecideCapture() where it returned
154 // a "yes" decision. This is used by RecordCapture() to decide whether the
155 // |source_is_dirty_| flag can be cleared.
156 Event last_event_causing_capture_;
miu 2017/03/24 21:17:28 Per discussion, we don't need |last_event_causing_
braveyao 2017/03/24 23:12:27 Done.
157
148 // Updated by the last call to ObserveEventAndDecideCapture() with the 158 // Updated by the last call to ObserveEventAndDecideCapture() with the
149 // estimated duration of the next frame to sample. This is zero if the method 159 // estimated duration of the next frame to sample. This is zero if the method
150 // returned false. 160 // returned false.
151 base::TimeDelta duration_of_next_frame_; 161 base::TimeDelta duration_of_next_frame_;
152 162
153 // Stores the frame number from the last successfully delivered frame. 163 // Stores the frame number from the last successfully delivered frame.
154 int last_successfully_delivered_frame_number_; 164 int last_successfully_delivered_frame_number_;
155 165
156 // Stores the number of pending frame captures. 166 // Stores the number of pending frame captures.
157 int num_frames_pending_; 167 int num_frames_pending_;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 208
199 // The timestamp of the frame where |content_sampler_| last detected 209 // The timestamp of the frame where |content_sampler_| last detected
200 // animation. This determines whether capture size increases will be 210 // animation. This determines whether capture size increases will be
201 // aggressive (because content is not animating). 211 // aggressive (because content is not animating).
202 base::TimeTicks last_time_animation_was_detected_; 212 base::TimeTicks last_time_animation_was_detected_;
203 }; 213 };
204 214
205 } // namespace media 215 } // namespace media
206 216
207 #endif // MEDIA_CAPTURE_CONTENT_VIDEO_CAPTURE_ORACLE_H_ 217 #endif // MEDIA_CAPTURE_CONTENT_VIDEO_CAPTURE_ORACLE_H_
OLDNEW
« no previous file with comments | « no previous file | media/capture/content/video_capture_oracle.cc » ('j') | media/capture/content/video_capture_oracle.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698