Chromium Code Reviews| Index: ui/gl/android/surface_texture_tracker.cc |
| diff --git a/ui/gl/android/surface_texture_tracker.cc b/ui/gl/android/surface_texture_tracker.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a5dd08588336395655f95572b79a19ca7edf12e2 |
| --- /dev/null |
| +++ b/ui/gl/android/surface_texture_tracker.cc |
| @@ -0,0 +1,24 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ui/gl/android/surface_texture_tracker.h" |
| + |
| +namespace gfx { |
| +namespace { |
| +SurfaceTextureTracker* g_instance = NULL; |
|
epennerAtGoogle
2014/03/12 00:45:06
Same on this one. Can you use LazyInstance or comm
reveman
2014/03/12 16:07:06
Same answer.
|
| +} // namespace |
| + |
| +// static |
| +SurfaceTextureTracker* SurfaceTextureTracker::GetInstance() { |
|
epennerAtGoogle
2014/03/12 00:45:06
This is a lot better than an 'extern' but not _hug
reveman
2014/03/12 16:07:06
I'd like to get this working with out-of-proc GPU
epennerAtGoogle
2014/03/12 19:46:28
If sievers@ is okay with it then no worries here.
|
| + DCHECK(g_instance); |
| + return g_instance; |
| +} |
| + |
| +// static |
| +void SurfaceTextureTracker::InitInstance(SurfaceTextureTracker* tracker) { |
| + DCHECK(!g_instance || !tracker); |
| + g_instance = tracker; |
| +} |
| + |
| +} // namespace gfx |