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_DISPLAY_CONTEXT_H
     17 #define TNG_DISPLAY_CONTEXT_H
     18 
     19 #include <IDisplayContext.h>
     20 #include <hal_public.h>
     21 
     22 namespace android {
     23 namespace intel {
     24 
     25 class TngDisplayContext : public IDisplayContext {
     26 public:
     27     TngDisplayContext();
     28     virtual ~TngDisplayContext();
     29 public:
     30     bool initialize();
     31     void deinitialize();
     32     bool commitBegin(size_t numDisplays, hwc_display_contents_1_t **displays);
     33     bool commitContents(hwc_display_contents_1_t *display, HwcLayerList* layerList);
     34     bool commitEnd(size_t numDisplays, hwc_display_contents_1_t **displays);
     35     bool compositionComplete();
     36     bool setCursorPosition(int disp, int x, int y);
     37 
     38 private:
     39     enum {
     40         MAXIMUM_LAYER_NUMBER = 20,
     41     };
     42     IMG_display_device_public_t *mIMGDisplayDevice;
     43     IMG_hwc_layer_t mImgLayers[MAXIMUM_LAYER_NUMBER];
     44     bool mInitialized;
     45     size_t mCount;
     46 };
     47 
     48 } // namespace intel
     49 } // namespace android
     50 
     51 #endif /* TNG_DISPLAY_CONTEXT_H */
     52