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

Commit 096f5579 authored by Teng-Hui Zhu's avatar Teng-Hui Zhu
Browse files

Revert "Hack to workaround the fact that the EGL context can be"

This reverts commit 2bc0b01f.

A hack no longer needed.

Change-Id: Ia5162535e6683919c368f93428bac0fb258af506
parent a34eb91a
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -125,12 +125,6 @@ import java.util.Vector;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLContext;
import javax.microedition.khronos.egl.EGLDisplay;

import static javax.microedition.khronos.egl.EGL10.EGL_DEFAULT_DISPLAY;

/**
 * <p>A View that displays web pages. This class is the basis upon which you
 * can roll your own web browser or simply display some online content within your Activity.
@@ -976,9 +970,6 @@ public class WebView extends AbsoluteLayout
    private Rect mScrollingLayerBounds = new Rect();
    private boolean mSentAutoScrollMessage = false;

    // Temporary hack to work around the context removal upon memory pressure
    private static boolean mIncrementEGLContextHack = false;

    // used for serializing asynchronously handled touch events.
    private final TouchEventQueue mTouchEventQueue = new TouchEventQueue();

@@ -4385,13 +4376,6 @@ public class WebView extends AbsoluteLayout
        }

        if (canvas.isHardwareAccelerated()) {
            if (mIncrementEGLContextHack == false) {
                mIncrementEGLContextHack = true;
                EGL10 egl = (EGL10) EGLContext.getEGL();
                EGLDisplay eglDisplay = egl.eglGetDisplay(EGL_DEFAULT_DISPLAY);
                int[] version = new int[2];
                egl.eglInitialize(eglDisplay, version);
            }
            mZoomManager.setHardwareAccelerated();
        }