diff options
author | 2018-08-23 13:44:43 -0700 | |
---|---|---|
committer | 2018-08-27 11:20:16 -0700 | |
commit | 9d1abea931aaacf2354cc49b3d9a484de2693e93 (patch) | |
tree | 0bbd98a7ea0c2317f9d78a9086feec07f6959930 | |
parent | b68fac795eb220d66e8d1be5677a6e6d0864e4c6 (diff) |
surfaceflinger: reorder width and height in RenderArea ctor
Height is before width only in a crazy world.
Bug: 113041375
Test: take screenshot, rotate screen, screencap
Change-Id: Ia10b26dbba9a6a91abb5dae9fbe20bf17cd3e78f
-rw-r--r-- | services/surfaceflinger/DisplayDevice.h | 8 | ||||
-rw-r--r-- | services/surfaceflinger/RenderArea.cpp | 4 | ||||
-rw-r--r-- | services/surfaceflinger/RenderArea.h | 4 | ||||
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/services/surfaceflinger/DisplayDevice.h b/services/surfaceflinger/DisplayDevice.h index da0931e43f..928f1cee76 100644 --- a/services/surfaceflinger/DisplayDevice.h +++ b/services/surfaceflinger/DisplayDevice.h @@ -335,11 +335,11 @@ class DisplayRenderArea : public RenderArea { public: DisplayRenderArea(const sp<const DisplayDevice> device, ISurfaceComposer::Rotation rotation = ISurfaceComposer::eRotateNone) - : DisplayRenderArea(device, device->getBounds(), device->getHeight(), device->getWidth(), + : DisplayRenderArea(device, device->getBounds(), device->getWidth(), device->getHeight(), rotation) {} - DisplayRenderArea(const sp<const DisplayDevice> device, Rect sourceCrop, uint32_t reqHeight, - uint32_t reqWidth, ISurfaceComposer::Rotation rotation) - : RenderArea(reqHeight, reqWidth, CaptureFill::OPAQUE, rotation), mDevice(device), + DisplayRenderArea(const sp<const DisplayDevice> device, Rect sourceCrop, uint32_t reqWidth, + uint32_t reqHeight, ISurfaceComposer::Rotation rotation) + : RenderArea(reqWidth, reqHeight, CaptureFill::OPAQUE, rotation), mDevice(device), mSourceCrop(sourceCrop) {} const ui::Transform& getTransform() const override { return mDevice->getTransform(); } diff --git a/services/surfaceflinger/RenderArea.cpp b/services/surfaceflinger/RenderArea.cpp index 7f69ce4b3e..918bbd3a47 100644 --- a/services/surfaceflinger/RenderArea.cpp +++ b/services/surfaceflinger/RenderArea.cpp @@ -19,9 +19,9 @@ ui::Transform::orientation_flags fromRotation(ISurfaceComposer::Rotation rotatio return ui::Transform::ROT_0; } -RenderArea::RenderArea(uint32_t reqHeight, uint32_t reqWidth, CaptureFill captureFill, +RenderArea::RenderArea(uint32_t reqWidth, uint32_t reqHeight, CaptureFill captureFill, ISurfaceComposer::Rotation rotation) - : mReqHeight(reqHeight), mReqWidth(reqWidth), mCaptureFill(captureFill) { + : mReqWidth(reqWidth), mReqHeight(reqHeight), mCaptureFill(captureFill) { mRotationFlags = fromRotation(rotation); } diff --git a/services/surfaceflinger/RenderArea.h b/services/surfaceflinger/RenderArea.h index 9920f0ad47..61abaec3a2 100644 --- a/services/surfaceflinger/RenderArea.h +++ b/services/surfaceflinger/RenderArea.h @@ -20,7 +20,7 @@ public: static float getCaptureFillValue(CaptureFill captureFill); - RenderArea(uint32_t reqHeight, uint32_t reqWidth, CaptureFill captureFill, + RenderArea(uint32_t reqWidth, uint32_t reqHeight, CaptureFill captureFill, ISurfaceComposer::Rotation rotation = ISurfaceComposer::eRotateNone); virtual ~RenderArea() = default; @@ -71,8 +71,8 @@ public: status_t updateDimensions(int displayRotation); private: - uint32_t mReqHeight; uint32_t mReqWidth; + uint32_t mReqHeight; ui::Transform::orientation_flags mRotationFlags; CaptureFill mCaptureFill; }; diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 37d014686e..d4f384f934 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -4915,7 +4915,7 @@ status_t SurfaceFlinger::captureScreen(const sp<IBinder>& displayToken, } } - DisplayRenderArea renderArea(display, sourceCrop, reqHeight, reqWidth, rotation); + DisplayRenderArea renderArea(display, sourceCrop, reqWidth, reqHeight, rotation); auto traverseLayers = std::bind(std::mem_fn(&SurfaceFlinger::traverseLayersInDisplay), this, display, minLayerZ, maxLayerZ, std::placeholders::_1); @@ -4931,7 +4931,7 @@ status_t SurfaceFlinger::captureLayers(const sp<IBinder>& layerHandleBinder, public: LayerRenderArea(SurfaceFlinger* flinger, const sp<Layer>& layer, const Rect crop, int32_t reqWidth, int32_t reqHeight, bool childrenOnly) - : RenderArea(reqHeight, reqWidth, CaptureFill::CLEAR), + : RenderArea(reqWidth, reqHeight, CaptureFill::CLEAR), mLayer(layer), mCrop(crop), mFlinger(flinger), |