From 88fa60357daa2e0f3007e1cab3e83ec636151f03 Mon Sep 17 00:00:00 2001 From: Joe Downing Date: Tue, 16 Aug 2022 21:24:09 -0700 Subject: [PATCH] Remove unused headers ScreenCaptureFrameQueue I've added the proper headers to the only file in Chromium which includes screen_capture_frame_queue.h (see https://chromium-review.googlesource.com/c/chromium/src/+/3836317). I've also built the remoting host and Chrome on Windows and Linux with this change and did not see any build errors. The only build error I encountered was in shared_screencast_stream when building webrtc so I added the required header there. Bug: webrtc:14378 Change-Id: Ie88e606dfa52f18514a87b87e5904424543d7df3 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271922 Commit-Queue: Joe Downing Reviewed-by: Alexander Cooper Cr-Commit-Position: refs/heads/main@{#37811} --- .../linux/wayland/shared_screencast_stream.cc | 1 + modules/desktop_capture/screen_capture_frame_queue.h | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc index 5128091dc4..5cbeaee9bf 100644 --- a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +++ b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc @@ -22,6 +22,7 @@ #include "modules/desktop_capture/linux/wayland/egl_dmabuf.h" #include "modules/desktop_capture/linux/wayland/screencast_stream_utils.h" #include "modules/desktop_capture/screen_capture_frame_queue.h" +#include "modules/desktop_capture/shared_desktop_frame.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" #include "rtc_base/sanitizer.h" diff --git a/modules/desktop_capture/screen_capture_frame_queue.h b/modules/desktop_capture/screen_capture_frame_queue.h index f54b8b606a..46e19da77e 100644 --- a/modules/desktop_capture/screen_capture_frame_queue.h +++ b/modules/desktop_capture/screen_capture_frame_queue.h @@ -13,11 +13,6 @@ #include -// TODO(zijiehe): These headers are not used in this file, but to avoid build -// break in remoting/host. We should add headers in each individual files. -#include "modules/desktop_capture/desktop_frame.h" // Remove -#include "modules/desktop_capture/shared_desktop_frame.h" // Remove - namespace webrtc { // Represents a queue of reusable video frames. Provides access to the 'current' @@ -36,7 +31,7 @@ namespace webrtc { template class ScreenCaptureFrameQueue { public: - ScreenCaptureFrameQueue() : current_(0) {} + ScreenCaptureFrameQueue() = default; ~ScreenCaptureFrameQueue() = default; ScreenCaptureFrameQueue(const ScreenCaptureFrameQueue&) = delete; @@ -69,7 +64,7 @@ class ScreenCaptureFrameQueue { private: // Index of the current frame. - int current_; + int current_ = 0; static const int kQueueLength = 2; std::unique_ptr frames_[kQueueLength];