summarylogtreecommitdiffstats
path: root/electron-32.3.3-adjust-context-for-fix_osr_stutter_in_both_cpu_and_gpu_capture_when_page_has_animation.patch
blob: 6f5f192a291c6fd10deeacf33e96ea0a83f7a8b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
diff --git a/patches/chromium/fix_osr_stutter_in_both_cpu_and_gpu_capture_when_page_has_animation.patch b/patches/chromium/fix_osr_stutter_in_both_cpu_and_gpu_capture_when_page_has_animation.patch
index a8d4bc910a..0853258501 100644
--- a/patches/chromium/fix_osr_stutter_in_both_cpu_and_gpu_capture_when_page_has_animation.patch
+++ b/patches/chromium/fix_osr_stutter_in_both_cpu_and_gpu_capture_when_page_has_animation.patch
@@ -13,7 +13,7 @@ diff --git a/media/capture/content/video_capture_oracle.cc b/media/capture/conte
 index dad9598799a670b3cfb14965bc8a7b4ea3b4f95f..05a82788ae1e5c304ee150a2390f346d7b454630 100644
 --- a/media/capture/content/video_capture_oracle.cc
 +++ b/media/capture/content/video_capture_oracle.cc
-@@ -118,8 +118,9 @@ void VideoCaptureOracle::SetCaptureSizeConstraints(
+@@ -113,8 +113,9 @@ void VideoCaptureOracle::SetCaptureSizeConstraints(
  void VideoCaptureOracle::SetAutoThrottlingEnabled(bool enabled) {
    const bool was_enabled =
        (capture_size_throttling_mode_ != kThrottlingDisabled);
@@ -24,7 +24,7 @@ index dad9598799a670b3cfb14965bc8a7b4ea3b4f95f..05a82788ae1e5c304ee150a2390f346d
    capture_size_throttling_mode_ =
        enabled ? kThrottlingEnabled : kThrottlingDisabled;
    VLOG(1) << "Capture size auto-throttling is now "
-@@ -127,19 +128,22 @@ void VideoCaptureOracle::SetAutoThrottlingEnabled(bool enabled) {
+@@ -122,19 +123,22 @@ void VideoCaptureOracle::SetAutoThrottlingEnabled(bool enabled) {
  
    // When not auto-throttling, have the CaptureResolutionChooser target the max
    // resolution within constraints.
@@ -51,7 +51,7 @@ index dad9598799a670b3cfb14965bc8a7b4ea3b4f95f..05a82788ae1e5c304ee150a2390f346d
  }
  
  bool VideoCaptureOracle::ObserveEventAndDecideCapture(
-@@ -172,6 +176,15 @@ bool VideoCaptureOracle::ObserveEventAndDecideCapture(
+@@ -167,6 +171,15 @@ bool VideoCaptureOracle::ObserveEventAndDecideCapture(
          if (should_sample) {
            event_time = content_sampler_.frame_timestamp();
            duration_of_next_frame_ = content_sampler_.sampling_period();
@@ -67,8 +67,8 @@ index dad9598799a670b3cfb14965bc8a7b4ea3b4f95f..05a82788ae1e5c304ee150a2390f346d
          }
          last_time_animation_was_detected_ = event_time;
        } else {
-@@ -198,8 +211,9 @@ bool VideoCaptureOracle::ObserveEventAndDecideCapture(
-       NOTREACHED();
+@@ -194,8 +207,9 @@ bool VideoCaptureOracle::ObserveEventAndDecideCapture(
+       break;
    }
  
 -  if (!should_sample)
@@ -78,7 +78,7 @@ index dad9598799a670b3cfb14965bc8a7b4ea3b4f95f..05a82788ae1e5c304ee150a2390f346d
  
    // If the exact duration of the next frame has not been determined, estimate
    // it using the difference between the current and last frame.
-@@ -373,16 +387,18 @@ void VideoCaptureOracle::RecordConsumerFeedback(
+@@ -369,16 +383,18 @@ void VideoCaptureOracle::RecordConsumerFeedback(
  
    // resource_utilization feedback.
  
@@ -99,7 +99,7 @@ index dad9598799a670b3cfb14965bc8a7b4ea3b4f95f..05a82788ae1e5c304ee150a2390f346d
  
    if (capture_size_throttling_mode_ != kThrottlingActive) {
      VLOG(1) << "Received consumer feedback at frame #" << frame_number
-@@ -553,12 +569,14 @@ int VideoCaptureOracle::AnalyzeForIncreasedArea(base::TimeTicks analyze_time) {
+@@ -549,12 +565,14 @@ int VideoCaptureOracle::AnalyzeForIncreasedArea(base::TimeTicks analyze_time) {
    const int current_area = capture_size_.GetArea();
    const int increased_area =
        resolution_chooser_.FindLargerFrameSize(current_area, 1).GetArea();
@@ -116,7 +116,7 @@ index dad9598799a670b3cfb14965bc8a7b4ea3b4f95f..05a82788ae1e5c304ee150a2390f346d
    if (buffer_pool_utilization_.current() > 0.0) {
      const int buffer_capable_area = base::saturated_cast<int>(
          current_area / buffer_pool_utilization_.current());
-@@ -593,8 +611,9 @@ int VideoCaptureOracle::AnalyzeForIncreasedArea(base::TimeTicks analyze_time) {
+@@ -589,8 +607,9 @@ int VideoCaptureOracle::AnalyzeForIncreasedArea(base::TimeTicks analyze_time) {
  
    // At this point, the system is currently under-utilized.  Reset the start
    // time if the system was not under-utilized when the last analysis was made.
@@ -128,7 +128,7 @@ index dad9598799a670b3cfb14965bc8a7b4ea3b4f95f..05a82788ae1e5c304ee150a2390f346d
    // If the under-utilization started soon after the last source size change,
    // permit an immediate increase in the capture area.  This allows the system
 diff --git a/media/capture/content/video_capture_oracle_unittest.cc b/media/capture/content/video_capture_oracle_unittest.cc
-index 066676fa998db6782270ddbf42fe176d88eb30d4..6cd7567e91bc8c496846a685aa1506c7548f3a21 100644
+index 066676fa998db..6cd7567e91bc8 100644
 --- a/media/capture/content/video_capture_oracle_unittest.cc
 +++ b/media/capture/content/video_capture_oracle_unittest.cc
 @@ -158,21 +158,26 @@ TEST(VideoCaptureOracleTest, TransitionsSmoothlyBetweenSamplers) {