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

Commit 116c7922 authored by Robert Carr's avatar Robert Carr
Browse files

Track libgui changes

New SurfaceFlinger API.

Test: Boots
Change-Id: Icdc53535664fef32ebc937eb2283e96abdefbbc1
parent 7de1920b
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -256,10 +256,10 @@ TEST_F(CameraZSLTests, TestAllPictureSizes) {
        ASSERT_TRUE(nullptr != surfaceControl.get());
        ASSERT_TRUE(surfaceControl->isValid());

        SurfaceComposerClient::openGlobalTransaction();
        ASSERT_EQ(NO_ERROR, surfaceControl->setLayer(0x7fffffff));
        ASSERT_EQ(NO_ERROR, surfaceControl->show());
        SurfaceComposerClient::closeGlobalTransaction();
        SurfaceComposerClient::Transaction{}
                .setLayer(surfaceControl, 0x7fffffff)
                .show(surfaceControl)
                .apply();

        previewSurface = surfaceControl->getSurface();
        ASSERT_TRUE(previewSurface != NULL);
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ LOCAL_SRC_FILES := \

LOCAL_SHARED_LIBRARIES := \
	libstagefright libmedia libutils libbinder libstagefright_foundation \
	libjpeg libgui libcutils liblog libEGL libGLESv2
	libjpeg libui libgui libcutils liblog libEGL libGLESv2

LOCAL_C_INCLUDES := \
	frameworks/av/media/libstagefright \
+12 −10
Original line number Diff line number Diff line
@@ -213,7 +213,9 @@ static status_t prepareEncoder(float displayFps, sp<MediaCodec>* pCodec,
 * Sets the display projection, based on the display dimensions, video size,
 * and device orientation.
 */
static status_t setDisplayProjection(const sp<IBinder>& dpy,
static status_t setDisplayProjection(
        SurfaceComposerClient::Transaction& t,
        const sp<IBinder>& dpy,
        const DisplayInfo& mainDpyInfo) {

    // Set the region of the layer stack we're interested in, which in our
@@ -279,7 +281,7 @@ static status_t setDisplayProjection(const sp<IBinder>& dpy,
        }
    }

    SurfaceComposerClient::setDisplayProjection(dpy,
    t.setDisplayProjection(dpy,
            gRotate ? DISPLAY_ORIENTATION_90 : DISPLAY_ORIENTATION_0,
            layerStackRect, displayRect);
    return NO_ERROR;
@@ -295,11 +297,11 @@ static status_t prepareVirtualDisplay(const DisplayInfo& mainDpyInfo,
    sp<IBinder> dpy = SurfaceComposerClient::createDisplay(
            String8("ScreenRecorder"), false /*secure*/);

    SurfaceComposerClient::openGlobalTransaction();
    SurfaceComposerClient::setDisplaySurface(dpy, bufferProducer);
    setDisplayProjection(dpy, mainDpyInfo);
    SurfaceComposerClient::setDisplayLayerStack(dpy, 0);    // default stack
    SurfaceComposerClient::closeGlobalTransaction();
    SurfaceComposerClient::Transaction t;
    t.setDisplaySurface(dpy, bufferProducer);
    setDisplayProjection(t, dpy, mainDpyInfo);
    t.setDisplayLayerStack(dpy, 0);    // default stack
    t.apply();

    *pDisplayHandle = dpy;

@@ -379,9 +381,9 @@ static status_t runEncoder(const sp<MediaCodec>& encoder,
                        ALOGW("getDisplayInfo(main) failed: %d", err);
                    } else if (orientation != mainDpyInfo.orientation) {
                        ALOGD("orientation changed, now %d", mainDpyInfo.orientation);
                        SurfaceComposerClient::openGlobalTransaction();
                        setDisplayProjection(virtualDpy, mainDpyInfo);
                        SurfaceComposerClient::closeGlobalTransaction();
                        SurfaceComposerClient::Transaction t;
                        setDisplayProjection(t, virtualDpy, mainDpyInfo);
                        t.apply();
                        orientation = mainDpyInfo.orientation;
                    }
                }
+4 −3
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ LOCAL_SRC_FILES:= \

LOCAL_SHARED_LIBRARIES := \
        libstagefright libmedia libutils libbinder libstagefright_foundation \
        libjpeg libgui libcutils liblog \
        libjpeg libui libgui libcutils liblog \
        libhidlmemory \
        android.hardware.media.omx@1.0 \

@@ -107,7 +107,7 @@ LOCAL_SRC_FILES:= \
        stream.cpp    \

LOCAL_SHARED_LIBRARIES := \
        libstagefright liblog libutils libbinder libgui \
        libstagefright liblog libutils libbinder libui libgui \
        libstagefright_foundation libmedia libcutils

LOCAL_C_INCLUDES:= \
@@ -132,7 +132,7 @@ LOCAL_SRC_FILES:= \

LOCAL_SHARED_LIBRARIES := \
        libstagefright liblog libutils libbinder libstagefright_foundation \
        libmedia libaudioclient libgui libcutils
        libmedia libaudioclient libui libgui libcutils

LOCAL_C_INCLUDES:= \
        frameworks/av/media/libstagefright \
@@ -163,6 +163,7 @@ LOCAL_SHARED_LIBRARIES := \
        libbinder \
        libstagefright_foundation \
        libmedia \
        libui \
        libgui \
        libcutils \
        libRScpp \
+4 −4
Original line number Diff line number Diff line
@@ -430,10 +430,10 @@ int main(int argc, char **argv) {
        CHECK(control != NULL);
        CHECK(control->isValid());

        SurfaceComposerClient::openGlobalTransaction();
        CHECK_EQ(control->setLayer(INT_MAX), (status_t)OK);
        CHECK_EQ(control->show(), (status_t)OK);
        SurfaceComposerClient::closeGlobalTransaction();
        SurfaceComposerClient::Transaction{}
                 .setLayer(control, INT_MAX)
                 .show(control)
                 .apply();

        surface = control->getSurface();
        CHECK(surface != NULL);
Loading