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 GRALLOC_BUFFER_BASE_H 17 #define GRALLOC_BUFFER_BASE_H 18 19 #include <GraphicBuffer.h> 20 21 namespace android { 22 namespace intel { 23 24 class GrallocBufferBase : public GraphicBuffer { 25 public: 26 GrallocBufferBase(uint32_t handle); 27 virtual ~GrallocBufferBase() {} 28 virtual void resetBuffer(uint32_t handle); 29 30 protected: 31 // helper function to be invoked by the derived class 32 void initStride(); 33 34 private: 35 void initBuffer(uint32_t handle); 36 }; 37 38 } // namespace intel 39 } // namespace android 40 41 #endif /* GRALLOC_BUFFER_BASE_H */ 42