Home | History | Annotate | Download | only in common
      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 SPRITE_PLANE_BASE_H
     17 #define SPRITE_PLANE_BASE_H
     18 
     19 #include <utils/KeyedVector.h>
     20 #include <common/buffers/BufferCache.h>
     21 #include <DisplayPlane.h>
     22 
     23 namespace android {
     24 namespace intel {
     25 
     26 class SpritePlaneBase : public DisplayPlane {
     27 public:
     28     SpritePlaneBase(int index, int disp);
     29     virtual ~SpritePlaneBase();
     30 public:
     31     // hardware operations
     32     virtual bool flip(void *ctx);
     33     virtual bool enable();
     34     virtual bool disable();
     35     virtual bool isDisabled() = 0;
     36 
     37     // display device
     38     virtual void* getContext() const = 0;
     39 protected:
     40     virtual bool setDataBuffer(BufferMapper& mapper) = 0;
     41     virtual bool enablePlane(bool enabled) = 0;
     42 protected:
     43     bool mForceBottom;
     44     bool mAbovePrimary;
     45 };
     46 
     47 } // namespace intel
     48 } // namespace android
     49 
     50 #endif /* SPRITE_PLANE_BASE_H */
     51 
     52