Revert "Respect buffer source crop in client composition."
This reverts commit e0451f753d51e33afde34c7b6837c5824169c59f.
Reason for revert: this doesn't quite work in split screen when the device is rotated due to some buffer size mismatch. I have a forward fix in mind, but I don't believe it requires some of the interface changes so reverting first even though no one's caught this yet :x.
Change-Id: I1a0a0d028beb13f810ac16eb8d112d7c89b1cfca
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 7bc7a82..2e75088 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -671,22 +671,12 @@
uint32_t getEffectiveUsage(uint32_t usage) const;
- // Computes the crop applied to this layer. windowBounds is the boundary of
- // layer-stack space, so the cropping rectangle will be clipped to those
- // bounds in that space. The crop rectangle is returned in buffer space. If
- // windowBounds is invalid, then it is ignored.
- virtual FloatRect computeCrop(const Rect& windowBounds) const;
-
- // See the above method, but pulls the window boundaries from the display.
- FloatRect computeCrop(const sp<const DisplayDevice>& display) const {
- return computeCrop(display->getViewport());
- }
+ virtual FloatRect computeCrop(const sp<const DisplayDevice>& display) const;
// Compute the initial crop as specified by parent layers and the
// SurfaceControl for this layer. Does not include buffer crop from the
// IGraphicBufferProducer client, as that should not affect child clipping.
// Returns in screen space.
- Rect computeInitialCrop(const Rect& windowBounds) const;
-
+ Rect computeInitialCrop(const sp<const DisplayDevice>& display) const;
/**
* Setup rounded corners coordinates of this layer, taking into account the layer bounds and
* crop coordinates, transforming them into layer space.