1 /* 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #include "modules/desktop_capture/win/display_configuration_monitor.h" 12 13 #include "modules/desktop_capture/win/screen_capture_utils.h" 14 15 namespace webrtc { 16 IsChanged()17bool DisplayConfigurationMonitor::IsChanged() { 18 DesktopRect rect = GetFullscreenRect(); 19 if (!initialized_) { 20 initialized_ = true; 21 rect_ = rect; 22 return false; 23 } 24 25 if (rect.equals(rect_)) { 26 return false; 27 } 28 29 rect_ = rect; 30 return true; 31 } 32 Reset()33void DisplayConfigurationMonitor::Reset() { 34 initialized_ = false; 35 } 36 37 } // namespace webrtc 38