blob: 3290cc73e684283a3e9a6dfd49caa00333cfe666 [file] [log] [blame]
Haoxiang Li95917b12019-11-15 11:29:05 -08001//
2// Copyright (C) 2019 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#pragma once
17
18#include <android/frameworks/automotive/display/1.0/ICarWindowService.h>
19#include <gui/ISurfaceComposer.h>
20#include <gui/IGraphicBufferProducer.h>
21#include <gui/Surface.h>
22#include <gui/SurfaceComposerClient.h>
23
24namespace android {
25namespace frameworks {
26namespace automotive {
27namespace display {
28namespace V1_0 {
29namespace implementation {
30
31using ::android::hardware::Return;
32using ::android::sp;
33using ::android::hardware::graphics::bufferqueue::V2_0::IGraphicBufferProducer;
34
35class CarWindowService : public ICarWindowService {
36public:
37 Return<sp<IGraphicBufferProducer>> getIGraphicBufferProducer() override;
38 Return<bool> showWindow() override;
39 Return<bool> hideWindow() override;
40
41private:
42 sp<android::Surface> mSurface;
43 sp<android::SurfaceComposerClient> mSurfaceComposerClient;
44 sp<android::SurfaceControl> mSurfaceControl;
45};
46} // namespace implementation
47} // namespace V1_0
48} // namespace display
49} // namespace automotive
50} // namespace frameworks
51} // namespace android
52