blob: f321795763a1e5c1b13eaefce190e5df81e8fa47 [file] [log] [blame]
Jesse Hall99c7dbb2013-03-14 14:29:29 -07001/*
2 * Copyright 2013 The Android Open Source Project
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17#ifndef ANDROID_SF_VIRTUAL_DISPLAY_SURFACE_H
18#define ANDROID_SF_VIRTUAL_DISPLAY_SURFACE_H
19
Jesse Hall99c7dbb2013-03-14 14:29:29 -070020#include "DisplaySurface.h"
21
22// ---------------------------------------------------------------------------
23namespace android {
24// ---------------------------------------------------------------------------
25
26class HWComposer;
27
Jesse Halle737c112013-05-07 11:58:47 -070028/* This DisplaySurface implementation is a stub used for developing HWC
29 * virtual display support. It is currently just a passthrough.
Jesse Hall80e0a392013-03-15 12:32:10 -070030 */
Jesse Hall99c7dbb2013-03-14 14:29:29 -070031class VirtualDisplaySurface : public DisplaySurface {
32public:
Jesse Hallffe1f192013-03-22 15:13:48 -070033 VirtualDisplaySurface(HWComposer& hwc, int32_t dispId,
Jesse Hall99c7dbb2013-03-14 14:29:29 -070034 const sp<IGraphicBufferProducer>& sink,
35 const String8& name);
36
37 virtual sp<IGraphicBufferProducer> getIGraphicBufferProducer() const;
38
39 virtual status_t compositionComplete();
40 virtual status_t advanceFrame();
Jesse Hall851cfe82013-03-20 13:44:00 -070041 virtual void onFrameCommitted();
Jesse Hall99c7dbb2013-03-14 14:29:29 -070042 virtual void dump(String8& result) const;
43
44private:
45 virtual ~VirtualDisplaySurface();
46
Jesse Halle737c112013-05-07 11:58:47 -070047 sp<IGraphicBufferProducer> mSink;
Jesse Hall99c7dbb2013-03-14 14:29:29 -070048};
49
50// ---------------------------------------------------------------------------
51} // namespace android
52// ---------------------------------------------------------------------------
53
54#endif // ANDROID_SF_VIRTUAL_DISPLAY_SURFACE_H
55