| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 // Gets the image transport factory as a context factory for the compositor. | 62 // Gets the image transport factory as a context factory for the compositor. |
| 63 virtual ui::ContextFactory* AsContextFactory() = 0; | 63 virtual ui::ContextFactory* AsContextFactory() = 0; |
| 64 | 64 |
| 65 // Creates a shared surface handle. | 65 // Creates a shared surface handle. |
| 66 // Note: the handle may get lost at any time, a state that an | 66 // Note: the handle may get lost at any time, a state that an |
| 67 // ImageTransportFactoryObserver gets notified of. | 67 // ImageTransportFactoryObserver gets notified of. |
| 68 virtual gfx::GLSurfaceHandle CreateSharedSurfaceHandle() = 0; | 68 virtual gfx::GLSurfaceHandle CreateSharedSurfaceHandle() = 0; |
| 69 | 69 |
| 70 // Destroys a shared surface handle. | 70 // Destroys a shared surface handle. |
| 71 virtual void DestroySharedSurfaceHandle(gfx::GLSurfaceHandle surface) = 0; | 71 virtual void DestroySharedSurfaceHandle(gfx::GLSurfaceHandle surface, |
| 72 int surface_id) = 0; |
| 72 | 73 |
| 73 // Creates a transport texture for a given scale factor. | 74 // Creates a transport texture for a given scale factor. |
| 74 virtual scoped_refptr<ui::Texture> CreateTransportClient( | 75 virtual scoped_refptr<ui::Texture> CreateTransportClient( |
| 75 float device_scale_factor) = 0; | 76 float device_scale_factor) = 0; |
| 76 | 77 |
| 77 // Variant of CreateTransportClient() that deletes the texture on the GPU when | 78 // Variant of CreateTransportClient() that deletes the texture on the GPU when |
| 78 // the returned value is deleted. | 79 // the returned value is deleted. |
| 79 virtual scoped_refptr<ui::Texture> CreateOwnedTexture( | 80 virtual scoped_refptr<ui::Texture> CreateOwnedTexture( |
| 80 const gfx::Size& size, | 81 const gfx::Size& size, |
| 81 float device_scale_factor, | 82 float device_scale_factor, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 92 // Blocks waiting for the sync point on the service side. | 93 // Blocks waiting for the sync point on the service side. |
| 93 virtual void WaitSyncPoint(uint32 sync_point) = 0; | 94 virtual void WaitSyncPoint(uint32 sync_point) = 0; |
| 94 | 95 |
| 95 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; | 96 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; |
| 96 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; | 97 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; |
| 97 }; | 98 }; |
| 98 | 99 |
| 99 } // namespace content | 100 } // namespace content |
| 100 | 101 |
| 101 #endif // CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_H_ | 102 #endif // CONTENT_BROWSER_RENDERER_HOST_IMAGE_TRANSPORT_FACTORY_H_ |
| OLD | NEW |