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 17 matching lines...) Expand all Loading... |
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; | 37 using content::GpuChannelHostFactory; |
| 38 using content::GpuSurfaceTracker; |
38 using content::WebGraphicsContext3DCommandBufferImpl; | 39 using content::WebGraphicsContext3DCommandBufferImpl; |
39 using content::WebGraphicsContext3DSwapBuffersClient; | 40 using content::WebGraphicsContext3DSwapBuffersClient; |
40 | 41 |
41 namespace { | 42 namespace { |
42 | 43 |
43 ImageTransportFactory* g_factory; | 44 ImageTransportFactory* g_factory; |
44 | 45 |
45 class DefaultTransportFactory | 46 class DefaultTransportFactory |
46 : public ui::DefaultContextFactory, | 47 : public ui::DefaultContextFactory, |
47 public ImageTransportFactory { | 48 public ImageTransportFactory { |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 void ImageTransportFactory::Terminate() { | 506 void ImageTransportFactory::Terminate() { |
506 ui::ContextFactory::SetInstance(NULL); | 507 ui::ContextFactory::SetInstance(NULL); |
507 delete g_factory; | 508 delete g_factory; |
508 g_factory = NULL; | 509 g_factory = NULL; |
509 } | 510 } |
510 | 511 |
511 // static | 512 // static |
512 ImageTransportFactory* ImageTransportFactory::GetInstance() { | 513 ImageTransportFactory* ImageTransportFactory::GetInstance() { |
513 return g_factory; | 514 return g_factory; |
514 } | 515 } |
OLD | NEW |