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

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

Merge "Tie VR mode support to a property"

parents 9f7b8d7d 3a8f7944
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -156,6 +156,7 @@ SurfaceFlinger::SurfaceFlinger()
        mVisibleRegionsDirty(false),
        mGeometryInvalid(false),
        mAnimCompositionPending(false),
        mVrModeSupported(0),
        mDebugRegion(0),
        mDebugDDMS(0),
        mDebugDisableHWC(0),
@@ -185,6 +186,10 @@ SurfaceFlinger::SurfaceFlinger()
    // debugging stuff...
    char value[PROPERTY_VALUE_MAX];

    // TODO (urbanus): remove once b/35319396 is fixed.
    property_get("ro.boot.vr", value, "0");
    mVrModeSupported = atoi(value);

    property_get("ro.bq.gpu_to_cpu_unsupported", value, "0");
    mGpuToCpuSupported = !atoi(value);

@@ -1262,8 +1267,11 @@ void SurfaceFlinger::onMessageReceived(int32_t what) {
    ATRACE_CALL();
    switch (what) {
        case MessageQueue::INVALIDATE: {
            // TODO(eieio): Disabled until SELinux issues are resolved.
            //updateVrMode();
            // TODO(eieio): Tied to a conditional until SELinux issues
            // are resolved.
            if (mVrModeSupported) {
                updateVrMode();
            }

            bool frameMissed = !mHadClientComposition &&
                    mPreviousPresentFence != Fence::NO_FENCE &&
+1 −0
Original line number Diff line number Diff line
@@ -557,6 +557,7 @@ private:
    DefaultKeyedVector< wp<IBinder>, sp<DisplayDevice> > mDisplays;

    // don't use a lock for these, we don't care
    int mVrModeSupported;
    int mDebugRegion;
    int mDebugDDMS;
    int mDebugDisableHWC;