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 #ifndef CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 }; | 40 }; |
41 | 41 |
42 // This class provides the interface for creating the support for the | 42 // This class provides the interface for creating the support for the |
43 // cross-process image transport, both for creating the shared surface handle | 43 // cross-process image transport, both for creating the shared surface handle |
44 // (destination surface for the GPU process) and the transport client (logic for | 44 // (destination surface for the GPU process) and the transport client (logic for |
45 // using that surface as a texture). The factory is a process-wide singleton. | 45 // using that surface as a texture). The factory is a process-wide singleton. |
46 // As this is intimately linked to the type of 3D context we use (in-process or | 46 // As this is intimately linked to the type of 3D context we use (in-process or |
47 // command-buffer), implementations of this also implement ui::ContextFactory. | 47 // command-buffer), implementations of this also implement ui::ContextFactory. |
48 class ImageTransportFactory { | 48 class ImageTransportFactory { |
49 public: | 49 public: |
50 virtual ~ImageTransportFactory() { } | 50 virtual ~ImageTransportFactory() {} |
51 | 51 |
52 // Initialize the global transport factory. | 52 // Initialize the global transport factory. |
53 static void Initialize(); | 53 static void Initialize(); |
54 | 54 |
55 // Terminates the global transport factory. | 55 // Terminates the global transport factory. |
56 static void Terminate(); | 56 static void Terminate(); |
57 | 57 |
58 // Gets the factory instance. | 58 // Gets the factory instance. |
59 static ImageTransportFactory* GetInstance(); | 59 static ImageTransportFactory* GetInstance(); |
60 | 60 |
(...skipping 20 matching lines...) Expand all Loading... |
81 virtual content::GLHelper* GetGLHelper() = 0; | 81 virtual content::GLHelper* GetGLHelper() = 0; |
82 | 82 |
83 // Inserts a SyncPoint into the shared context. | 83 // Inserts a SyncPoint into the shared context. |
84 virtual uint32 InsertSyncPoint() = 0; | 84 virtual uint32 InsertSyncPoint() = 0; |
85 | 85 |
86 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; | 86 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; |
87 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; | 87 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; |
88 }; | 88 }; |
89 | 89 |
90 #endif // CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_H_ | 90 #endif // CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_H_ |
OLD | NEW |