Home | History | Annotate | Download | only in tangier
      1 /*
      2 // Copyright(c)2014 IntelCorporation
      3 //
      4 // LicensedundertheApacheLicense,Version2.0(the"License");
      5 // youmaynotusethisfileexceptincompliancewiththeLicense.
      6 // YoumayobtainacopyoftheLicenseat
      7 //
      8 // http://www.apache.org/licenses/LICENSE-2.0
      9 //
     10 // Unlessrequiredbyapplicablelaworagreedtoinwriting,software
     11 // distributedundertheLicenseisdistributedonan"ASIS"BASIS,
     12 // WITHOUTWARRANTIESORCONDITIONSOFANYKIND,eitherexpressorimplied.
     13 // SeetheLicenseforthespecificlanguagegoverningpermissionsand
     14 // limitationsundertheLicense.
     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