summaryrefslogtreecommitdiff
path: root/drmhwcomposer.h
diff options
context:
space:
mode:
authorZach Reizner <zachr@google.com>2015-10-27 16:18:06 -0700
committerZach Reizner <zachr@google.com>2015-11-06 17:41:28 -0800
commitdb81fce67419d82d828eebec25e57284e90dd93a (patch)
tree9036edcf0ef24f4ad2dc1e49ad2b4242d15f5c78 /drmhwcomposer.h
parentaa2f4a5eec7f4117b9487a415739634007254822 (diff)
drm_hwcomposer: always put protected layers on hardware planes
Protected layers will not work inside of the GLWorker, so we are forced to put them into planes directly. Because we can now receive display contents which can never be properly composited (e.g. 4 protected layers on hardware with only 3 planes), some compromises had to be made for the composition planning algorithm. First all protected layers are given a plane. Then the remaining planes are used by the remaining layers, pre-composite buffer, and squash buffer. In the case where there are too few planes for both a pre-composite buffer and squash buffer, everything gets pushed into the pre-composite buffer and the squash buffer will not be composited onto the screen. Another major limitation is that any unprotected layers appearing behind a protected layer will actually appear on top of that protected layer. BUG=chrome-os-partner:43674 TEST=run protected content with lots of other layers Change-Id: I94620d93f68ca14dc1966422dc89035ab84e3ff4
Diffstat (limited to 'drmhwcomposer.h')
-rw-r--r--drmhwcomposer.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drmhwcomposer.h b/drmhwcomposer.h
index 2f36ad8..e0f8d2b 100644
--- a/drmhwcomposer.h
+++ b/drmhwcomposer.h
@@ -155,6 +155,11 @@ struct DrmHwcLayer {
buffer_handle_t get_usable_handle() const {
return handle.get() != NULL ? handle.get() : sf_handle;
}
+
+ bool protected_usage() const {
+ return (gralloc_buffer_usage & GRALLOC_USAGE_PROTECTED) ==
+ GRALLOC_USAGE_PROTECTED;
+ }
};
struct DrmHwcDisplayContents {