summaryrefslogtreecommitdiff
path: root/separate_rects.h
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2016-05-10 03:42:55 -0400
committerSean Paul <seanpaul@chromium.org>2016-05-10 04:26:11 -0400
commitf1d2579822fcce9bfff996d8bd95d81136459b59 (patch)
tree7ba109eba2166745167e3b0c70b680b435fd71d3 /separate_rects.h
parent6b9647f3d666fad92985d0b6cef7a5b199a71687 (diff)
drm_hwcomposer: Fix protected layer hole punch
The old code didn't dereference the layer index from the bitmask which caused it to subtract layers it shouldn't have. In order to do this right, we need to look at the layer index corresponding to the bit in the id_set to ensure we're excluding the correct layers. BUG=None TEST=Precomposition doesn't draw over dedicated layers Change-Id: I8531e1ef3b2beb4674041145e2b38ce4b3dbe346 Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'separate_rects.h')
-rw-r--r--separate_rects.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/separate_rects.h b/separate_rects.h
index cb46ecb..de8b660 100644
--- a/separate_rects.h
+++ b/separate_rects.h
@@ -105,14 +105,6 @@ 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;
}