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

Commit 93c590d6 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Remove legacy disable triple buffering config" into sc-dev am: e2895024

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13816683

Change-Id: Id0b5a73e2e64604c1b569947c42d92251be4768a
parents cd56ec0d e2895024
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1296,7 +1296,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
            mBlastBufferQueue.destroy();
        }
        mBlastBufferQueue = new BLASTBufferQueue(name, mBlastSurfaceControl, mSurfaceWidth,
                mSurfaceHeight, mFormat, true /* TODO */);
                mSurfaceHeight, mFormat);
    }

    private void onDrawFinished() {
+1 −5
Original line number Diff line number Diff line
@@ -330,7 +330,6 @@ public final class ViewRootImpl implements ViewParent,

    private boolean mUseBLASTAdapter;
    private boolean mForceDisableBLAST;
    private boolean mEnableTripleBuffering;

    private boolean mFastScrollSoundEffectsEnabled;

@@ -1180,9 +1179,6 @@ public final class ViewRootImpl implements ViewParent,
                if ((res & WindowManagerGlobal.ADD_FLAG_USE_BLAST) != 0) {
                    mUseBLASTAdapter = true;
                }
                if ((res & WindowManagerGlobal.ADD_FLAG_USE_TRIPLE_BUFFERING) != 0) {
                    mEnableTripleBuffering = true;
                }

                if (view instanceof RootViewSurfaceTaker) {
                    mInputQueueCallback =
@@ -1908,7 +1904,7 @@ public final class ViewRootImpl implements ViewParent,
        Surface ret = null;
        if (mBlastBufferQueue == null) {
            mBlastBufferQueue = new BLASTBufferQueue(mTag, mSurfaceControl, width, height,
                    format, mEnableTripleBuffering);
                    format);
            // We only return the Surface the first time, as otherwise
            // it hasn't changed and there is no need to update.
            ret = mBlastBufferQueue.createSurface();
+0 −1
Original line number Diff line number Diff line
@@ -118,7 +118,6 @@ public final class WindowManagerGlobal {

    public static final int ADD_FLAG_IN_TOUCH_MODE = 0x1;
    public static final int ADD_FLAG_APP_VISIBLE = 0x2;
    public static final int ADD_FLAG_USE_TRIPLE_BUFFERING = 0x4;
    public static final int ADD_FLAG_USE_BLAST = 0x8;

    /**
+3 −3
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ private:
};

static jlong nativeCreate(JNIEnv* env, jclass clazz, jstring jName, jlong surfaceControl,
                          jlong width, jlong height, jint format, jboolean enableTripleBuffering) {
                          jlong width, jlong height, jint format) {
    String8 str8;
    if (jName) {
        const jchar* str16 = env->GetStringCritical(jName, nullptr);
@@ -81,7 +81,7 @@ static jlong nativeCreate(JNIEnv* env, jclass clazz, jstring jName, jlong surfac
    std::string name = str8.string();
    sp<BLASTBufferQueue> queue =
            new BLASTBufferQueue(name, reinterpret_cast<SurfaceControl*>(surfaceControl), width,
                                 height, format, enableTripleBuffering);
                                 height, format);
    queue->incStrong((void*)nativeCreate);
    return reinterpret_cast<jlong>(queue.get());
}
@@ -140,7 +140,7 @@ static void nativeSetTransactionCompleteCallback(JNIEnv* env, jclass clazz, jlon
static const JNINativeMethod gMethods[] = {
        /* name, signature, funcPtr */
        // clang-format off
        {"nativeCreate", "(Ljava/lang/String;JJJIZ)J", (void*)nativeCreate},
        {"nativeCreate", "(Ljava/lang/String;JJJI)J", (void*)nativeCreate},
        {"nativeGetSurface", "(JZ)Landroid/view/Surface;", (void*)nativeGetSurface},
        {"nativeDestroy", "(J)V", (void*)nativeDestroy},
        {"nativeSetNextTransaction", "(JJ)V", (void*)nativeSetNextTransaction},
+3 −4
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ public final class BLASTBufferQueue {
    public long mNativeObject; // BLASTBufferQueue*

    private static native long nativeCreate(String name, long surfaceControl, long width,
            long height, int format, boolean tripleBufferingEnabled);
            long height, int format);
    private static native void nativeDestroy(long ptr);
    private static native Surface nativeGetSurface(long ptr, boolean includeSurfaceControlHandle);
    private static native void nativeSetNextTransaction(long ptr, long transactionPtr);
@@ -53,9 +53,8 @@ public final class BLASTBufferQueue {

    /** Create a new connection with the surface flinger. */
    public BLASTBufferQueue(String name, SurfaceControl sc, int width, int height,
            @PixelFormat.Format int format, boolean tripleBufferingEnabled) {
        mNativeObject = nativeCreate(name, sc.mNativeObject, width, height, format,
                tripleBufferingEnabled);
            @PixelFormat.Format int format) {
        mNativeObject = nativeCreate(name, sc.mNativeObject, width, height, format);
    }

    public void destroy() {
Loading