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_COMMON_ANDROID_SURFACE_TEXTURE_PEER_H_ | 5 #ifndef GPU_IPC_COMMON_SURFACE_TEXTURE_PEER_H_ |
6 #define CONTENT_COMMON_ANDROID_SURFACE_TEXTURE_PEER_H_ | 6 #define GPU_IPC_COMMON_SURFACE_TEXTURE_PEER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/process/process.h" | 9 #include "base/process/process.h" |
10 #include "ui/gl/android/surface_texture.h" | 10 #include "ui/gl/android/surface_texture.h" |
11 | 11 |
12 namespace content { | 12 namespace gpu { |
13 | 13 |
14 class SurfaceTexturePeer { | 14 class SurfaceTexturePeer { |
15 public: | 15 public: |
16 static SurfaceTexturePeer* GetInstance(); | 16 static SurfaceTexturePeer* GetInstance(); |
17 | 17 |
18 static void InitInstance(SurfaceTexturePeer* instance); | 18 static void InitInstance(SurfaceTexturePeer* instance); |
19 | 19 |
20 // Establish the producer end for the given surface texture in another | 20 // Establish the producer end for the given surface texture in another |
21 // process. | 21 // process. |
22 virtual void EstablishSurfaceTexturePeer( | 22 virtual void EstablishSurfaceTexturePeer( |
23 base::ProcessHandle pid, | 23 base::ProcessHandle pid, |
24 scoped_refptr<gfx::SurfaceTexture> surface_texture, | 24 scoped_refptr<gfx::SurfaceTexture> surface_texture, |
25 int primary_id, | 25 int primary_id, |
26 int secondary_id) = 0; | 26 int secondary_id) = 0; |
27 | 27 |
28 protected: | 28 protected: |
29 SurfaceTexturePeer(); | 29 SurfaceTexturePeer(); |
30 virtual ~SurfaceTexturePeer(); | 30 virtual ~SurfaceTexturePeer(); |
31 | 31 |
32 private: | 32 private: |
33 DISALLOW_COPY_AND_ASSIGN(SurfaceTexturePeer); | 33 DISALLOW_COPY_AND_ASSIGN(SurfaceTexturePeer); |
34 }; | 34 }; |
35 | 35 |
36 } // namespace content | 36 } // namespace gpu |
37 | 37 |
38 #endif // CONTENT_COMMON_ANDROID_SURFACE_TEXTURE_PEER_H_ | 38 #endif // GPU_IPC_COMMON_SURFACE_TEXTURE_PEER_H_ |
OLD | NEW |