Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: android_webview/glue/java/src/com/android/webview/chromium/DrawGLFunctor.java

Issue 1989203003: Update checks for N+ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwContents.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package com.android.webview.chromium; 5 package com.android.webview.chromium;
6 6
7 import android.graphics.Canvas; 7 import android.graphics.Canvas;
8 import android.os.Build; 8 import android.os.Build;
9 import android.view.View; 9 import android.view.View;
10 10
(...skipping 21 matching lines...) Expand all
32 32
33 @Override 33 @Override
34 public void detach(View containerView) { 34 public void detach(View containerView) {
35 if (mDestroyRunnable.mNativeDrawGLFunctor == 0) { 35 if (mDestroyRunnable.mNativeDrawGLFunctor == 0) {
36 throw new RuntimeException("detach on already destroyed DrawGLFuncto r"); 36 throw new RuntimeException("detach on already destroyed DrawGLFuncto r");
37 } 37 }
38 mWebViewDelegate.detachDrawGlFunctor(containerView, mDestroyRunnable.mNa tiveDrawGLFunctor); 38 mWebViewDelegate.detachDrawGlFunctor(containerView, mDestroyRunnable.mNa tiveDrawGLFunctor);
39 } 39 }
40 40
41 private static final boolean sSupportFunctorReleasedCallback = 41 private static final boolean sSupportFunctorReleasedCallback =
42 (Build.VERSION.SDK_INT > Build.VERSION_CODES.M) || "N".equals(Build. VERSION.CODENAME); 42 (Build.VERSION.SDK_INT > Build.VERSION_CODES.M) || Build.VERSION.COD ENAME.equals("N");
43 43
44 @Override 44 @Override
45 public boolean requestDrawGL(Canvas canvas, Runnable releasedCallback) { 45 public boolean requestDrawGL(Canvas canvas, Runnable releasedCallback) {
46 if (mDestroyRunnable.mNativeDrawGLFunctor == 0) { 46 if (mDestroyRunnable.mNativeDrawGLFunctor == 0) {
47 throw new RuntimeException("requestDrawGL on already destroyed DrawG LFunctor"); 47 throw new RuntimeException("requestDrawGL on already destroyed DrawG LFunctor");
48 } 48 }
49 assert canvas != null; 49 assert canvas != null;
50 if (sSupportFunctorReleasedCallback) { 50 if (sSupportFunctorReleasedCallback) {
51 assert releasedCallback != null; 51 assert releasedCallback != null;
52 mWebViewDelegate.callDrawGlFunction( 52 mWebViewDelegate.callDrawGlFunction(
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 assert mNativeDrawGLFunctor != 0; 103 assert mNativeDrawGLFunctor != 0;
104 nativeDestroyGLFunctor(mNativeDrawGLFunctor); 104 nativeDestroyGLFunctor(mNativeDrawGLFunctor);
105 mNativeDrawGLFunctor = 0; 105 mNativeDrawGLFunctor = 0;
106 } 106 }
107 } 107 }
108 108
109 private static native long nativeCreateGLFunctor(long viewContext); 109 private static native long nativeCreateGLFunctor(long viewContext);
110 private static native void nativeDestroyGLFunctor(long functor); 110 private static native void nativeDestroyGLFunctor(long functor);
111 private static native void nativeSetChromiumAwDrawGLFunction(long functionPo inter); 111 private static native void nativeSetChromiumAwDrawGLFunction(long functionPo inter);
112 } 112 }
OLDNEW
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwContents.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698