Haoxiang Li | 95917b1 | 2019-11-15 11:29:05 -0800 | [diff] [blame] | 1 | // |
| 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 | |
| 24 | namespace android { |
| 25 | namespace frameworks { |
| 26 | namespace automotive { |
| 27 | namespace display { |
| 28 | namespace V1_0 { |
| 29 | namespace implementation { |
| 30 | |
| 31 | using ::android::hardware::Return; |
| 32 | using ::android::sp; |
| 33 | using ::android::hardware::graphics::bufferqueue::V2_0::IGraphicBufferProducer; |
| 34 | |
| 35 | class CarWindowService : public ICarWindowService { |
| 36 | public: |
| 37 | Return<sp<IGraphicBufferProducer>> getIGraphicBufferProducer() override; |
| 38 | Return<bool> showWindow() override; |
| 39 | Return<bool> hideWindow() override; |
| 40 | |
| 41 | private: |
| 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 | |