Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f89046d4 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Scale up the display and rotate by 90 degrees"

parents 2406fc7b c63710a5
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@ namespace dvr {

namespace {

constexpr float kLayerScaleFactor = 4.0f;

constexpr unsigned int kVRAppLayerCount = 2;

constexpr unsigned int kMaximumPendingFrames = 8;
@@ -105,6 +107,9 @@ mat4 GetScalingMatrix(float width, float height) {
  else
    xscale = ar;

  xscale *= kLayerScaleFactor;
  yscale *= kLayerScaleFactor;

  return mat4(Eigen::Scaling<float>(xscale, yscale, 1.0));
}

@@ -126,7 +131,7 @@ mat4 GetHorizontallyAlignedMatrixFromPose(const Posef& pose) {
  m(3, 0) = 0.0f; m(3, 1) = 0.0f; m(3, 2) = 0.0f; m(3, 3) = 1.0f;
  // clang-format on

  return m;
  return m * Eigen::AngleAxisf(M_PI * 0.5f, vec3::UnitZ());
}

// Helper function that applies the crop transform to the texture layer and