summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chia-I Wu <olv@google.com> 2018-08-23 13:44:43 -0700
committer Yiwei Zhang <zzyiwei@google.com> 2019-03-21 04:33:17 +0000
commit07f190f7ba5f3a41299411ef39736ffc21c9a8c4 (patch)
tree8a05f5218393c84147c2a4c8c993e9a28a7ef5ce
parentfed28575b5fc9e4757cad55bff0a4e53d1513c45 (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 Merged-In: Ia10b26dbba9a6a91abb5dae9fbe20bf17cd3e78f
-rw-r--r--services/surfaceflinger/DisplayDevice.h8
-rw-r--r--services/surfaceflinger/RenderArea.h6
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp4
3 files changed, 9 insertions, 9 deletions
diff --git a/services/surfaceflinger/DisplayDevice.h b/services/surfaceflinger/DisplayDevice.h
index 6c3bd91793..f73654c482 100644
--- a/services/surfaceflinger/DisplayDevice.h
+++ b/services/surfaceflinger/DisplayDevice.h
@@ -338,11 +338,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 Transform& getTransform() const override { return mDevice->getTransform(); }
diff --git a/services/surfaceflinger/RenderArea.h b/services/surfaceflinger/RenderArea.h
index d6876ceb98..38f4cbc639 100644
--- a/services/surfaceflinger/RenderArea.h
+++ b/services/surfaceflinger/RenderArea.h
@@ -20,9 +20,9 @@ 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)
- : mReqHeight(reqHeight), mReqWidth(reqWidth), mCaptureFill(captureFill) {
+ : mReqWidth(reqWidth), mReqHeight(reqHeight), mCaptureFill(captureFill) {
mRotationFlags = Transform::fromRotation(rotation);
}
@@ -74,8 +74,8 @@ public:
status_t updateDimensions(int displayRotation);
private:
- uint32_t mReqHeight;
uint32_t mReqWidth;
+ uint32_t mReqHeight;
Transform::orientation_flags mRotationFlags;
CaptureFill mCaptureFill;
};
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 4ec1e7f166..f523504748 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -4845,7 +4845,7 @@ status_t SurfaceFlinger::captureScreen(const sp<IBinder>& display, sp<GraphicBuf
}
}
- DisplayRenderArea renderArea(device, sourceCrop, reqHeight, reqWidth, rotation);
+ DisplayRenderArea renderArea(device, sourceCrop, reqWidth, reqHeight, rotation);
auto traverseLayers = std::bind(std::mem_fn(&SurfaceFlinger::traverseLayersInDisplay), this,
device, minLayerZ, maxLayerZ, std::placeholders::_1);
@@ -4861,7 +4861,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),