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_AURA_IMAGE_TRANSPORT_FACTORY_H_ | 5 #ifndef CONTENT_BROWSER_AURA_IMAGE_TRANSPORT_FACTORY_H_ |
6 #define CONTENT_BROWSER_AURA_IMAGE_TRANSPORT_FACTORY_H_ | 6 #define CONTENT_BROWSER_AURA_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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 | 60 |
61 // Terminates the global transport factory. | 61 // Terminates the global transport factory. |
62 static void Terminate(); | 62 static void Terminate(); |
63 | 63 |
64 // Gets the factory instance. | 64 // Gets the factory instance. |
65 static ImageTransportFactory* GetInstance(); | 65 static ImageTransportFactory* GetInstance(); |
66 | 66 |
67 // Gets the image transport factory as a context factory for the compositor. | 67 // Gets the image transport factory as a context factory for the compositor. |
68 virtual ui::ContextFactory* AsContextFactory() = 0; | 68 virtual ui::ContextFactory* AsContextFactory() = 0; |
69 | 69 |
70 // Creates a shared surface handle. | 70 // Creates a shared surface handle. |
danakj
2013/12/16 22:57:57
Update the comment please. (Why do we have useless
| |
71 // Note: the handle may get lost at any time, a state that an | 71 // Note: the handle may get lost at any time, a state that an |
72 // ImageTransportFactoryObserver gets notified of. | 72 // ImageTransportFactoryObserver gets notified of. |
73 virtual gfx::GLSurfaceHandle CreateSharedSurfaceHandle() = 0; | 73 virtual gfx::GLSurfaceHandle GetSharedSurfaceHandle() = 0; |
74 | |
75 // Destroys a shared surface handle. | |
76 virtual void DestroySharedSurfaceHandle(gfx::GLSurfaceHandle surface) = 0; | |
77 | 74 |
78 // Creates a transport texture for a given scale factor. | 75 // Creates a transport texture for a given scale factor. |
79 virtual scoped_refptr<ui::Texture> CreateTransportClient( | 76 virtual scoped_refptr<ui::Texture> CreateTransportClient( |
80 float device_scale_factor) = 0; | 77 float device_scale_factor) = 0; |
81 | 78 |
82 // Variant of CreateTransportClient() that deletes the texture on the GPU when | 79 // Variant of CreateTransportClient() that deletes the texture on the GPU when |
83 // the returned value is deleted. | 80 // the returned value is deleted. |
84 virtual scoped_refptr<ui::Texture> CreateOwnedTexture( | 81 virtual scoped_refptr<ui::Texture> CreateOwnedTexture( |
85 const gfx::Size& size, | 82 const gfx::Size& size, |
86 float device_scale_factor, | 83 float device_scale_factor, |
(...skipping 10 matching lines...) Expand all Loading... | |
97 // Blocks waiting for the sync point on the service side. | 94 // Blocks waiting for the sync point on the service side. |
98 virtual void WaitSyncPoint(uint32 sync_point) = 0; | 95 virtual void WaitSyncPoint(uint32 sync_point) = 0; |
99 | 96 |
100 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; | 97 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; |
101 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; | 98 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; |
102 }; | 99 }; |
103 | 100 |
104 } // namespace content | 101 } // namespace content |
105 | 102 |
106 #endif // CONTENT_BROWSER_AURA_IMAGE_TRANSPORT_FACTORY_H_ | 103 #endif // CONTENT_BROWSER_AURA_IMAGE_TRANSPORT_FACTORY_H_ |
OLD | NEW |