2
* Copyright (C) 2013 Canonical Ltd
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
8
* http://www.apache.org/licenses/LICENSE-2.0
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
16
* Authored by: Jim Hodapp <jim.hodapp@canonical.com>
19
#include <utils/Singleton.h>
20
#include <gui/SurfaceTextureClient.h>
22
struct _SurfaceTextureClientHybris : public android::SurfaceTextureClient,
23
public android::Singleton<_SurfaceTextureClientHybris>
25
friend class android::Singleton<_SurfaceTextureClientHybris>;
27
_SurfaceTextureClientHybris();
28
_SurfaceTextureClientHybris(const _SurfaceTextureClientHybris &stch);
29
_SurfaceTextureClientHybris(const android::sp<android::ISurfaceTexture> &st);
30
~_SurfaceTextureClientHybris();
34
int dequeueBuffer(ANativeWindowBuffer** buffer, int* fenceFd);
35
int queueBuffer(ANativeWindowBuffer* buffer, int fenceFd);
36
void setISurfaceTexture(const android::sp<android::ISurfaceTexture>& surface_texture);
38
unsigned int refcount;
39
android::sp<android::SurfaceTexture> surface_texture;