| Index: gpu/ipc/common/android/scoped_surface_request_manager.cc
|
| diff --git a/gpu/ipc/common/android/scoped_surface_request_manager.cc b/gpu/ipc/common/android/scoped_surface_request_manager.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..607c6c377f51d588f799b554e4a3ba3c7f145a02
|
| --- /dev/null
|
| +++ b/gpu/ipc/common/android/scoped_surface_request_manager.cc
|
| @@ -0,0 +1,29 @@
|
| +// Copyright 2016 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 "gpu/ipc/common/android/scoped_surface_request_manager.h"
|
| +
|
| +#include "base/logging.h"
|
| +
|
| +namespace gpu {
|
| +namespace {
|
| +
|
| +ScopedSurfaceRequestManager* g_instance = nullptr;
|
| +
|
| +} // namespace
|
| +
|
| +// static
|
| +ScopedSurfaceRequestManager* ScopedSurfaceRequestManager::GetInstance() {
|
| + DCHECK(g_instance);
|
| + return g_instance;
|
| +}
|
| +
|
| +// static
|
| +void ScopedSurfaceRequestManager::SetInstance(
|
| + ScopedSurfaceRequestManager* instance) {
|
| + DCHECK(!g_instance || !instance);
|
| + g_instance = instance;
|
| +}
|
| +
|
| +} // namespace gpu
|
|
|