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" |
| 11 #include "content/common/gpu/surface_capturer.h" |
11 #include "ui/gfx/native_widget_types.h" | 12 #include "ui/gfx/native_widget_types.h" |
12 | 13 |
13 namespace gfx { | 14 namespace gfx { |
14 class Size; | 15 class Size; |
15 } | 16 } |
16 | 17 |
17 namespace ui { | 18 namespace ui { |
| 19 class Compositor; |
18 class ContextFactory; | 20 class ContextFactory; |
19 class Texture; | 21 class Texture; |
20 } | 22 } |
21 | 23 |
22 namespace WebKit { | 24 namespace WebKit { |
23 class WebGraphicsContext3D; | 25 class WebGraphicsContext3D; |
24 } | 26 } |
25 | 27 |
26 namespace content { | 28 namespace content { |
27 class GLHelper; | 29 class GLHelper; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 virtual scoped_refptr<ui::Texture> CreateTransportClient( | 74 virtual scoped_refptr<ui::Texture> CreateTransportClient( |
73 float device_scale_factor) = 0; | 75 float device_scale_factor) = 0; |
74 | 76 |
75 // Variant of CreateTransportClient() that deletes the texture on the GPU when | 77 // Variant of CreateTransportClient() that deletes the texture on the GPU when |
76 // the returned value is deleted. | 78 // the returned value is deleted. |
77 virtual scoped_refptr<ui::Texture> CreateOwnedTexture( | 79 virtual scoped_refptr<ui::Texture> CreateOwnedTexture( |
78 const gfx::Size& size, | 80 const gfx::Size& size, |
79 float device_scale_factor, | 81 float device_scale_factor, |
80 unsigned int texture_id) = 0; | 82 unsigned int texture_id) = 0; |
81 | 83 |
| 84 // Creates a SurfaceCapturer that captures frames from the given compositor's |
| 85 // current output surface. |
| 86 virtual scoped_ptr<SurfaceCapturer> CreateOutputSurfaceCapturer( |
| 87 ui::Compositor* compositor, |
| 88 SurfaceCapturer::Client* client) = 0; |
| 89 |
82 // Gets a GLHelper instance, associated with the shared context. This | 90 // Gets a GLHelper instance, associated with the shared context. This |
83 // GLHelper will get destroyed whenever the shared context is lost | 91 // GLHelper will get destroyed whenever the shared context is lost |
84 // (ImageTransportFactoryObserver::OnLostResources is called). | 92 // (ImageTransportFactoryObserver::OnLostResources is called). |
85 virtual GLHelper* GetGLHelper() = 0; | 93 virtual GLHelper* GetGLHelper() = 0; |
86 | 94 |
87 // Inserts a SyncPoint into the shared context. | 95 // Inserts a SyncPoint into the shared context. |
88 virtual uint32 InsertSyncPoint() = 0; | 96 virtual uint32 InsertSyncPoint() = 0; |
89 | 97 |
90 // Blocks waiting for the sync point on the service side. | 98 // Blocks waiting for the sync point on the service side. |
91 virtual void WaitSyncPoint(uint32 sync_point) = 0; | 99 virtual void WaitSyncPoint(uint32 sync_point) = 0; |
92 | 100 |
93 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; | 101 virtual void AddObserver(ImageTransportFactoryObserver* observer) = 0; |
94 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; | 102 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) = 0; |
95 }; | 103 }; |
96 | 104 |
97 } // namespace content | 105 } // namespace content |
98 | 106 |
99 #endif // CONTENT_BROWSER_AURA_IMAGE_TRANSPORT_FACTORY_H_ | 107 #endif // CONTENT_BROWSER_AURA_IMAGE_TRANSPORT_FACTORY_H_ |
OLD | NEW |