summaryrefslogtreecommitdiff
path: root/separate_rects.h
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2016-04-18 15:53:36 -0400
committerSean Paul <seanpaul@chromium.org>2016-04-18 15:56:28 -0400
commit8a628b9d22f778fcb4dc445d677f6f028667c885 (patch)
treec3bc8df2dca93568922edaaff851afd4bdba3321 /separate_rects.h
parent1a0eb7eecadd9981b2872d7264a297edcf77dd0e (diff)
drm_hwcomposer: Don't composite over protected layers
This patch changes two things with respect to protected layers: 1- It provisions the HW plane in the correct position. ie: if the background layer is slated for a HW plane, it will be placed on the primary layer and the protected layer will be placed on top of it. 2- It punches a hole through the precomposite and squash layers such that when they are placed on top of the protected layer, they do not obstruct it. BUG=b/27502957 TEST=Tested on smaug with multi-window with a variety of different layouts and visible layers Change-Id: Ie30939f2bb750dbe3faa558ddb094b677f41f45e Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'separate_rects.h')
-rw-r--r--separate_rects.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/separate_rects.h b/separate_rects.h
index de8b660..cb46ecb 100644
--- a/separate_rects.h
+++ b/separate_rects.h
@@ -105,6 +105,14 @@ struct IdSet {
bitset &= ~(((TUInt)1) << id);
}
+ void subtract(TId start, TId end) {
+ if (start > end)
+ return;
+ TId start_mask = (1 << start) - 1;
+ TId end_mask = (1 << end) - 1;
+ bitset &= ~(start_mask ^ end_mask);
+ }
+
bool isEmpty() const {
return bitset == 0;
}