| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chromecast/graphics/cast_vsync_settings.h" | 5 #include "chromecast/graphics/cast_vsync_settings.h" |
| 6 | 6 |
| 7 namespace chromecast { | 7 namespace chromecast { |
| 8 namespace { | 8 namespace { |
| 9 base::LazyInstance<CastVSyncSettings> g_instance = LAZY_INSTANCE_INITIALIZER; | 9 base::LazyInstance<CastVSyncSettings>::DestructorAtExit g_instance = |
| 10 LAZY_INSTANCE_INITIALIZER; |
| 10 } // namespace | 11 } // namespace |
| 11 | 12 |
| 12 // static | 13 // static |
| 13 CastVSyncSettings* CastVSyncSettings::GetInstance() { | 14 CastVSyncSettings* CastVSyncSettings::GetInstance() { |
| 14 return g_instance.Pointer(); | 15 return g_instance.Pointer(); |
| 15 } | 16 } |
| 16 | 17 |
| 17 base::TimeDelta CastVSyncSettings::GetVSyncInterval() const { | 18 base::TimeDelta CastVSyncSettings::GetVSyncInterval() const { |
| 18 return interval_; | 19 return interval_; |
| 19 } | 20 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 34 observers_.RemoveObserver(observer); | 35 observers_.RemoveObserver(observer); |
| 35 } | 36 } |
| 36 | 37 |
| 37 // Default to 60fps until set otherwise | 38 // Default to 60fps until set otherwise |
| 38 CastVSyncSettings::CastVSyncSettings() | 39 CastVSyncSettings::CastVSyncSettings() |
| 39 : interval_(base::TimeDelta::FromMicroseconds(16666)) {} | 40 : interval_(base::TimeDelta::FromMicroseconds(16666)) {} |
| 40 | 41 |
| 41 CastVSyncSettings::~CastVSyncSettings() = default; | 42 CastVSyncSettings::~CastVSyncSettings() = default; |
| 42 | 43 |
| 43 } // namespace chromecast | 44 } // namespace chromecast |
| OLD | NEW |