summaryrefslogtreecommitdiffstats
path: root/content/common/android/surface_texture_peer.h
blob: 9be032dbaba76ea9eee7785b61e63805606b2eaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_COMMON_ANDROID_SURFACE_TEXTURE_PEER_H_
#define CONTENT_COMMON_ANDROID_SURFACE_TEXTURE_PEER_H_

#include "base/process/process.h"
#include "ui/gl/android/surface_texture_bridge.h"

namespace content {

class SurfaceTexturePeer {
 public:
  static SurfaceTexturePeer* GetInstance();

  static void InitInstance(SurfaceTexturePeer* instance);

  // Establish the producer end for the given surface texture in another
  // process.
  virtual void EstablishSurfaceTexturePeer(
      base::ProcessHandle pid,
      scoped_refptr<gfx::SurfaceTextureBridge> surface_texture_bridge,
      int primary_id,
      int secondary_id) = 0;

 protected:
  SurfaceTexturePeer();
  virtual ~SurfaceTexturePeer();

 private:
  DISALLOW_COPY_AND_ASSIGN(SurfaceTexturePeer);
};

}  // namespace content

#endif  // CONTENT_COMMON_ANDROID_SURFACE_TEXTURE_PEER_H_