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

Commit 8b615b38 authored by Kyong Hwa Bae's avatar Kyong Hwa Bae Committed by Giulio Cervera
Browse files

SurfaceTexture: returning the current transform value

Change-Id: I2975057f47b219ef1ebe73cb8ef85048dc22c784
parent 19c597ff
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -277,13 +277,11 @@ int SurfaceTextureClient::query(int what, int* value) const {
                return NO_ERROR;
            case NATIVE_WINDOW_TRANSFORM_HINT:
#ifdef QCOM_HARDWARE
                if (mSurfaceTexture->query(what, value) != NO_ERROR) {
                    *value = mTransformHint;
                }
                return mSurfaceTexture->query(what, value);
#else
                *value = mTransformHint;
#endif
                return NO_ERROR;
#endif
        }
    }
    return mSurfaceTexture->query(what, value);
+2 −2
Original line number Diff line number Diff line
@@ -55,7 +55,6 @@ status_t SurfaceTextureLayer::setBufferCount(int bufferCount) {
#ifdef QCOM_HARDWARE
int SurfaceTextureLayer::query(int what, int* value) {
    int ret = SurfaceTexture::query(what, value);
    if (ret != NO_ERROR) return ret;

    sp<Layer> layer(mLayer.promote());
    if (layer == NULL) return NO_INIT;
@@ -63,13 +62,14 @@ int SurfaceTextureLayer::query(int what, int* value) {
    switch (what) {
    case NATIVE_WINDOW_TRANSFORM_HINT:
        *value = layer->getTransformHint();
        ret = NO_ERROR;
        break;
    default:
        // for later use
        break;
    }

    return NO_ERROR;
    return ret;
}
#endif