summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/BufferLayer.cpp
diff options
context:
space:
mode:
author Lloyd Pique <lpique@google.com> 2019-01-29 18:42:32 -0800
committer Lloyd Pique <lpique@google.com> 2019-03-15 09:22:07 -0700
commita83776ca89ba291b05ad97c63cc4f8c595625379 (patch)
tree9c09ad4fa3124e85f5ad776ceddc844bcf3828ff /services/surfaceflinger/BufferLayer.cpp
parent3cbee173998d61b5c3870f9699045b62eba28243 (diff)
SF: Move/Refactor Layer::setGeometry() to compositionengine::OutputLayer
The front-end Layer now implements only a small bit of functionality to compute the geometry state of the layer, traversing the parent hierarchy as needed. The geometry is written to data added to LayerFECompositionState. compositionengine::OutputLayer then computes the actual state for the output the layer is on, storing the result in OutputLayerCompositionState. A second new function then takes the output-specific layer state (and output-independent layer state) and sends it to the HWC layer. Implements partial tests for the new functions. Test: atest libsurfaceflinger_unittest libcompositionengine_test Bug: 121291683 Change-Id: Idc770e6c84d046555cc11d75d53fa22c4be4ae58
Diffstat (limited to 'services/surfaceflinger/BufferLayer.cpp')
-rw-r--r--services/surfaceflinger/BufferLayer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/services/surfaceflinger/BufferLayer.cpp b/services/surfaceflinger/BufferLayer.cpp
index bb18aa10db..4751e5f122 100644
--- a/services/surfaceflinger/BufferLayer.cpp
+++ b/services/surfaceflinger/BufferLayer.cpp
@@ -105,6 +105,10 @@ bool BufferLayer::isFixedSize() const {
return getEffectiveScalingMode() != NATIVE_WINDOW_SCALING_MODE_FREEZE;
}
+bool BufferLayer::usesSourceCrop() const {
+ return true;
+}
+
static constexpr mat4 inverseOrientation(uint32_t transform) {
const mat4 flipH(-1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1);
const mat4 flipV(1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1);