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

Commit 68cd9a8e authored by Kevin Schoedel's avatar Kevin Schoedel Committed by android-build-merger
Browse files

Merge "Make VR HWC DPI a configurable property" into oc-dr1-dev am: 281a0c26

am: c0df4a02

Change-Id: Ib1c6fabbb4962b0e8895b6252de63713311ad1d4
parents c8c8a617 c0df4a02
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
 */
#include "impl/vr_hwc.h"

#include <cutils/properties.h>
#include <private/dvr/display_client.h>
#include <ui/Fence.h>

@@ -352,7 +353,14 @@ Error VrHwc::getDisplayAttribute(Display display, Config config,
      break;
    case IComposerClient::Attribute::DPI_X:
    case IComposerClient::Attribute::DPI_Y:
      *outValue = 300 * 1000;  // 300dpi
      {
        constexpr int32_t kDefaultDPI = 300;
        int32_t dpi = property_get_int32("ro.vr.hwc.dpi", kDefaultDPI);
        if (dpi <= 0) {
          dpi = kDefaultDPI;
        }
        *outValue = 1000 * dpi;
      }
      break;
    default:
      return Error::BAD_PARAMETER;