diff options
author | Sean Paul <seanpaul@chromium.org> | 2016-05-11 13:50:28 -0400 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2016-05-11 16:51:24 -0400 |
commit | 39b3784628eb4169b46e71b30c98daf83c93bb8e (patch) | |
tree | 11670e26178ce736cc3f6e47bcbc6de1a353dcd0 /drmdisplaycomposition.h | |
parent | f741c672bade253f172c642049a3b8f25d3bcb22 (diff) |
drm_hwcomposer: Add type to DrmCompositionPlane
Instead of encoding the plane/composition type in source_layer,
move it to its own explicit type. This will allow us to expand
source_layer to include more than one layer.
BUG=b/28117135
TEST=compiles and runs on smaug
Change-Id: I19b1ed8e395347bbefb0fb6a0ab02d6ac0e5c1c1
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'drmdisplaycomposition.h')
-rw-r--r-- | drmdisplaycomposition.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drmdisplaycomposition.h b/drmdisplaycomposition.h index 264963c..0362404 100644 --- a/drmdisplaycomposition.h +++ b/drmdisplaycomposition.h @@ -46,14 +46,18 @@ struct DrmCompositionRegion { std::vector<size_t> source_layers; }; +enum class DrmCompositionPlaneType : int32_t { + kDisable, + kLayer, + kPrecomp, + kSquash, +}; + struct DrmCompositionPlane { - const static size_t kSourceNone = SIZE_MAX; - const static size_t kSourcePreComp = kSourceNone - 1; - const static size_t kSourceSquash = kSourcePreComp - 1; - const static size_t kSourceLayerMax = kSourceSquash - 1; + DrmCompositionPlaneType type; DrmPlane *plane; DrmCrtc *crtc; - size_t source_layer; + int source_layer; }; class DrmDisplayComposition { @@ -135,7 +139,7 @@ class DrmDisplayComposition { int IncreaseTimelineToPoint(int point); - void EmplaceCompositionPlane(size_t source_layer, + void EmplaceCompositionPlane(DrmCompositionPlaneType type, int source_layer, std::vector<DrmPlane *> *primary_planes, std::vector<DrmPlane *> *overlay_planes); int CreateAndAssignReleaseFences(); |