| 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 #ifndef CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ |
| 6 #define CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_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" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 // ImageTransportFactory implementation. | 62 // ImageTransportFactory implementation. |
| 63 ui::ContextFactory* GetContextFactory() override; | 63 ui::ContextFactory* GetContextFactory() override; |
| 64 gfx::GLSurfaceHandle GetSharedSurfaceHandle() override; | 64 gfx::GLSurfaceHandle GetSharedSurfaceHandle() override; |
| 65 cc::SurfaceManager* GetSurfaceManager() override; | 65 cc::SurfaceManager* GetSurfaceManager() override; |
| 66 GLHelper* GetGLHelper() override; | 66 GLHelper* GetGLHelper() override; |
| 67 void AddObserver(ImageTransportFactoryObserver* observer) override; | 67 void AddObserver(ImageTransportFactoryObserver* observer) override; |
| 68 void RemoveObserver(ImageTransportFactoryObserver* observer) override; | 68 void RemoveObserver(ImageTransportFactoryObserver* observer) override; |
| 69 #if defined(OS_MACOSX) | 69 #if defined(OS_MACOSX) |
| 70 void OnSurfaceDisplayed(int surface_id) override; | 70 void OnSurfaceDisplayed(int surface_id) override; |
| 71 void OnCompositorRecycled(ui::Compositor* compositor) override; | 71 void SetCompositorSuspendedForRecycle(ui::Compositor* compositor, |
| 72 bool SurfaceShouldNotShowFramesAfterRecycle(int surface_id) const override; | 72 bool suspended) override; |
| 73 bool SurfaceShouldNotShowFramesAfterSuspendForRecycle( |
| 74 int surface_id) const override; |
| 73 #endif | 75 #endif |
| 74 | 76 |
| 75 private: | 77 private: |
| 76 struct PerCompositorData; | 78 struct PerCompositorData; |
| 77 | 79 |
| 78 PerCompositorData* CreatePerCompositorData(ui::Compositor* compositor); | 80 PerCompositorData* CreatePerCompositorData(ui::Compositor* compositor); |
| 79 void EstablishedGpuChannel(base::WeakPtr<ui::Compositor> compositor, | 81 void EstablishedGpuChannel(base::WeakPtr<ui::Compositor> compositor, |
| 80 bool create_gpu_output_surface, | 82 bool create_gpu_output_surface, |
| 81 int num_attempts); | 83 int num_attempts); |
| 82 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateContextCommon( | 84 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> CreateContextCommon( |
| (...skipping 18 matching lines...) Expand all Loading... |
| 101 IDMap<BrowserCompositorOutputSurface> output_surface_map_; | 103 IDMap<BrowserCompositorOutputSurface> output_surface_map_; |
| 102 | 104 |
| 103 base::WeakPtrFactory<GpuProcessTransportFactory> callback_factory_; | 105 base::WeakPtrFactory<GpuProcessTransportFactory> callback_factory_; |
| 104 | 106 |
| 105 DISALLOW_COPY_AND_ASSIGN(GpuProcessTransportFactory); | 107 DISALLOW_COPY_AND_ASSIGN(GpuProcessTransportFactory); |
| 106 }; | 108 }; |
| 107 | 109 |
| 108 } // namespace content | 110 } // namespace content |
| 109 | 111 |
| 110 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ | 112 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_PROCESS_TRANSPORT_FACTORY_H_ |
| OLD | NEW |