Chromium Code Reviews

Side by Side Diff: content/browser/android/browser_surface_texture_manager.h

Issue 1120873002: Re-land: content: Single process support for native GpuMemoryBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dm-browsertests-refactor
Patch Set: rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
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 "content/common/android/surface_texture_manager.h" 8 #include "content/common/android/surface_texture_manager.h"
9 9
10 #include "base/memory/singleton.h"
10 #include "content/common/android/surface_texture_peer.h" 11 #include "content/common/android/surface_texture_peer.h"
11 12
12 namespace content { 13 namespace content {
13 14
14 class BrowserSurfaceTextureManager : public SurfaceTextureManager, 15 class BrowserSurfaceTextureManager : public SurfaceTextureManager,
15 public SurfaceTexturePeer { 16 public SurfaceTexturePeer {
16 public: 17 public:
17 BrowserSurfaceTextureManager(); 18 // Returns the global BrowserSurfaceTextureManager.
18 ~BrowserSurfaceTextureManager() override; 19 static BrowserSurfaceTextureManager* GetInstance();
19 20
20 // Overridden from SurfaceTextureManager: 21 // Overridden from SurfaceTextureManager:
21 void RegisterSurfaceTexture(int surface_texture_id, 22 void RegisterSurfaceTexture(int surface_texture_id,
22 int client_id, 23 int client_id,
23 gfx::SurfaceTexture* surface_texture) override; 24 gfx::SurfaceTexture* surface_texture) override;
24 void UnregisterSurfaceTexture(int surface_texture_id, int client_id) override; 25 void UnregisterSurfaceTexture(int surface_texture_id, int client_id) override;
25 gfx::AcceleratedWidget AcquireNativeWidgetForSurfaceTexture( 26 gfx::AcceleratedWidget AcquireNativeWidgetForSurfaceTexture(
26 int surface_texture_id) override; 27 int surface_texture_id) override;
27 28
28 // Overridden from SurfaceTexturePeer: 29 // Overridden from SurfaceTexturePeer:
29 void EstablishSurfaceTexturePeer( 30 void EstablishSurfaceTexturePeer(
30 base::ProcessHandle render_process_handle, 31 base::ProcessHandle render_process_handle,
31 scoped_refptr<gfx::SurfaceTexture> surface_texture, 32 scoped_refptr<gfx::SurfaceTexture> surface_texture,
32 int render_frame_id, 33 int render_frame_id,
33 int player_id) override; 34 int player_id) override;
34 35
35 private: 36 private:
37 friend struct DefaultSingletonTraits<BrowserSurfaceTextureManager>;
38
39 BrowserSurfaceTextureManager();
40 ~BrowserSurfaceTextureManager() override;
41
36 DISALLOW_COPY_AND_ASSIGN(BrowserSurfaceTextureManager); 42 DISALLOW_COPY_AND_ASSIGN(BrowserSurfaceTextureManager);
37 }; 43 };
38 44
39 } // namespace content 45 } // namespace content
40 46
41 #endif // CONTENT_BROWSER_ANDROID_BROWSER_SURFACE_TEXTURE_MANAGER_H_ 47 #endif // CONTENT_BROWSER_ANDROID_BROWSER_SURFACE_TEXTURE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/android/browser_surface_texture_manager.cc » ('j') | content/browser/browser_main_loop.cc » ('J')

Powered by Google App Engine