| Index: android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java
|
| diff --git a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java
|
| index 830425c7d5b1c43be51cf9721c409597e9dba209..278f2f64e14dd0e2b9770627641aa7018190c898 100644
|
| --- a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java
|
| +++ b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java
|
| @@ -272,8 +272,8 @@ class WebViewChromium implements WebViewProvider, WebViewProvider.ScrollDelegate
|
| || mAppTargetSdkVersion < Build.VERSION_CODES.LOLLIPOP);
|
|
|
| mAwContents = new AwContents(mFactory.getBrowserContext(), mWebView, mContext,
|
| - new InternalAccessAdapter(), new WebViewNativeGLDelegate(), mContentsClientAdapter,
|
| - mWebSettings.getAwSettings());
|
| + new InternalAccessAdapter(), new WebViewNativeDrawGLFunctorFactory(),
|
| + mContentsClientAdapter, mWebSettings.getAwSettings());
|
|
|
| if (mAppTargetSdkVersion >= Build.VERSION_CODES.KITKAT) {
|
| // On KK and above, favicons are automatically downloaded as the method
|
| @@ -2240,30 +2240,12 @@ class WebViewChromium implements WebViewProvider, WebViewProvider.ScrollDelegate
|
| checkThread();
|
| return new AwPrintDocumentAdapter(mAwContents.getPdfExporter(), documentName);
|
| }
|
| -
|
| - // AwContents.NativeGLDelegate implementation --------------------------------------
|
| - private class WebViewNativeGLDelegate implements AwContents.NativeGLDelegate {
|
| + // AwContents.NativeDrawGLFunctorFactory implementation ----------------------------------
|
| + private class WebViewNativeDrawGLFunctorFactory
|
| + implements AwContents.NativeDrawGLFunctorFactory {
|
| @Override
|
| - public boolean supportsDrawGLFunctorReleasedCallback() {
|
| - return DrawGLFunctor.supportsDrawGLFunctorReleasedCallback();
|
| - }
|
| -
|
| - @Override
|
| - public boolean requestDrawGL(Canvas canvas, boolean waitForCompletion, View containerView,
|
| - Runnable releasedCallback) {
|
| - if (mGLfunctor == null) {
|
| - mGLfunctor = new DrawGLFunctor(
|
| - mAwContents.getAwDrawGLViewContext(), mFactory.getWebViewDelegate());
|
| - }
|
| - return mGLfunctor.requestDrawGL(
|
| - canvas, containerView, waitForCompletion, releasedCallback);
|
| - }
|
| -
|
| - @Override
|
| - public void detachGLFunctor() {
|
| - if (mGLfunctor != null) {
|
| - mGLfunctor.detach();
|
| - }
|
| + public AwContents.NativeDrawGLFunctor createFunctor(long context) {
|
| + return new DrawGLFunctor(context, mFactory.getWebViewDelegate());
|
| }
|
| }
|
|
|
|
|