1 /* 2 // Copyright (c) 2014 Intel Corporation 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 #ifndef TNG_OVERLAY_PLANE_H 17 #define TNG_OVERLAY_PLANE_H 18 19 #include <utils/KeyedVector.h> 20 #include <hal_public.h> 21 #include <DisplayPlane.h> 22 #include <BufferMapper.h> 23 #include <common/Wsbm.h> 24 #include <common/OverlayPlaneBase.h> 25 #include <common/RotationBufferProvider.h> 26 27 namespace android { 28 namespace intel { 29 30 class TngOverlayPlane : public OverlayPlaneBase { 31 32 public: 33 TngOverlayPlane(int index, int disp); 34 virtual ~TngOverlayPlane(); 35 36 virtual bool flip(void *ctx); 37 virtual bool reset(); 38 virtual void* getContext() const; 39 40 virtual bool initialize(uint32_t bufferCount); 41 virtual void deinitialize(); 42 virtual bool rotatedBufferReady(BufferMapper& mapper, BufferMapper* &rotatedMapper); 43 protected: 44 virtual bool setDataBuffer(BufferMapper& mapper); 45 virtual bool flush(uint32_t flags); 46 47 protected: 48 struct intel_dc_plane_ctx mContext; 49 RotationBufferProvider *mRotationBufProvider; 50 }; 51 52 } // namespace intel 53 } // namespace android 54 55 #endif /* TNG_OVERLAY_PLANE_H */ 56