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

Unified Diff: ui/gfx/ozone/surface_factory_ozone.cc

Issue 291473002: ozone: Initialize a subsystem only if necessary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-r270817 Created 6 years, 7 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
« no previous file with comments | « ui/gfx/ozone/surface_factory_ozone.h ('k') | ui/gl/gl_implementation_ozone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/ozone/surface_factory_ozone.cc
diff --git a/ui/gfx/ozone/surface_factory_ozone.cc b/ui/gfx/ozone/surface_factory_ozone.cc
index f17c13dcf5a05f4293707480be90c36c8a45a1db..a1dbdd121dfd7cf284d9f372c1eac8eddfd3826c 100644
--- a/ui/gfx/ozone/surface_factory_ozone.cc
+++ b/ui/gfx/ozone/surface_factory_ozone.cc
@@ -16,9 +16,13 @@ namespace gfx {
SurfaceFactoryOzone* SurfaceFactoryOzone::impl_ = NULL;
SurfaceFactoryOzone::SurfaceFactoryOzone() {
+ CHECK(!impl_) << "There should only be a single SurfaceFactoryOzone.";
+ impl_ = this;
}
SurfaceFactoryOzone::~SurfaceFactoryOzone() {
+ CHECK_EQ(impl_, this);
+ impl_ = NULL;
}
SurfaceFactoryOzone* SurfaceFactoryOzone::GetInstance() {
@@ -26,10 +30,6 @@ SurfaceFactoryOzone* SurfaceFactoryOzone::GetInstance() {
return impl_;
}
-void SurfaceFactoryOzone::SetInstance(SurfaceFactoryOzone* impl) {
- impl_ = impl;
-}
-
intptr_t SurfaceFactoryOzone::GetNativeDisplay() {
return 0;
}
« no previous file with comments | « ui/gfx/ozone/surface_factory_ozone.h ('k') | ui/gl/gl_implementation_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698