diff options
author | Hui Shu <hush@google.com> | 2014-11-03 17:07:17 -0800 |
---|---|---|
committer | Hui Shu <hush@google.com> | 2014-11-03 17:19:05 -0800 |
commit | 81fb32c83e2964edaae128bf752c03c4bef8cd26 (patch) | |
tree | 96c5f2bd684b1c231966d9f003d1faa6ee26f3d4 /chromium/java/com | |
parent | b12c873f72ec666570321ac817e2eae1e01e1ab7 (diff) | |
download | webview-81fb32c83e2964edaae128bf752c03c4bef8cd26.tar.gz |
Fix RequestDrawGL logic.
We're not supposed to request a blocking DrawGL with a not null canvas.
Just throw an exception in this case.
Change-Id: I452e781577ab1040d06acfcba1d03646bab00fa4
Diffstat (limited to 'chromium/java/com')
-rw-r--r-- | chromium/java/com/android/webview/chromium/DrawGLFunctor.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chromium/java/com/android/webview/chromium/DrawGLFunctor.java b/chromium/java/com/android/webview/chromium/DrawGLFunctor.java index 7f7adeb..265bfd0 100644 --- a/chromium/java/com/android/webview/chromium/DrawGLFunctor.java +++ b/chromium/java/com/android/webview/chromium/DrawGLFunctor.java @@ -58,6 +58,11 @@ class DrawGLFunctor { if (mDestroyRunnable.mNativeDrawGLFunctor == 0) { throw new RuntimeException("requested DrawGL on already destroyed DrawGLFunctor"); } + + if (canvas != null && waitForCompletion) { + throw new IllegalArgumentException("requested a blocking DrawGL with a not null canvas."); + } + if (viewRootImpl == null) { // Can happen during teardown when window is leaked. return false; @@ -70,10 +75,6 @@ class DrawGLFunctor { } canvas.callDrawGLFunction(mDestroyRunnable.mNativeDrawGLFunctor); - if (waitForCompletion) { - viewRootImpl.invokeFunctor(mDestroyRunnable.mNativeDrawGLFunctor, - waitForCompletion); - } return true; } |