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" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 // Terminates the global transport factory. | 66 // Terminates the global transport factory. |
67 static void Terminate(); | 67 static void Terminate(); |
68 | 68 |
69 // Gets the factory instance. | 69 // Gets the factory instance. |
70 static ImageTransportFactory* GetInstance(); | 70 static ImageTransportFactory* GetInstance(); |
71 | 71 |
72 // Gets the image transport factory as a context factory for the compositor. | 72 // Gets the image transport factory as a context factory for the compositor. |
73 virtual ui::ContextFactory* GetContextFactory() = 0; | 73 virtual ui::ContextFactory* GetContextFactory() = 0; |
74 | 74 |
75 virtual gfx::GLSurfaceHandle GetSharedSurfaceHandle() = 0; | |
76 virtual cc::SurfaceManager* GetSurfaceManager() = 0; | 75 virtual cc::SurfaceManager* GetSurfaceManager() = 0; |
77 | 76 |
78 // Gets a GLHelper instance, associated with the shared context. This | 77 // Gets a GLHelper instance, associated with the shared context. This |
79 // GLHelper will get destroyed whenever the shared context is lost | 78 // GLHelper will get destroyed whenever the shared context is lost |
80 // (ImageTransportFactoryObserver::OnLostResources is called). | 79 // (ImageTransportFactoryObserver::OnLostResources is called). |
81 virtual GLHelper* GetGLHelper() = 0; | 80 virtual GLHelper* GetGLHelper() = 0; |
82 | 81 |
83 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; | 82 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; |
84 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; | 83 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; |
85 | 84 |
(...skipping 10 matching lines...) Expand all Loading... |
96 // Used by GpuProcessHostUIShim to determine if a frame should not be | 95 // Used by GpuProcessHostUIShim to determine if a frame should not be |
97 // displayed because it is targetted to an NSView that has been disconnected. | 96 // displayed because it is targetted to an NSView that has been disconnected. |
98 virtual bool SurfaceShouldNotShowFramesAfterSuspendForRecycle( | 97 virtual bool SurfaceShouldNotShowFramesAfterSuspendForRecycle( |
99 int surface_id) const = 0; | 98 int surface_id) const = 0; |
100 #endif | 99 #endif |
101 }; | 100 }; |
102 | 101 |
103 } // namespace content | 102 } // namespace content |
104 | 103 |
105 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ | 104 #endif // CONTENT_BROWSER_COMPOSITOR_IMAGE_TRANSPORT_FACTORY_H_ |
OLD | NEW |