Loading services/surfaceflinger/DisplayDevice.cpp +8 −9 Original line number Diff line number Diff line Loading @@ -309,7 +309,7 @@ void DisplayDevice::setProjection(int orientation, void DisplayDevice::updateGeometryTransform() { int w = mDisplayWidth; int h = mDisplayHeight; Transform T, R, S; Transform TL, TP, R, S; if (DisplayDevice::orientationToTransfrom( mOrientation, w, h, &R) == NO_ERROR) { dirtyRegion.set(bounds()); Loading Loading @@ -350,13 +350,12 @@ void DisplayDevice::updateGeometryTransform() { float src_y = viewport.top; float dst_x = frame.left; float dst_y = frame.top; float tx = dst_x - src_x; float ty = dst_y - src_y; T.set(tx, ty); // The viewport and frame are both in the logical orientation, so the // translation is also in that space. So translation must be applied // before rotating from logical to physical orientation. mGlobalTransform = S * R * T; TL.set(-src_x, -src_y); TP.set(dst_x, dst_y); // The viewport and frame are both in the logical orientation. // Apply the logical translation, scale to physical size, apply the // physical translation and finally rotate to the physical orientation. mGlobalTransform = R * TP * S * TL; } } services/surfaceflinger/SurfaceFlinger.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -1976,7 +1976,8 @@ void SurfaceFlinger::dumpAllLocked( snprintf(buffer, SIZE, "+ DisplayDevice[%u]\n" " type=%x, layerStack=%u, (%4dx%4d), orient=%2d (type=%08x), " "flips=%u, secure=%d, numLayers=%u, v:[%d,%d,%d,%d], f:[%d,%d,%d,%d]\n", "flips=%u, secure=%d, numLayers=%u, v:[%d,%d,%d,%d], f:[%d,%d,%d,%d], " "transform:[[%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f]]\n", dpy, hw->getDisplayType(), hw->getLayerStack(), hw->getWidth(), hw->getHeight(), Loading @@ -1985,7 +1986,10 @@ void SurfaceFlinger::dumpAllLocked( hw->getSecureLayerVisible(), hw->getVisibleLayersSortedByZ().size(), hw->getViewport().left, hw->getViewport().top, hw->getViewport().right, hw->getViewport().bottom, hw->getFrame().left, hw->getFrame().top, hw->getFrame().right, hw->getFrame().bottom); hw->getFrame().left, hw->getFrame().top, hw->getFrame().right, hw->getFrame().bottom, hw->getTransform()[0][0], hw->getTransform()[1][0], hw->getTransform()[2][0], hw->getTransform()[0][1], hw->getTransform()[1][1], hw->getTransform()[2][1], hw->getTransform()[0][2], hw->getTransform()[1][2], hw->getTransform()[2][2]); result.append(buffer); } Loading Loading
services/surfaceflinger/DisplayDevice.cpp +8 −9 Original line number Diff line number Diff line Loading @@ -309,7 +309,7 @@ void DisplayDevice::setProjection(int orientation, void DisplayDevice::updateGeometryTransform() { int w = mDisplayWidth; int h = mDisplayHeight; Transform T, R, S; Transform TL, TP, R, S; if (DisplayDevice::orientationToTransfrom( mOrientation, w, h, &R) == NO_ERROR) { dirtyRegion.set(bounds()); Loading Loading @@ -350,13 +350,12 @@ void DisplayDevice::updateGeometryTransform() { float src_y = viewport.top; float dst_x = frame.left; float dst_y = frame.top; float tx = dst_x - src_x; float ty = dst_y - src_y; T.set(tx, ty); // The viewport and frame are both in the logical orientation, so the // translation is also in that space. So translation must be applied // before rotating from logical to physical orientation. mGlobalTransform = S * R * T; TL.set(-src_x, -src_y); TP.set(dst_x, dst_y); // The viewport and frame are both in the logical orientation. // Apply the logical translation, scale to physical size, apply the // physical translation and finally rotate to the physical orientation. mGlobalTransform = R * TP * S * TL; } }
services/surfaceflinger/SurfaceFlinger.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -1976,7 +1976,8 @@ void SurfaceFlinger::dumpAllLocked( snprintf(buffer, SIZE, "+ DisplayDevice[%u]\n" " type=%x, layerStack=%u, (%4dx%4d), orient=%2d (type=%08x), " "flips=%u, secure=%d, numLayers=%u, v:[%d,%d,%d,%d], f:[%d,%d,%d,%d]\n", "flips=%u, secure=%d, numLayers=%u, v:[%d,%d,%d,%d], f:[%d,%d,%d,%d], " "transform:[[%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f]]\n", dpy, hw->getDisplayType(), hw->getLayerStack(), hw->getWidth(), hw->getHeight(), Loading @@ -1985,7 +1986,10 @@ void SurfaceFlinger::dumpAllLocked( hw->getSecureLayerVisible(), hw->getVisibleLayersSortedByZ().size(), hw->getViewport().left, hw->getViewport().top, hw->getViewport().right, hw->getViewport().bottom, hw->getFrame().left, hw->getFrame().top, hw->getFrame().right, hw->getFrame().bottom); hw->getFrame().left, hw->getFrame().top, hw->getFrame().right, hw->getFrame().bottom, hw->getTransform()[0][0], hw->getTransform()[1][0], hw->getTransform()[2][0], hw->getTransform()[0][1], hw->getTransform()[1][1], hw->getTransform()[2][1], hw->getTransform()[0][2], hw->getTransform()[1][2], hw->getTransform()[2][2]); result.append(buffer); } Loading