blob: 5ca99f7bdf672af2fffdbf5ba1fffb3a79730e0e [file] [log] [blame]
Ramkumar Radhakrishnan8bb48d32013-12-30 23:11:27 -08001/*
2 * Copyright (C) 2010 The Android Open Source Project
3 * Copyright (C) 2012-2014, The Linux Foundation. All rights reserved.
4 *
5 * Not a Contribution, Apache license notifications and license are retained
6 * for attribution purposes only.
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21#ifndef HWC_VIRTUAL
22#define HWC_VIRTUAL
23
24#include <hwc_utils.h>
25
26namespace qhwc {
Ramkumar Radhakrishnan8bb48d32013-12-30 23:11:27 -080027
Manoj Kumar AVM9591a5e2014-08-21 22:50:21 -070028class HWCVirtualVDS {
Ramkumar Radhakrishnan8bb48d32013-12-30 23:11:27 -080029public:
Manoj Kumar AVM9591a5e2014-08-21 22:50:21 -070030 HWCVirtualVDS(){};
31 ~HWCVirtualVDS(){};
32 // Chooses composition type and configures pipe for each layer in virtual
33 // display list
34 int prepare(hwc_composer_device_1 *dev,
35 hwc_display_contents_1_t* list);
36 // Queues the buffer for each layer in virtual display list and call display
37 // commit.
38 int set(hwc_context_t *ctx, hwc_display_contents_1_t *list);
39 // instantiates mdpcomp, copybit and fbupdate objects and initialize those
40 // objects for virtual display during virtual display connect.
41 void init(hwc_context_t *ctx);
42 // Destroys mdpcomp, copybit and fbupdate objects and for virtual display
43 // during virtual display disconnect.
44 void destroy(hwc_context_t *ctx, size_t numDisplays,
45 hwc_display_contents_1_t** displays);
46 void pause(hwc_context_t* ctx, int dpy);
47 void resume(hwc_context_t* ctx, int dpy);
Tatenda Chipeperekwa06af9cb2014-08-26 14:51:05 -070048 // We can dump the frame buffer and WB
49 // output buffer by dynamically enabling
50 // dumping via a binder call:
51 // adb shell service call display.qservice 15 i32 3 i32 1
52 static bool sVDDumpEnabled;
53 static void dynamicDebug(bool enable) {sVDDumpEnabled = enable;};
Ramkumar Radhakrishnan8bb48d32013-12-30 23:11:27 -080054};
55
Ramkumar Radhakrishnan8bb48d32013-12-30 23:11:27 -080056}; //namespace
57#endif