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

Issue 2623413004: [Remoting Android] Fix thread issue with OpenGL drawable (Closed)

Created:
3 years, 11 months ago by Yuwei
Modified:
3 years, 11 months ago
CC:
chromium-reviews, chromoting-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[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} Committed: https://chromium.googlesource.com/chromium/src/+/3ce1a24a7e23be0e5f01d38a943b51cf87a01895

Patch Set 1 : PTAL Point #

Total comments: 21

Patch Set 2 : PTAL / Rewrite #

Total comments: 8

Patch Set 3 : Reviewer's Feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -4 lines) Patch
M remoting/client/display/gl_renderer.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M remoting/client/jni/jni_gl_display_handler.cc View 1 2 6 chunks +30 lines, -4 lines 0 comments Download

Messages

Total messages: 28 (8 generated)
Yuwei
PTAL https://codereview.chromium.org/2623413004/diff/1/remoting/client/display/gl_cursor.h File remoting/client/display/gl_cursor.h (left): https://codereview.chromium.org/2623413004/diff/1/remoting/client/display/gl_cursor.h#oldcode64 remoting/client/display/gl_cursor.h:64: base::ThreadChecker thread_checker_; Removed thread_checker_ entirely since it's only ...
3 years, 11 months ago (2017-01-13 01:29:00 UTC) #2
Yuwei
Sorry... Got used to the [chromoting.com] prefix...
3 years, 11 months ago (2017-01-13 01:32:14 UTC) #4
Sergey Ulanov
I think a better fix would be to make JniGlDisplayHandler to construct the renderer on ...
3 years, 11 months ago (2017-01-13 02:03:10 UTC) #5
Sergey Ulanov
https://codereview.chromium.org/2623413004/diff/1/remoting/client/display/gl_cursor.h File remoting/client/display/gl_cursor.h (left): https://codereview.chromium.org/2623413004/diff/1/remoting/client/display/gl_cursor.h#oldcode64 remoting/client/display/gl_cursor.h:64: base::ThreadChecker thread_checker_; On 2017/01/13 02:03:10, Sergey Ulanov wrote: > ...
3 years, 11 months ago (2017-01-13 02:06:19 UTC) #6
Yuwei
I think it makes more sense to refactor the code before trying to fix this ...
3 years, 11 months ago (2017-01-13 02:21:09 UTC) #7
joedow
https://codereview.chromium.org/2623413004/diff/1/remoting/client/display/gl_cursor.h File remoting/client/display/gl_cursor.h (left): https://codereview.chromium.org/2623413004/diff/1/remoting/client/display/gl_cursor.h#oldcode64 remoting/client/display/gl_cursor.h:64: base::ThreadChecker thread_checker_; On 2017/01/13 02:21:08, Yuwei wrote: > On ...
3 years, 11 months ago (2017-01-13 16:09:34 UTC) #8
Sergey Ulanov
+nicholss@
3 years, 11 months ago (2017-01-13 16:16:33 UTC) #10
nicholss
I do not see a test that added that proves this has any issue currently. ...
3 years, 11 months ago (2017-01-13 16:45:01 UTC) #11
chromium-reviews
Sorry for the lack of communication before sending out this CL. Most classes are able ...
3 years, 11 months ago (2017-01-13 17:56:20 UTC) #12
Yuwei
PTAL. I've rewritten the CL such that JniGlDisplayHandler::Core creates GlRenderer on display thread. Ideally GlRenderer ...
3 years, 11 months ago (2017-01-13 20:17:27 UTC) #13
Yuwei
On 2017/01/13 20:17:27, Yuwei wrote: > PTAL. > > I've rewritten the CL such that ...
3 years, 11 months ago (2017-01-17 19:48:52 UTC) #14
nicholss
On 2017/01/17 19:48:52, Yuwei wrote: > On 2017/01/13 20:17:27, Yuwei wrote: > > PTAL. > ...
3 years, 11 months ago (2017-01-17 19:52:23 UTC) #15
Yuwei
On 2017/01/17 19:52:23, nicholss wrote: > On 2017/01/17 19:48:52, Yuwei wrote: > > On 2017/01/13 ...
3 years, 11 months ago (2017-01-17 20:00:29 UTC) #16
Yuwei
On 2017/01/17 20:00:29, Yuwei wrote: > On 2017/01/17 19:52:23, nicholss wrote: > > On 2017/01/17 ...
3 years, 11 months ago (2017-01-17 20:05:40 UTC) #17
Sergey Ulanov
lgtm when my comments are addressed https://codereview.chromium.org/2623413004/diff/20001/remoting/client/jni/jni_gl_display_handler.cc File remoting/client/jni/jni_gl_display_handler.cc (right): https://codereview.chromium.org/2623413004/diff/20001/remoting/client/jni/jni_gl_display_handler.cc#newcode85 remoting/client/jni/jni_gl_display_handler.cc:85: Initialize(); runtime_->display_task_runner()->PostTask( FROM_HERE, ...
3 years, 11 months ago (2017-01-18 22:33:41 UTC) #18
Yuwei
https://codereview.chromium.org/2623413004/diff/20001/remoting/client/jni/jni_gl_display_handler.cc File remoting/client/jni/jni_gl_display_handler.cc (right): https://codereview.chromium.org/2623413004/diff/20001/remoting/client/jni/jni_gl_display_handler.cc#newcode85 remoting/client/jni/jni_gl_display_handler.cc:85: Initialize(); On 2017/01/18 22:33:40, Sergey Ulanov wrote: > runtime_->display_task_runner()->PostTask( ...
3 years, 11 months ago (2017-01-18 23:11:56 UTC) #20
Sergey Ulanov
https://codereview.chromium.org/2623413004/diff/20001/remoting/client/jni/jni_gl_display_handler.cc File remoting/client/jni/jni_gl_display_handler.cc (right): https://codereview.chromium.org/2623413004/diff/20001/remoting/client/jni/jni_gl_display_handler.cc#newcode85 remoting/client/jni/jni_gl_display_handler.cc:85: Initialize(); On 2017/01/18 23:11:56, Yuwei wrote: > On 2017/01/18 ...
3 years, 11 months ago (2017-01-18 23:32:43 UTC) #21
Yuwei
Thanks! https://codereview.chromium.org/2623413004/diff/20001/remoting/client/jni/jni_gl_display_handler.cc File remoting/client/jni/jni_gl_display_handler.cc (right): https://codereview.chromium.org/2623413004/diff/20001/remoting/client/jni/jni_gl_display_handler.cc#newcode85 remoting/client/jni/jni_gl_display_handler.cc:85: Initialize(); On 2017/01/18 23:32:43, Sergey Ulanov wrote: > ...
3 years, 11 months ago (2017-01-19 00:27:33 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2623413004/60001
3 years, 11 months ago (2017-01-19 00:31:13 UTC) #25
commit-bot: I haz the power
3 years, 11 months ago (2017-01-19 00:50:08 UTC) #28
Message was sent while issue was closed.
Committed patchset #3 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/3ce1a24a7e23be0e5f01d38a943b...

Powered by Google App Engine
This is Rietveld 408576698