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

Unified Diff: android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java

Issue 1943963003: WIP Handle AwContents needing multiple live functors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: PS7 comments 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 side-by-side diff with in-line comments
Download patch
Index: android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java
diff --git a/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java b/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java
index da0009eb9f184705d73b28f68d93883c2ebcad35..7d794602edc90fa913e50d409d3582e9e0f6f2f5 100644
--- a/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java
+++ b/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java
@@ -146,7 +146,6 @@ public class AwTestContainerView extends FrameLayout {
public void requestRender(long viewContext, Canvas canvas, boolean waitForCompletion) {
synchronized (mSyncLock) {
assert viewContext != 0;
- assert mViewContext == 0 || mViewContext == viewContext;
mViewContext = viewContext;
super.requestRender();
mFunctorAttached = true;
@@ -183,6 +182,7 @@ public class AwTestContainerView extends FrameLayout {
final boolean draw;
final boolean process;
final boolean waitForCompletion;
+ final long viewContext;
synchronized (mSyncLock) {
if (!mFunctorAttached) {
@@ -193,9 +193,9 @@ public class AwTestContainerView extends FrameLayout {
draw = mNeedsDrawGL;
process = mNeedsProcessGL;
waitForCompletion = mWaitForCompletion;
-
+ viewContext = mViewContext;
if (draw) {
- DrawGL.drawGL(mDrawGL, mViewContext, width, height, 0, 0, MODE_SYNC);
+ DrawGL.drawGL(mDrawGL, viewContext, width, height, 0, 0, MODE_SYNC);
mCommittedScrollX = mLastScrollX;
mCommittedScrollY = mLastScrollY;
}
@@ -206,11 +206,11 @@ public class AwTestContainerView extends FrameLayout {
}
}
if (process) {
- DrawGL.drawGL(mDrawGL, mViewContext, width, height, 0, 0, MODE_PROCESS);
+ DrawGL.drawGL(mDrawGL, viewContext, width, height, 0, 0, MODE_PROCESS);
}
if (process || draw) {
- DrawGL.drawGL(mDrawGL, mViewContext, width, height,
- mCommittedScrollX, mCommittedScrollY, MODE_DRAW);
+ DrawGL.drawGL(mDrawGL, viewContext, width, height, mCommittedScrollX,
+ mCommittedScrollY, MODE_DRAW);
}
if (waitForCompletion) {

Powered by Google App Engine
This is Rietveld 408576698