16a6081a46a83da606cf21548879b37695adc7e1fAndy Qiu/* 2cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// Copyright (c) 2014 Intel Corporation 3cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// 4cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// Licensed under the Apache License, Version 2.0 (the "License"); 5cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// you may not use this file except in compliance with the License. 6cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// You may obtain a copy of the License at 7cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// 8cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// http://www.apache.org/licenses/LICENSE-2.0 9cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// 10cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// Unless required by applicable law or agreed to in writing, software 11cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// distributed under the License is distributed on an "AS IS" BASIS, 12cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// See the License for the specific language governing permissions and 14cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika// limitations under the License. 15cd727f537d5085eec7f1b8f9c1d33922d4de75d4Prodyut Hazarika*/ 164b834ced8031d624fc8bd042275cb0612c7b9f63Andy Qiu#ifndef TNG_DISPLAY_CONTEXT_H 174b834ced8031d624fc8bd042275cb0612c7b9f63Andy Qiu#define TNG_DISPLAY_CONTEXT_H 186a6081a46a83da606cf21548879b37695adc7e1fAndy Qiu 194b834ced8031d624fc8bd042275cb0612c7b9f63Andy Qiu#include <IDisplayContext.h> 206a6081a46a83da606cf21548879b37695adc7e1fAndy Qiu#include <hal_public.h> 216a6081a46a83da606cf21548879b37695adc7e1fAndy Qiu 226a6081a46a83da606cf21548879b37695adc7e1fAndy Qiunamespace android { 236a6081a46a83da606cf21548879b37695adc7e1fAndy Qiunamespace intel { 246a6081a46a83da606cf21548879b37695adc7e1fAndy Qiu 254b834ced8031d624fc8bd042275cb0612c7b9f63Andy Qiuclass TngDisplayContext : public IDisplayContext { 266a6081a46a83da606cf21548879b37695adc7e1fAndy Qiupublic: 274b834ced8031d624fc8bd042275cb0612c7b9f63Andy Qiu TngDisplayContext(); 28eb726af21649d79ed720bdf329e0849270995c45Andy Qiu virtual ~TngDisplayContext(); 296a6081a46a83da606cf21548879b37695adc7e1fAndy Qiupublic: 304b834ced8031d624fc8bd042275cb0612c7b9f63Andy Qiu bool initialize(); 31e2ad4c047651d4442f6a0e002290016d45e9201afu jin void deinitialize(); 32e2ad4c047651d4442f6a0e002290016d45e9201afu jin bool commitBegin(size_t numDisplays, hwc_display_contents_1_t **displays); 334b834ced8031d624fc8bd042275cb0612c7b9f63Andy Qiu bool commitContents(hwc_display_contents_1_t *display, HwcLayerList* layerList); 34e2ad4c047651d4442f6a0e002290016d45e9201afu jin bool commitEnd(size_t numDisplays, hwc_display_contents_1_t **displays); 354b834ced8031d624fc8bd042275cb0612c7b9f63Andy Qiu bool compositionComplete(); 36a6ca0e98674e3f1b0a7239f6e775cae2f667fe5cLei Zhang bool setCursorPosition(int disp, int x, int y); 374b834ced8031d624fc8bd042275cb0612c7b9f63Andy Qiu 384b834ced8031d624fc8bd042275cb0612c7b9f63Andy Qiuprivate: 394b834ced8031d624fc8bd042275cb0612c7b9f63Andy Qiu enum { 404b834ced8031d624fc8bd042275cb0612c7b9f63Andy Qiu MAXIMUM_LAYER_NUMBER = 20, 414b834ced8031d624fc8bd042275cb0612c7b9f63Andy Qiu }; 42998f109c19fc9d5af0e4611739e0d635da484d93Jackie Li IMG_display_device_public_t *mIMGDisplayDevice; 434b834ced8031d624fc8bd042275cb0612c7b9f63Andy Qiu IMG_hwc_layer_t mImgLayers[MAXIMUM_LAYER_NUMBER]; 444b834ced8031d624fc8bd042275cb0612c7b9f63Andy Qiu bool mInitialized; 459d1d3833469f52dbd2a017702bf0116fddc703bcAndy Qiu size_t mCount; 466a6081a46a83da606cf21548879b37695adc7e1fAndy Qiu}; 476a6081a46a83da606cf21548879b37695adc7e1fAndy Qiu 484b834ced8031d624fc8bd042275cb0612c7b9f63Andy Qiu} // namespace intel 494b834ced8031d624fc8bd042275cb0612c7b9f63Andy Qiu} // namespace android 504b834ced8031d624fc8bd042275cb0612c7b9f63Andy Qiu 514b834ced8031d624fc8bd042275cb0612c7b9f63Andy Qiu#endif /* TNG_DISPLAY_CONTEXT_H */ 52