| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef CONTENT_BROWSER_AURA_GPU_PROCESS_TRANSPORT_FACTORY_H_ | 5 #ifndef CONTENT_BROWSER_AURA_GPU_PROCESS_TRANSPORT_FACTORY_H_ |
| 6 #define CONTENT_BROWSER_AURA_GPU_PROCESS_TRANSPORT_FACTORY_H_ | 6 #define CONTENT_BROWSER_AURA_GPU_PROCESS_TRANSPORT_FACTORY_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/id_map.h" | 10 #include "base/id_map.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
| 15 #include "content/browser/aura/image_transport_factory.h" | 15 #include "content/browser/aura/image_transport_factory.h" |
| 16 #include "ui/compositor/compositor.h" | 16 #include "ui/compositor/compositor.h" |
| 17 | 17 |
| 18 namespace content { | 18 namespace content { |
| 19 class BrowserCompositorOutputSurface; | 19 class BrowserCompositorOutputSurface; |
| 20 class BrowserCompositorOutputSurfaceProxy; | 20 class BrowserCompositorOutputSurfaceProxy; |
| 21 class CompositorSwapClient; | 21 class CompositorSwapClient; |
| 22 class ContextProviderCommandBuffer; | 22 class ContextProviderCommandBuffer; |
| 23 class ReflectorImpl; | 23 class ReflectorImpl; |
| 24 class WebGraphicsContext3DCommandBufferImpl; | 24 class WebGraphicsContext3DCommandBufferImpl; |
| 25 class WebGraphicsContext3DSwapBuffersClient; | 25 class WebGraphicsContext3DSwapBuffersClient; |
| 26 | 26 |
| 27 class GpuProcessTransportFactory | 27 class GpuProcessTransportFactory : public ui::ContextFactory, |
| 28 : public ui::ContextFactory, | 28 public ImageTransportFactory { |
| 29 public ImageTransportFactory { | |
| 30 public: | 29 public: |
| 31 GpuProcessTransportFactory(); | 30 GpuProcessTransportFactory(); |
| 32 | 31 |
| 33 virtual ~GpuProcessTransportFactory(); | 32 virtual ~GpuProcessTransportFactory(); |
| 34 | 33 |
| 35 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> | 34 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> |
| 36 CreateOffscreenCommandBufferContext(); | 35 CreateOffscreenCommandBufferContext(); |
| 37 | 36 |
| 38 // ui::ContextFactory implementation. | 37 // ui::ContextFactory implementation. |
| 39 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( | 38 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface( |
| (...skipping 14 matching lines...) Expand all Loading... |
| 54 virtual ui::ContextFactory* AsContextFactory() OVERRIDE; | 53 virtual ui::ContextFactory* AsContextFactory() OVERRIDE; |
| 55 virtual gfx::GLSurfaceHandle CreateSharedSurfaceHandle() OVERRIDE; | 54 virtual gfx::GLSurfaceHandle CreateSharedSurfaceHandle() OVERRIDE; |
| 56 virtual void DestroySharedSurfaceHandle( | 55 virtual void DestroySharedSurfaceHandle( |
| 57 gfx::GLSurfaceHandle surface) OVERRIDE; | 56 gfx::GLSurfaceHandle surface) OVERRIDE; |
| 58 virtual scoped_refptr<ui::Texture> CreateTransportClient( | 57 virtual scoped_refptr<ui::Texture> CreateTransportClient( |
| 59 float device_scale_factor) OVERRIDE; | 58 float device_scale_factor) OVERRIDE; |
| 60 virtual scoped_refptr<ui::Texture> CreateOwnedTexture( | 59 virtual scoped_refptr<ui::Texture> CreateOwnedTexture( |
| 61 const gfx::Size& size, | 60 const gfx::Size& size, |
| 62 float device_scale_factor, | 61 float device_scale_factor, |
| 63 unsigned int texture_id) OVERRIDE; | 62 unsigned int texture_id) OVERRIDE; |
| 63 virtual scoped_ptr<SurfaceCapturer> CreateOutputSurfaceCapturer( |
| 64 ui::Compositor* compositor, |
| 65 SurfaceCapturer::Client* client) OVERRIDE; |
| 64 virtual GLHelper* GetGLHelper() OVERRIDE; | 66 virtual GLHelper* GetGLHelper() OVERRIDE; |
| 65 virtual uint32 InsertSyncPoint() OVERRIDE; | 67 virtual uint32 InsertSyncPoint() OVERRIDE; |
| 66 virtual void WaitSyncPoint(uint32 sync_point) OVERRIDE; | 68 virtual void WaitSyncPoint(uint32 sync_point) OVERRIDE; |
| 67 virtual void AddObserver(ImageTransportFactoryObserver* observer) OVERRIDE; | 69 virtual void AddObserver(ImageTransportFactoryObserver* observer) OVERRIDE; |
| 68 virtual void RemoveObserver( | 70 virtual void RemoveObserver( |
| 69 ImageTransportFactoryObserver* observer) OVERRIDE; | 71 ImageTransportFactoryObserver* observer) OVERRIDE; |
| 70 | 72 |
| 71 void OnLostContext(ui::Compositor* compositor); | 73 void OnLostContext(ui::Compositor* compositor); |
| 72 | 74 |
| 73 private: | 75 private: |
| (...skipping 23 matching lines...) Expand all Loading... |
| 97 IDMap<BrowserCompositorOutputSurface> output_surface_map_; | 99 IDMap<BrowserCompositorOutputSurface> output_surface_map_; |
| 98 | 100 |
| 99 scoped_refptr<BrowserCompositorOutputSurfaceProxy> output_surface_proxy_; | 101 scoped_refptr<BrowserCompositorOutputSurfaceProxy> output_surface_proxy_; |
| 100 | 102 |
| 101 DISALLOW_COPY_AND_ASSIGN(GpuProcessTransportFactory); | 103 DISALLOW_COPY_AND_ASSIGN(GpuProcessTransportFactory); |
| 102 }; | 104 }; |
| 103 | 105 |
| 104 } // namespace content | 106 } // namespace content |
| 105 | 107 |
| 106 #endif // CONTENT_BROWSER_AURA_GPU_PROCESS_TRANSPORT_FACTORY_H_ | 108 #endif // CONTENT_BROWSER_AURA_GPU_PROCESS_TRANSPORT_FACTORY_H_ |
| OLD | NEW |