Closed Bug 1138811 (RefactorHwc) Opened 10 years ago Closed 8 years ago

[META] Refactor HwcComposer2D

Categories

(Core Graveyard :: Widget: Gonk, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: boris, Unassigned)

References

Details

Attachments

(1 file)

There are many hard codes and definitions for different Android versions in HwcComposer2D, and we want to add the OverlayImage layer into HwcComposer2D in the future. I think it's a good chance to refactor HwcComposer2D for different version and platforms(ex. qcom, mtk).
We need to support one interface per Android version and avoid vendor specific forks within the tree. Platform specific modifications should not be encouraged.
(In reply to Michael Wu [:mwu] from comment #1)
> We need to support one interface per Android version and avoid vendor
> specific forks within the tree. Platform specific modifications should not
> be encouraged.

Agree, we should avoid the platform specific modifications in single android version.
Let's separate HwcComposer2D by version first and see how many hw specific changes.
There is another thought that could be considered in this refactor.
If we treat HWC HAL as a separate module, and call them as hal.set()/hal.commit(), it is possible to create the mockhal to verify the layer lists input are valid or not. For example, we can run this mockhal in GIT and then we can verify latest gaia/gecko are HWC friendly or not. But we may have trouble to check the graphic buffer existed or not for every layer during the validation.
If you want to, I think splitting ICS away from JB/KK/L support might make sense. In general, I would like to avoid splitting implementations for different versions into different files unless they're *very* different.
Alias: RefactorHwc
Summary: Refactor HwcComposer2D → [META] Refactor HwcComposer2D
Depends on: 1144012
Depends on: 1144014
Depends on: 1152135, 1116089
No longer depends on: 1116089
Depends on: 1159592
Depends on: 1159597
Current plan:
1. Bug 1144012: Wrap HwcDevcie from HwcComposer2D
    - Purpose: Remove most version definitions and wrap them
    - Create HwcHALBase/HwcHAL/HwcICS classes
    - Wrap HwcDevice
2. Bug 1159592: Refine preparing layer list and wrap HwcList from HwcComposer2D
    - Purpose: Make PrepareLayerList more readable and handle different layers easier
    - Wrap HwcList (refine HwcLayer memory relocation)
    - Wrap the filling of layer info (for different versions and overlay image layer info)
3. Bug 1159597 Refine partial composition code in HwcComposer2D
    - Purpose: Refine different composition paths and make it more readable
    - Revise TryHwComposition (and/or Render)
    - Make it easier to add a new composition type (ex. HWC_OVELAYIMAGE)

After finishing these bugs, we can start to handle Bug 1149296 (Support OverlayImage Layer)
Depends on: 1170061
Depends on: 1180657
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: