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

Unified Diff: gpu/ipc/common/android/scoped_surface_request_conduit.cc

Issue 2285593002: Add ScopedSurfaceRequestManager (Closed)
Patch Set: Simplified manager interface. Renamed to Conduit. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: gpu/ipc/common/android/scoped_surface_request_conduit.cc
diff --git a/gpu/ipc/common/android/scoped_surface_request_conduit.cc b/gpu/ipc/common/android/scoped_surface_request_conduit.cc
new file mode 100644
index 0000000000000000000000000000000000000000..655eb0db216caaae82a59f505033c49b6c3e5908
--- /dev/null
+++ b/gpu/ipc/common/android/scoped_surface_request_conduit.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_conduit.h"
+
+#include "base/logging.h"
watk 2016/08/29 19:42:26 delete
tguilbert 2016/08/30 22:53:09 Needed for DCHECK.
+
+namespace gpu {
+namespace {
+
+ScopedSurfaceRequestConduit* g_instance = nullptr;
+
+} // namespace
+
+// static
+ScopedSurfaceRequestConduit* ScopedSurfaceRequestConduit::GetInstance() {
+ DCHECK(g_instance);
+ return g_instance;
+}
+
+// static
+void ScopedSurfaceRequestConduit::SetInstance(
+ ScopedSurfaceRequestConduit* instance) {
+ DCHECK(!g_instance || !instance);
+ g_instance = instance;
+}
+
+} // namespace gpu

Powered by Google App Engine
This is Rietveld 408576698