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 and overlay, nVidia support overlay, Mali(2D engine from GPU???)
      • B2G ICS on leo/hamachi use copybit by default
      • B2G JB on Nexus 4 use overlay by default (will support partial HWC composition bug 915729)
  • 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)
    • HWComposer will have each layer's graphic buffer as input and combine these graphic buffers to screen.
    • No need to write back composition result to framebuffer

What are the limitations HWComposer?

  • Layer number
  • scaling capability

Buffer Synchronization

JB

TODO