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

Unified Diff: content/browser/media/capture/video_capture_oracle.cc

Issue 962503005: Clean-up: Remove accelerated subscriber switch for tab/desktop capture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/media/capture/video_capture_oracle.cc
diff --git a/content/browser/media/capture/video_capture_oracle.cc b/content/browser/media/capture/video_capture_oracle.cc
index c42b456e6dc0c02546d0293518aeafc7da755427..dad77c72e965da7e79bca59a1417f0b29a09a816 100644
--- a/content/browser/media/capture/video_capture_oracle.cc
+++ b/content/browser/media/capture/video_capture_oracle.cc
@@ -64,12 +64,10 @@ double FractionFromExpectedFrameRate(base::TimeDelta delta, int frame_rate) {
} // anonymous namespace
-VideoCaptureOracle::VideoCaptureOracle(base::TimeDelta min_capture_period,
- bool events_are_reliable)
+VideoCaptureOracle::VideoCaptureOracle(base::TimeDelta min_capture_period)
: frame_number_(0),
last_delivered_frame_number_(-1),
smoothing_sampler_(min_capture_period,
- events_are_reliable,
kNumRedundantCapturesOfStaticContent),
content_sampler_(min_capture_period) {
}
@@ -174,10 +172,8 @@ void VideoCaptureOracle::SetFrameTimestamp(int frame_number,
}
SmoothEventSampler::SmoothEventSampler(base::TimeDelta min_capture_period,
- bool events_are_reliable,
int redundant_capture_goal)
- : events_are_reliable_(events_are_reliable),
- min_capture_period_(min_capture_period),
+ : min_capture_period_(min_capture_period),
redundant_capture_goal_(redundant_capture_goal),
token_bucket_capacity_(min_capture_period + min_capture_period / 2),
overdue_sample_count_(0),
@@ -231,14 +227,8 @@ bool SmoothEventSampler::IsOverdueForSamplingAt(base::TimeTicks event_time)
const {
DCHECK(!event_time.is_null());
- // If we don't get events on compositor updates on this platform, then we
- // don't reliably know whether we're dirty.
- if (events_are_reliable_) {
- if (!HasUnrecordedEvent() &&
- overdue_sample_count_ >= redundant_capture_goal_) {
- return false; // Not dirty.
- }
- }
+ if (!HasUnrecordedEvent() && overdue_sample_count_ >= redundant_capture_goal_)
+ return false; // Not dirty.
if (last_sample_.is_null())
return true;
« no previous file with comments | « content/browser/media/capture/video_capture_oracle.h ('k') | content/browser/media/capture/video_capture_oracle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698