| Index: webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc
|
| diff --git a/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc b/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc
|
| index 8af9779ce80e02f7774f7e5c9fbfb881b3ab5ffc..87c5c82fdf4276c7e2db2576eaa5fa5c2fc3bcf2 100644
|
| --- a/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc
|
| +++ b/webrtc/modules/desktop_capture/win/screen_capturer_win_magnifier.cc
|
| @@ -90,7 +90,7 @@ void ScreenCapturerWinMagnifier::SetSharedMemoryFactory(
|
| void ScreenCapturerWinMagnifier::Capture(const DesktopRegion& region) {
|
| TickTime capture_start_time = TickTime::Now();
|
|
|
| - queue_.MoveToNextFrame();
|
| + queue_.MoveToNext();
|
|
|
| // Request that the system not power-down the system, or the display hardware.
|
| if (!SetThreadExecutionState(ES_DISPLAY_REQUIRED | ES_SYSTEM_REQUIRED)) {
|
| @@ -135,8 +135,8 @@ void ScreenCapturerWinMagnifier::Capture(const DesktopRegion& region) {
|
| return;
|
| }
|
|
|
| - const DesktopFrame* current_frame = queue_.current_frame();
|
| - const DesktopFrame* last_frame = queue_.previous_frame();
|
| + const DesktopFrame* current_frame = queue_.current();
|
| + const DesktopFrame* last_frame = queue_.previous();
|
| if (last_frame && last_frame->size().equals(current_frame->size())) {
|
| // Make sure the differencer is set up correctly for these previous and
|
| // current screens.
|
| @@ -163,7 +163,7 @@ void ScreenCapturerWinMagnifier::Capture(const DesktopRegion& region) {
|
| helper_.set_size_most_recent(current_frame->size());
|
|
|
| // Emit the current frame.
|
| - DesktopFrame* frame = queue_.current_frame()->Share();
|
| + DesktopFrame* frame = queue_.current()->Share();
|
| frame->set_dpi(DesktopVector(GetDeviceCaps(desktop_dc_, LOGPIXELSX),
|
| GetDeviceCaps(desktop_dc_, LOGPIXELSY)));
|
| frame->mutable_updated_region()->Clear();
|
| @@ -393,7 +393,7 @@ bool ScreenCapturerWinMagnifier::InitializeMagnifier() {
|
|
|
| void ScreenCapturerWinMagnifier::OnCaptured(void* data,
|
| const MAGIMAGEHEADER& header) {
|
| - DesktopFrame* current_frame = queue_.current_frame();
|
| + DesktopFrame* current_frame = queue_.current();
|
|
|
| // Verify the format.
|
| // TODO(jiayl): support capturing sources with pixel formats other than RGBA.
|
| @@ -427,13 +427,13 @@ void ScreenCapturerWinMagnifier::CreateCurrentFrameIfNecessary(
|
| // If the current buffer is from an older generation then allocate a new one.
|
| // Note that we can't reallocate other buffers at this point, since the caller
|
| // may still be reading from them.
|
| - if (!queue_.current_frame() || !queue_.current_frame()->size().equals(size)) {
|
| + if (!queue_.current() || !queue_.current()->size().equals(size)) {
|
| std::unique_ptr<DesktopFrame> frame =
|
| shared_memory_factory_
|
| ? SharedMemoryDesktopFrame::Create(size,
|
| shared_memory_factory_.get())
|
| : std::unique_ptr<DesktopFrame>(new BasicDesktopFrame(size));
|
| - queue_.ReplaceCurrentFrame(frame.release());
|
| + queue_.ReplaceCurrent(SharedDesktopFrame::Wrap(std::move(frame)));
|
| }
|
| }
|
|
|
|
|