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_ANDROID_BROWSER_SURFACE_TEXTURE_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_BROWSER_SURFACE_TEXTURE_MANAGER_H_ |
6 #define CONTENT_BROWSER_ANDROID_BROWSER_SURFACE_TEXTURE_MANAGER_H_ | 6 #define CONTENT_BROWSER_ANDROID_BROWSER_SURFACE_TEXTURE_MANAGER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "gpu/ipc/common/android/surface_texture_manager.h" | 11 #include "gpu/ipc/common/android/surface_texture_manager.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 class CONTENT_EXPORT BrowserSurfaceTextureManager | 15 class CONTENT_EXPORT BrowserSurfaceTextureManager |
16 : public gpu::SurfaceTextureManager { | 16 : public gpu::SurfaceTextureManager { |
17 public: | 17 public: |
18 static BrowserSurfaceTextureManager* GetInstance(); | 18 static BrowserSurfaceTextureManager* GetInstance(); |
19 | 19 |
20 // Overridden from SurfaceTextureManager: | 20 // Overridden from SurfaceTextureManager: |
21 void RegisterSurfaceTexture(int surface_texture_id, | 21 void RegisterSurfaceTexture(int surface_texture_id, |
22 int client_id, | 22 int client_id, |
23 gfx::SurfaceTexture* surface_texture) override; | 23 gl::SurfaceTexture* surface_texture) override; |
24 void UnregisterSurfaceTexture(int surface_texture_id, int client_id) override; | 24 void UnregisterSurfaceTexture(int surface_texture_id, int client_id) override; |
25 gfx::AcceleratedWidget AcquireNativeWidgetForSurfaceTexture( | 25 gfx::AcceleratedWidget AcquireNativeWidgetForSurfaceTexture( |
26 int surface_texture_id) override; | 26 int surface_texture_id) override; |
27 | 27 |
28 private: | 28 private: |
29 friend struct base::DefaultSingletonTraits<BrowserSurfaceTextureManager>; | 29 friend struct base::DefaultSingletonTraits<BrowserSurfaceTextureManager>; |
30 | 30 |
31 BrowserSurfaceTextureManager(); | 31 BrowserSurfaceTextureManager(); |
32 ~BrowserSurfaceTextureManager() override; | 32 ~BrowserSurfaceTextureManager() override; |
33 | 33 |
34 DISALLOW_COPY_AND_ASSIGN(BrowserSurfaceTextureManager); | 34 DISALLOW_COPY_AND_ASSIGN(BrowserSurfaceTextureManager); |
35 }; | 35 }; |
36 | 36 |
37 } // namespace content | 37 } // namespace content |
38 | 38 |
39 #endif // CONTENT_BROWSER_ANDROID_BROWSER_SURFACE_TEXTURE_MANAGER_H_ | 39 #endif // CONTENT_BROWSER_ANDROID_BROWSER_SURFACE_TEXTURE_MANAGER_H_ |
OLD | NEW |