| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/compositor/image_transport_factory.h" | 5 #include "content/browser/compositor/image_transport_factory.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "content/browser/compositor/gpu_process_transport_factory.h" | 8 #include "content/browser/compositor/gpu_process_transport_factory.h" |
| 9 #include "ui/compositor/compositor.h" | 9 #include "ui/compositor/compositor.h" |
| 10 #include "ui/compositor/compositor_switches.h" | 10 #include "ui/compositor/compositor_switches.h" |
| 11 #include "ui/gl/gl_implementation.h" | 11 #include "ui/gl/gl_implementation.h" |
| 12 #include <iostream> |
| 12 | 13 |
| 13 namespace content { | 14 namespace content { |
| 14 | 15 |
| 15 namespace { | 16 namespace { |
| 16 ImageTransportFactory* g_factory = NULL; | 17 ImageTransportFactory* g_factory = NULL; |
| 17 bool g_initialized_for_unit_tests = false; | 18 bool g_initialized_for_unit_tests = false; |
| 18 static gl::DisableNullDrawGLBindings* g_disable_null_draw = NULL; | 19 static gl::DisableNullDrawGLBindings* g_disable_null_draw = NULL; |
| 19 | 20 |
| 20 void SetFactory(ImageTransportFactory* factory) { | 21 void SetFactory(ImageTransportFactory* factory) { |
| 21 g_factory = factory; | 22 g_factory = factory; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 45 SetFactory(factory.release()); | 46 SetFactory(factory.release()); |
| 46 } | 47 } |
| 47 | 48 |
| 48 // static | 49 // static |
| 49 void ImageTransportFactory::Terminate() { | 50 void ImageTransportFactory::Terminate() { |
| 50 delete g_factory; | 51 delete g_factory; |
| 51 g_factory = NULL; | 52 g_factory = NULL; |
| 52 delete g_disable_null_draw; | 53 delete g_disable_null_draw; |
| 53 g_disable_null_draw = NULL; | 54 g_disable_null_draw = NULL; |
| 54 g_initialized_for_unit_tests = false; | 55 g_initialized_for_unit_tests = false; |
| 56 std::cout << "Hello I'm terminating " << std::endl; |
| 55 } | 57 } |
| 56 | 58 |
| 57 // static | 59 // static |
| 58 ImageTransportFactory* ImageTransportFactory::GetInstance() { | 60 ImageTransportFactory* ImageTransportFactory::GetInstance() { |
| 59 return g_factory; | 61 return g_factory; |
| 60 } | 62 } |
| 61 | 63 |
| 62 } // namespace content | 64 } // namespace content |
| OLD | NEW |