summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorjamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-15 10:57:32 +0000
committerjamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-15 10:57:32 +0000
commit9def5f0915f919d529aa5f262b8b96953b3b9471 (patch)
tree3c84c3a2bb992bf35e4fdaa8e7fdf6d5bcf55b40 /remoting
parent6e3616ef121b4b81cc151754cb1563a845cc3a1d (diff)
downloadchromium_src-9def5f0915f919d529aa5f262b8b96953b3b9471.zip
chromium_src-9def5f0915f919d529aa5f262b8b96953b3b9471.tar.gz
chromium_src-9def5f0915f919d529aa5f262b8b96953b3b9471.tar.bz2
Extend invalid_rects_ lock to protect read as well as update.
BUG=79450 TEST= Review URL: http://codereview.chromium.org/6852022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81725 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/host/capturer_helper.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/remoting/host/capturer_helper.cc b/remoting/host/capturer_helper.cc
index c066d61..eba7c12 100644
--- a/remoting/host/capturer_helper.cc
+++ b/remoting/host/capturer_helper.cc
@@ -21,14 +21,12 @@ void CapturerHelper::ClearInvalidRects() {
}
void CapturerHelper::InvalidateRects(const InvalidRects& inval_rects) {
+ base::AutoLock auto_inval_rects_lock(inval_rects_lock_);
InvalidRects temp_rects;
std::set_union(inval_rects_.begin(), inval_rects_.end(),
inval_rects.begin(), inval_rects.end(),
std::inserter(temp_rects, temp_rects.begin()));
- {
- base::AutoLock auto_inval_rects_lock(inval_rects_lock_);
- inval_rects_.swap(temp_rects);
- }
+ inval_rects_.swap(temp_rects);
}
void CapturerHelper::InvalidateScreen(const gfx::Size& size) {