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

Unified Diff: android_webview/native/aw_contents.cc

Issue 561553002: aw: Invalidate view on hardware teardown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « android_webview/java/src/org/chromium/android_webview/AwContents.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/aw_contents.cc
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
index e38fd5e1fc4131ffcba3c909295bde4f6367611a..4f6a069dcd823eec41315062f881b63569e9ba97 100644
--- a/android_webview/native/aw_contents.cc
+++ b/android_webview/native/aw_contents.cc
@@ -899,6 +899,11 @@ void AwContents::OnDetachedFromWindow(JNIEnv* env, jobject obj) {
void AwContents::ReleaseHardwareDrawIfNeeded() {
InsideHardwareReleaseReset inside_reset(&shared_renderer_state_);
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
+ if (!obj.is_null())
+ Java_AwContents_invalidateOnFunctorDestroy(env, obj.obj());
+
bool hardware_initialized = browser_view_renderer_.hardware_enabled();
if (hardware_initialized) {
bool draw_functor_succeeded = RequestDrawGL(NULL, true);
« no previous file with comments | « android_webview/java/src/org/chromium/android_webview/AwContents.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698