Platform/GFX/hwcomposer

From MozillaWiki
Jump to navigation Jump to search

What is Hardware Composer?

  • HWComposer
    • Android Hardware composer HAL(1) is a abstract 2D composer library and could help to offload GPU resource for screen composition. Based on HWC HAL, chipset vendor(like Qcom, nVidia) could implement their own 2D composer library to integrate with platform's 2D HW composer.
    • Different chipset vendor could have different 2D HW componment
      • Qcom supports copybit(used by B2G leo/hamachi) and overlay(Nexus 4 JB), nVidia support overlay, Mali(???)


  • HWComposer Requirement
    • Scale
    • Axis Aligned Rotate (0, 90, 180, 270)
    • Flip_V/Flip_H
    • RGB/YUV content

Links to relevent files: TODO

Android doc about HWComposer: http://source.android.com/devices/graphics.html#hwc

What are the wins of using HWComposer over an OpenGL compositor?

  • Lower Power consumption
    • Chipset vendors could use simple HW layout to fullfill the needs of HWComposer, compared to GPU complex layout. Therefore, HWComposer could have the following benefits.
  • offer all GPU resource for application
    • offload GPU task for screen composition
  • Memory bandwidth for write(TODO)
    • NO need to write back composition result to fb0

What are the limitations HWComposer?

  • Layer number
  • scaling capability

Buffer Synchronization

JB

TODO