New issue
Advanced search Search tips

Issue 680800 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug-Regression



Sign in to add a comment

[Remoting Android] OpenGL Drawable GetWeakPtr thread issue

Project Member Reported by yuweih@chromium.org, Jan 13 2017

Issue description

JniGlDisplayHandler calls CreateGlRendererWithDesktop() on unspecified thread, which binds ThreadCheckers in all Drawables to that thread.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3ce1a24a7e23be0e5f01d38a943b51cf87a01895

commit 3ce1a24a7e23be0e5f01d38a943b51cf87a01895
Author: yuweih <yuweih@chromium.org>
Date: Thu Jan 19 00:49:28 2017

[Remoting Android] Fix thread issue with OpenGL drawable

This CL has these changes:
* Store drawable's weak_ptr in ctor rather than using thread checker
  to check the thread safety of GetWeakPtr() since GetWeakPtr() is called
  in multiple threads.
* Avoid all attempts in CreateGlRendererWithDesktop() to dereference
  any weak pointer since CreateGlRendererWithDesktop() is supposed to be
  called on any thread.
* DCHECK the thread in AddDrawable(). AddDrawable is never safe to be called
  on a different thread once GlRenderer gets any side effect.

BUG= 680800 

Review-Url: https://codereview.chromium.org/2623413004
Cr-Commit-Position: refs/heads/master@{#444574}

[modify] https://crrev.com/3ce1a24a7e23be0e5f01d38a943b51cf87a01895/remoting/client/display/gl_renderer.h
[modify] https://crrev.com/3ce1a24a7e23be0e5f01d38a943b51cf87a01895/remoting/client/jni/jni_gl_display_handler.cc

Comment 2 by yuweih@chromium.org, Jan 23 2017

Status: Fixed (was: Assigned)

Sign in to add a comment