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

Side by Side Diff: ui/accelerated_widget_mac/display_link_mac.cc

Issue 1551943002: Rewrite most of the scopers in //base/mac to use ScopedTypeRef or ScopedGeneric. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix iOS Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/accelerated_widget_mac/display_link_mac.h" 5 #include "ui/accelerated_widget_mac/display_link_mac.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/trace_event/trace_event.h" 11 #include "base/trace_event/trace_event.h"
12 12
13 namespace base { 13 namespace base {
14 14
15 template<> 15 template<>
16 struct ScopedTypeRefTraits<CVDisplayLinkRef> { 16 struct ScopedTypeRefTraits<CVDisplayLinkRef> {
17 static CVDisplayLinkRef InvalidValue() { return nullptr; } 17 static CVDisplayLinkRef InvalidValue() { return nullptr; }
18 static void Retain(CVDisplayLinkRef object) { 18 static CVDisplayLinkRef Retain(CVDisplayLinkRef object) {
19 CVDisplayLinkRetain(object); 19 return CVDisplayLinkRetain(object);
20 } 20 }
21 static void Release(CVDisplayLinkRef object) { 21 static void Release(CVDisplayLinkRef object) {
22 CVDisplayLinkRelease(object); 22 CVDisplayLinkRelease(object);
23 } 23 }
24 }; 24 };
25 25
26 } // namespace base 26 } // namespace base
27 27
28 namespace ui { 28 namespace ui {
29 29
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 DisplayLinkMac* display_link_mac = found->second; 189 DisplayLinkMac* display_link_mac = found->second;
190 display_link_mac->timebase_and_interval_valid_ = false; 190 display_link_mac->timebase_and_interval_valid_ = false;
191 } 191 }
192 192
193 // static 193 // static
194 base::LazyInstance<DisplayLinkMac::DisplayMap> 194 base::LazyInstance<DisplayLinkMac::DisplayMap>
195 DisplayLinkMac::display_map_ = LAZY_INSTANCE_INITIALIZER; 195 DisplayLinkMac::display_map_ = LAZY_INSTANCE_INITIALIZER;
196 196
197 } // ui 197 } // ui
198 198
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698