summaryrefslogtreecommitdiff
path: root/chromium/content/common/android/surface_texture_peer.h
blob: 0afe3efcf53107d757b2ba2c75f86949ffffa51e (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
38
// 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/macros.h"
#include "base/process/process.h"
#include "ui/gl/android/surface_texture.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::SurfaceTexture> surface_texture,
      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_