| 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_IMAGE_TRANSPORT_FACTORY_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ |
| 6 #define CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "cc/surfaces/surface_id_allocator.h" |
| 12 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 13 #include "ui/gfx/native_widget_types.h" | 14 #include "ui/gfx/native_widget_types.h" |
| 14 | 15 |
| 16 namespace cc { |
| 17 class SurfaceManager; |
| 18 } |
| 19 |
| 15 namespace gfx { | 20 namespace gfx { |
| 16 class Size; | 21 class Size; |
| 17 } | 22 } |
| 18 | 23 |
| 19 namespace ui { | 24 namespace ui { |
| 20 class ContextFactory; | 25 class ContextFactory; |
| 21 class Texture; | 26 class Texture; |
| 22 } | 27 } |
| 23 | 28 |
| 24 namespace blink { | 29 namespace blink { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // Terminates the global transport factory. | 65 // Terminates the global transport factory. |
| 61 static void Terminate(); | 66 static void Terminate(); |
| 62 | 67 |
| 63 // Gets the factory instance. | 68 // Gets the factory instance. |
| 64 static ImageTransportFactory* GetInstance(); | 69 static ImageTransportFactory* GetInstance(); |
| 65 | 70 |
| 66 // Gets the image transport factory as a context factory for the compositor. | 71 // Gets the image transport factory as a context factory for the compositor. |
| 67 virtual ui::ContextFactory* GetContextFactory() = 0; | 72 virtual ui::ContextFactory* GetContextFactory() = 0; |
| 68 | 73 |
| 69 virtual gfx::GLSurfaceHandle GetSharedSurfaceHandle() = 0; | 74 virtual gfx::GLSurfaceHandle GetSharedSurfaceHandle() = 0; |
| 75 virtual scoped_ptr<cc::SurfaceIdAllocator> CreateSurfaceIdAllocator() = 0; |
| 76 virtual cc::SurfaceManager* GetSurfaceManager() = 0; |
| 70 | 77 |
| 71 // Gets a GLHelper instance, associated with the shared context. This | 78 // Gets a GLHelper instance, associated with the shared context. This |
| 72 // GLHelper will get destroyed whenever the shared context is lost | 79 // GLHelper will get destroyed whenever the shared context is lost |
| 73 // (ImageTransportFactoryObserver::OnLostResources is called). | 80 // (ImageTransportFactoryObserver::OnLostResources is called). |
| 74 virtual GLHelper* GetGLHelper() = 0; | 81 virtual GLHelper* GetGLHelper() = 0; |
| 75 | 82 |
| 76 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; | 83 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; |
| 77 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; | 84 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; |
| 78 | 85 |
| 79 #if defined(OS_MACOSX) | 86 #if defined(OS_MACOSX) |
| 80 virtual void OnSurfaceDisplayed(int surface_id) = 0; | 87 virtual void OnSurfaceDisplayed(int surface_id) = 0; |
| 81 #endif | 88 #endif |
| 82 }; | 89 }; |
| 83 | 90 |
| 84 } // namespace content | 91 } // namespace content |
| 85 | 92 |
| 86 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ | 93 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ |
| OLD | NEW |