| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer_host/image_transport_factory.h" | 5 #include "content/browser/renderer_host/image_transport_factory.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "ui/compositor/test_web_graphics_context_3d.h" | 27 #include "ui/compositor/test_web_graphics_context_3d.h" |
| 28 #include "ui/gfx/native_widget_types.h" | 28 #include "ui/gfx/native_widget_types.h" |
| 29 #include "ui/gfx/size.h" | 29 #include "ui/gfx/size.h" |
| 30 | 30 |
| 31 #if defined(OS_WIN) | 31 #if defined(OS_WIN) |
| 32 #include "ui/surface/accelerated_surface_win.h" | 32 #include "ui/surface/accelerated_surface_win.h" |
| 33 #endif | 33 #endif |
| 34 | 34 |
| 35 using content::BrowserGpuChannelHostFactory; | 35 using content::BrowserGpuChannelHostFactory; |
| 36 using content::GLHelper; | 36 using content::GLHelper; |
| 37 using content::GpuChannelHostFactory; |
| 38 using content::WebGraphicsContext3DCommandBufferImpl; |
| 39 using content::WebGraphicsContext3DSwapBuffersClient; |
| 37 | 40 |
| 38 namespace { | 41 namespace { |
| 39 | 42 |
| 40 ImageTransportFactory* g_factory; | 43 ImageTransportFactory* g_factory; |
| 41 | 44 |
| 42 class DefaultTransportFactory | 45 class DefaultTransportFactory |
| 43 : public ui::DefaultContextFactory, | 46 : public ui::DefaultContextFactory, |
| 44 public ImageTransportFactory { | 47 public ImageTransportFactory { |
| 45 public: | 48 public: |
| 46 DefaultTransportFactory() { | 49 DefaultTransportFactory() { |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 void ImageTransportFactory::Terminate() { | 505 void ImageTransportFactory::Terminate() { |
| 503 ui::ContextFactory::SetInstance(NULL); | 506 ui::ContextFactory::SetInstance(NULL); |
| 504 delete g_factory; | 507 delete g_factory; |
| 505 g_factory = NULL; | 508 g_factory = NULL; |
| 506 } | 509 } |
| 507 | 510 |
| 508 // static | 511 // static |
| 509 ImageTransportFactory* ImageTransportFactory::GetInstance() { | 512 ImageTransportFactory* ImageTransportFactory::GetInstance() { |
| 510 return g_factory; | 513 return g_factory; |
| 511 } | 514 } |
| OLD | NEW |