| Index: remoting/host/video_frame_capturer_linux.cc
|
| diff --git a/remoting/host/video_frame_capturer_linux.cc b/remoting/host/video_frame_capturer_linux.cc
|
| index 0bcbb4c51cc850e2476a4e7fbac39c168d2dc288..1dbf71886b829fa587a7da640889d4e0a2e7a2f5 100644
|
| --- a/remoting/host/video_frame_capturer_linux.cc
|
| +++ b/remoting/host/video_frame_capturer_linux.cc
|
| @@ -82,12 +82,8 @@ class VideoFrameCapturerLinux : public VideoFrameCapturer {
|
| // Capturer interface.
|
| virtual void Start(const CursorShapeChangedCallback& callback) OVERRIDE;
|
| virtual void Stop() OVERRIDE;
|
| - virtual void ScreenConfigurationChanged() OVERRIDE;
|
| virtual media::VideoFrame::Format pixel_format() const OVERRIDE;
|
| - virtual void ClearInvalidRegion() OVERRIDE;
|
| virtual void InvalidateRegion(const SkRegion& invalid_region) OVERRIDE;
|
| - virtual void InvalidateScreen(const SkISize& size) OVERRIDE;
|
| - virtual void InvalidateFullScreen() OVERRIDE;
|
| virtual void CaptureInvalidRegion(
|
| const CaptureCompletedCallback& callback) OVERRIDE;
|
| virtual const SkISize& size_most_recent() const OVERRIDE;
|
| @@ -115,6 +111,9 @@ class VideoFrameCapturerLinux : public VideoFrameCapturer {
|
| // has been set (using SetCursorShapeChangedCallback).
|
| void CaptureCursor();
|
|
|
| + // Called when the screen configuration is changed.
|
| + void ScreenConfigurationChanged();
|
| +
|
| // Synchronize the current buffer with |last_buffer_|, by copying pixels from
|
| // the area of |last_invalid_rects|.
|
| // Note this only works on the assumption that kNumBuffers == 2, as
|
| @@ -299,36 +298,14 @@ void VideoFrameCapturerLinux::Start(
|
| void VideoFrameCapturerLinux::Stop() {
|
| }
|
|
|
| -void VideoFrameCapturerLinux::ScreenConfigurationChanged() {
|
| - last_buffer_ = NULL;
|
| - for (int i = 0; i < kNumBuffers; ++i) {
|
| - buffers_[i].set_needs_update();
|
| - }
|
| - helper_.ClearInvalidRegion();
|
| - x_server_pixel_buffer_.Init(display_);
|
| -}
|
| -
|
| media::VideoFrame::Format VideoFrameCapturerLinux::pixel_format() const {
|
| return pixel_format_;
|
| }
|
|
|
| -void VideoFrameCapturerLinux::ClearInvalidRegion() {
|
| - helper_.ClearInvalidRegion();
|
| -}
|
| -
|
| void VideoFrameCapturerLinux::InvalidateRegion(const SkRegion& invalid_region) {
|
| helper_.InvalidateRegion(invalid_region);
|
| }
|
|
|
| -void VideoFrameCapturerLinux::InvalidateScreen(const SkISize& size) {
|
| - helper_.InvalidateScreen(size);
|
| -}
|
| -
|
| -void VideoFrameCapturerLinux::InvalidateFullScreen() {
|
| - helper_.InvalidateFullScreen();
|
| - last_buffer_ = NULL;
|
| -}
|
| -
|
| void VideoFrameCapturerLinux::CaptureInvalidRegion(
|
| const CaptureCompletedCallback& callback) {
|
| // Process XEvents for XDamage and cursor shape tracking.
|
| @@ -484,6 +461,15 @@ CaptureData* VideoFrameCapturerLinux::CaptureFrame() {
|
| return capture_data;
|
| }
|
|
|
| +void VideoFrameCapturerLinux::ScreenConfigurationChanged() {
|
| + last_buffer_ = NULL;
|
| + for (int i = 0; i < kNumBuffers; ++i) {
|
| + buffers_[i].set_needs_update();
|
| + }
|
| + helper_.ClearInvalidRegion();
|
| + x_server_pixel_buffer_.Init(display_);
|
| +}
|
| +
|
| void VideoFrameCapturerLinux::SynchronizeFrame() {
|
| // Synchronize the current buffer with the previous one since we do not
|
| // capture the entire desktop. Note that encoder may be reading from the
|
|
|