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

Side by Side Diff: chromecast/graphics/cast_vsync_settings.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 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 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
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
OLDNEW
« no previous file with comments | « chromecast/graphics/cast_vsync_settings.h ('k') | chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698