Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(599)

Unified Diff: webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h

Issue 1347793005: Replace Atomic32 with webrtc/base/atomicops.h. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: fix typo Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h
diff --git a/webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h b/webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h
index fe6f01beb9a4373a6499fa21f7690cafda0c6bf3..bf276eb5aa17b89adb94e3ca5729c2e025a9b110 100644
--- a/webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h
+++ b/webrtc/modules/desktop_capture/mac/desktop_configuration_monitor.h
@@ -15,9 +15,9 @@
#include <set>
+#include "webrtc/base/atomicops.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/desktop_capture/mac/desktop_configuration.h"
-#include "webrtc/system_wrappers/interface/atomic32.h"
namespace webrtc {
@@ -38,9 +38,9 @@ class DesktopConfigurationMonitor {
return desktop_configuration_;
}
- void AddRef() { ++ref_count_; }
+ void AddRef() { rtc::AtomicOps::Increment(&ref_count_); }
void Release() {
- if (--ref_count_ == 0)
+ if (rtc::AtomicOps::Decrement(&ref_count_) == 0)
delete this;
}
@@ -53,7 +53,7 @@ class DesktopConfigurationMonitor {
void DisplaysReconfigured(CGDirectDisplayID display,
CGDisplayChangeSummaryFlags flags);
- Atomic32 ref_count_;
+ volatile int ref_count_;
std::set<CGDirectDisplayID> reconfiguring_displays_;
MacDesktopConfiguration desktop_configuration_;
rtc::scoped_ptr<EventWrapper> display_configuration_capture_event_;

Powered by Google App Engine
This is Rietveld 408576698