OLD | NEW |
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 Loading... |
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 |
OLD | NEW |