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 GRALLOC_BUFFER_BASE_H
     17 #define GRALLOC_BUFFER_BASE_H
     18 
     19 #include <GraphicBuffer.h>
     20 #include <hal_public.h>
     21 // FIXME: remove it, why define NV12_VED based on OMX's value?
     22 #include <OMX_IVCommon.h>
     23 #include <OMX_IntelVideoExt.h>
     24 
     25 namespace android {
     26 namespace intel {
     27 
     28 class GrallocBufferBase : public GraphicBuffer {
     29 public:
     30     GrallocBufferBase(buffer_handle_t handle);
     31     virtual ~GrallocBufferBase() {}
     32     virtual void resetBuffer(buffer_handle_t handle);
     33 
     34 protected:
     35     // helper function to be invoked by the derived class
     36     void initStride();
     37 
     38 private:
     39     void initBuffer(buffer_handle_t handle);
     40 };
     41 
     42 } // namespace intel
     43 } // namespace android
     44 
     45 #endif /* GRALLOC_BUFFER_BASE_H */
     46