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 17 #ifndef ANN_CUR_PLANE_H 18 #define ANN_CUR_PLANE_H 19 20 #include <utils/KeyedVector.h> 21 #include <hal_public.h> 22 #include <Hwcomposer.h> 23 #include <BufferCache.h> 24 #include <DisplayPlane.h> 25 26 #include <linux/psb_drm.h> 27 28 namespace android { 29 namespace intel { 30 31 class AnnCursorPlane : public DisplayPlane { 32 public: 33 AnnCursorPlane(int index, int disp); 34 virtual ~AnnCursorPlane(); 35 public: 36 // hardware operations 37 bool enable(); 38 bool disable(); 39 bool reset(); 40 bool isDisabled(); 41 void postFlip(); 42 43 void* getContext() const; 44 void setZOrderConfig(ZOrderConfig& config, void *nativeConfig); 45 46 bool setDataBuffer(buffer_handle_t handle); 47 protected: 48 bool setDataBuffer(BufferMapper& mapper); 49 bool enablePlane(bool enabled); 50 51 protected: 52 struct intel_dc_plane_ctx mContext; 53 crop_t mCrop; 54 }; 55 56 } // namespace intel 57 } // namespace android 58 59 #endif /* ANN_CUR_PLANE_H */ 60