Added setBufferCrop
Added setBufferCrop to handle setGeometry calls from the public
SurfaceControl. This is because setGeometry gets crop in buffer space,
but setCrop can only handle layer space crop. Added setBufferCrop to
handle this case
Test: ASurfaceControlTest
Fixes: 186266903
Change-Id: I14fb329d2d6f504ca8fa8e330c8a036cbde56f28
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 688a2c3..a83408b 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -274,6 +274,8 @@
// Stretch effect to apply to this layer
StretchEffect stretchEffect;
+
+ Rect bufferCrop;
};
/*
@@ -885,6 +887,7 @@
bool setStretchEffect(const StretchEffect& effect);
StretchEffect getStretchEffect() const;
+ virtual bool setBufferCrop(const Rect& /* bufferCrop */) { return false; }
virtual std::atomic<int32_t>* getPendingBufferCounter() { return nullptr; }
virtual std::string getPendingBufferCounterName() { return ""; }