Skip to content

Commit 53f6caf

Browse files
authored
browser(webkit): manually reencode image as multiple frames (#2470)
1 parent 95ef71c commit 53f6caf

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

browser_patches/webkit/BUILD_NUMBER

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1265
1+
1266

browser_patches/webkit/patches/bootstrap.diff

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8976,10 +8976,10 @@ index 0000000000000000000000000000000000000000..2f96d82a650993bc0b0469453e7634d2
89768976
+} // namespace WebKit
89778977
diff --git a/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp
89788978
new file mode 100644
8979-
index 0000000000000000000000000000000000000000..d75a8076d663ca75d1c42702087d2b0787215f24
8979+
index 0000000000000000000000000000000000000000..39ebb8bf0cd3bda7913e9f029eeff5256de3fcac
89808980
--- /dev/null
89818981
+++ b/Source/WebKit/UIProcess/Inspector/Agents/ScreencastEncoder.cpp
8982-
@@ -0,0 +1,392 @@
8982+
@@ -0,0 +1,395 @@
89838983
+/*
89848984
+ * Copyright (c) 2010, The WebM Project authors. All rights reserved.
89858985
+ * Copyright (c) 2013 The Chromium Authors. All rights reserved.
@@ -9193,7 +9193,10 @@ index 0000000000000000000000000000000000000000..d75a8076d663ca75d1c42702087d2b07
91939193
+ {
91949194
+ m_encoderQueue->dispatch([this, frame = WTFMove(frame)] {
91959195
+ frame->convertToVpxImage(m_image.get());
9196-
+ encodeFrame(m_image.get(), frame->duration());
9196+
+ // TODO: figure out why passing duration to the codec results in much
9197+
+ // worse visual quality and makes video stutter.
9198+
+ for (int i = 0; i < frame->duration(); i++)
9199+
+ encodeFrame(m_image.get(), 1);
91979200
+ });
91989201
+ }
91999202
+

0 commit comments

Comments
 (0)