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

Issue 2591363002: Adding drawable to CRD andorid and iOS gl rendering pipeline. (Closed)

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

Description

Adding drawable to CRD andorid and iOS gl rendering pipeline. This work is to support more generic rendering for mobile platforms. The thinking behind using a stack of 'drawable' objects is we could add future features like fps stats or more animations, and also add debug screens to apps in development for gesture feedback and connection health. R=yuweih@chromium.org BUG=671692 Review-Url: https://codereview.chromium.org/2591363002 Cr-Commit-Position: refs/heads/master@{#443246} Committed: https://chromium.googlesource.com/chromium/src/+/f62cc8a96c95682f25b90b9f5264b4ecd9c30613

Patch Set 1 #

Patch Set 2 : Minor cleanup of an unused const. #

Total comments: 74

Patch Set 3 : Cleanup and adding interfaces based on review feedback.: #

Total comments: 8

Patch Set 4 : Fixing compile errors for android and linux. Plus addressing feedback. #

Patch Set 5 : More special casing for Android and windows. #

Total comments: 4

Patch Set 6 : Trying to fix android. #

Total comments: 61

Patch Set 7 : removing include of EGL. #

Patch Set 8 : Adding public_configs for khronos_headers. #

Patch Set 9 : Changing a bunch of nits. #

Total comments: 4

Patch Set 10 : Finished next round of feedback changes. Added more weakptrs for canvas passing. #

Total comments: 33

Patch Set 11 : Trimming down the Drawable interface, removing Get/Set ZIndex; it is just ZIndex now. Fixing Test. #

Patch Set 12 : Woops, wrong unique_ptr. Typo. #

Total comments: 12

Patch Set 13 : More like GetZIndex. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+551 lines, -217 lines) Patch
M remoting/client/display/BUILD.gn View 1 2 3 4 5 6 7 8 9 4 chunks +33 lines, -23 lines 0 comments Download
A + remoting/client/display/canvas.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +22 lines, -42 lines 0 comments Download
A remoting/client/display/drawable.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +49 lines, -0 lines 0 comments Download
A remoting/client/display/fake_canvas.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +43 lines, -0 lines 0 comments Download
A remoting/client/display/fake_canvas.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +37 lines, -0 lines 0 comments Download
M remoting/client/display/gl_canvas.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +14 lines, -41 lines 0 comments Download
M remoting/client/display/gl_canvas.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +21 lines, -4 lines 0 comments Download
M remoting/client/display/gl_cursor.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +14 lines, -9 lines 0 comments Download
M remoting/client/display/gl_cursor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +14 lines, -3 lines 0 comments Download
M remoting/client/display/gl_cursor_feedback.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +15 lines, -12 lines 0 comments Download
M remoting/client/display/gl_cursor_feedback.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +13 lines, -3 lines 0 comments Download
M remoting/client/display/gl_desktop.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +14 lines, -11 lines 0 comments Download
M remoting/client/display/gl_desktop.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +19 lines, -7 lines 0 comments Download
M remoting/client/display/gl_render_layer.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +5 lines, -3 lines 0 comments Download
M remoting/client/display/gl_render_layer.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M remoting/client/display/gl_renderer.h View 1 2 5 chunks +11 lines, -3 lines 0 comments Download
M remoting/client/display/gl_renderer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +38 lines, -25 lines 2 comments Download
M remoting/client/display/gl_renderer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +161 lines, -15 lines 0 comments Download
M remoting/client/jni/jni_gl_display_handler.cc View 1 2 3 4 5 6 7 8 7 chunks +19 lines, -14 lines 0 comments Download
M remoting/proto/BUILD.gn View 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 81 (44 generated)
Yuwei
https://codereview.chromium.org/2591363002/diff/20001/remoting/client/BUILD.gn File remoting/client/BUILD.gn (left): https://codereview.chromium.org/2591363002/diff/20001/remoting/client/BUILD.gn#oldcode99 remoting/client/BUILD.gn:99: "//remoting/proto", Is this because iOS doesn't support some of ...
4 years ago (2016-12-21 23:41:59 UTC) #3
Yuwei
Also I'm not an owner of client/ so you will need to grab another guy ...
4 years ago (2016-12-21 23:56:04 UTC) #4
joedow
https://codereview.chromium.org/2591363002/diff/20001/remoting/client/gl_canvas.cc File remoting/client/gl_canvas.cc (right): https://codereview.chromium.org/2591363002/diff/20001/remoting/client/gl_canvas.cc#newcode77 remoting/client/gl_canvas.cc:77: #endif Can you reuse the Clear() method after everything ...
4 years ago (2016-12-22 00:29:03 UTC) #6
nicholss
Working on some changes... https://codereview.chromium.org/2591363002/diff/20001/remoting/client/BUILD.gn File remoting/client/BUILD.gn (left): https://codereview.chromium.org/2591363002/diff/20001/remoting/client/BUILD.gn#oldcode99 remoting/client/BUILD.gn:99: "//remoting/proto", On 2016/12/21 23:41:58, Yuwei ...
4 years ago (2016-12-22 16:21:42 UTC) #7
Yuwei
https://codereview.chromium.org/2591363002/diff/20001/remoting/client/gl_canvas.h File remoting/client/gl_canvas.h (right): https://codereview.chromium.org/2591363002/diff/20001/remoting/client/gl_canvas.h#newcode101 remoting/client/gl_canvas.h:101: class FakeGlCanvas : public GlCanvas { On 2016/12/22 16:21:41, ...
4 years ago (2016-12-22 19:01:10 UTC) #8
joedow
https://codereview.chromium.org/2591363002/diff/20001/remoting/client/gl_canvas.cc File remoting/client/gl_canvas.cc (right): https://codereview.chromium.org/2591363002/diff/20001/remoting/client/gl_canvas.cc#newcode101 remoting/client/gl_canvas.cc:101: if (gl_constructed_) { On 2016/12/22 16:21:41, nicholss wrote: > ...
4 years ago (2016-12-22 19:18:10 UTC) #9
Sergey Ulanov
https://codereview.chromium.org/2591363002/diff/20001/remoting/client/gl_canvas.cc File remoting/client/gl_canvas.cc (right): https://codereview.chromium.org/2591363002/diff/20001/remoting/client/gl_canvas.cc#newcode101 remoting/client/gl_canvas.cc:101: if (gl_constructed_) { On 2016/12/22 19:18:09, joedow wrote: > ...
4 years ago (2016-12-22 22:38:46 UTC) #11
nicholss
On 2016/12/22 22:38:46, Sergey Ulanov wrote: > https://codereview.chromium.org/2591363002/diff/20001/remoting/client/gl_canvas.cc > File remoting/client/gl_canvas.cc (right): > > https://codereview.chromium.org/2591363002/diff/20001/remoting/client/gl_canvas.cc#newcode101 ...
4 years ago (2016-12-22 22:56:24 UTC) #12
Yuwei
On 2016/12/22 22:56:24, nicholss wrote: > On 2016/12/22 22:38:46, Sergey Ulanov wrote: > > > ...
4 years ago (2016-12-22 23:07:44 UTC) #13
nicholss
On 2016/12/22 23:07:44, Yuwei wrote: > On 2016/12/22 22:56:24, nicholss wrote: > > On 2016/12/22 ...
4 years ago (2016-12-22 23:11:02 UTC) #14
Sergey Ulanov
On 2016/12/22 23:11:02, nicholss wrote: > On 2016/12/22 23:07:44, Yuwei wrote: > > The reason ...
3 years, 12 months ago (2016-12-27 21:00:10 UTC) #15
Sergey Ulanov
https://codereview.chromium.org/2591363002/diff/20001/remoting/client/gl_renderer.cc File remoting/client/gl_renderer.cc (right): https://codereview.chromium.org/2591363002/diff/20001/remoting/client/gl_renderer.cc#newcode132 remoting/client/gl_renderer.cc:132: return weak_factory_.GetWeakPtr(); On 2016/12/22 19:18:09, joedow wrote: > On ...
3 years, 12 months ago (2016-12-27 21:00:19 UTC) #16
Yuwei
On 2016/12/27 21:00:19, Sergey Ulanov wrote: > https://codereview.chromium.org/2591363002/diff/20001/remoting/client/gl_renderer.cc > File remoting/client/gl_renderer.cc (right): > > https://codereview.chromium.org/2591363002/diff/20001/remoting/client/gl_renderer.cc#newcode132 ...
3 years, 12 months ago (2016-12-27 21:39:17 UTC) #17
nicholss
Update CL, note that I moved files supported by https://codereview.chromium.org/2614443003/ PTAL, I think I have ...
3 years, 11 months ago (2017-01-09 18:50:25 UTC) #18
Yuwei
https://codereview.chromium.org/2591363002/diff/20001/remoting/client/gl_canvas.cc File remoting/client/gl_canvas.cc (right): https://codereview.chromium.org/2591363002/diff/20001/remoting/client/gl_canvas.cc#newcode101 remoting/client/gl_canvas.cc:101: if (gl_constructed_) { On 2017/01/09 18:50:23, nicholss wrote: > ...
3 years, 11 months ago (2017-01-09 20:28:52 UTC) #23
nicholss
https://codereview.chromium.org/2591363002/diff/40001/remoting/client/display/gl_canvas.h File remoting/client/display/gl_canvas.h (right): https://codereview.chromium.org/2591363002/diff/40001/remoting/client/display/gl_canvas.h#newcode71 remoting/client/display/gl_canvas.h:71: GlCanvas(); On 2017/01/09 20:28:52, Yuwei wrote: > Where is ...
3 years, 11 months ago (2017-01-09 20:39:24 UTC) #24
Yuwei
https://codereview.chromium.org/2591363002/diff/40001/remoting/client/display/gl_renderer.h File remoting/client/display/gl_renderer.h (right): https://codereview.chromium.org/2591363002/diff/40001/remoting/client/display/gl_renderer.h#newcode134 remoting/client/display/gl_renderer.h:134: std::vector<base::WeakPtr<Drawable>> drawables_; On 2017/01/09 20:39:24, nicholss wrote: > On ...
3 years, 11 months ago (2017-01-09 22:41:54 UTC) #31
nicholss
https://codereview.chromium.org/2591363002/diff/80001/remoting/client/display/sys_opengl.h File remoting/client/display/sys_opengl.h (right): https://codereview.chromium.org/2591363002/diff/80001/remoting/client/display/sys_opengl.h#newcode21 remoting/client/display/sys_opengl.h:21: #include <EGL/egl.h> On 2017/01/09 22:41:54, Yuwei wrote: > Why ...
3 years, 11 months ago (2017-01-09 22:51:13 UTC) #32
Yuwei
https://codereview.chromium.org/2591363002/diff/80001/remoting/client/display/sys_opengl.h File remoting/client/display/sys_opengl.h (right): https://codereview.chromium.org/2591363002/diff/80001/remoting/client/display/sys_opengl.h#newcode21 remoting/client/display/sys_opengl.h:21: #include <EGL/egl.h> On 2017/01/09 22:51:12, nicholss wrote: > On ...
3 years, 11 months ago (2017-01-09 23:06:37 UTC) #35
Yuwei
https://codereview.chromium.org/2591363002/diff/100001/remoting/client/jni/jni_gl_display_handler.cc File remoting/client/jni/jni_gl_display_handler.cc (right): https://codereview.chromium.org/2591363002/diff/100001/remoting/client/jni/jni_gl_display_handler.cc#newcode132 remoting/client/jni/jni_gl_display_handler.cc:132: renderer_->OnSurfaceCreated(std::make_unique<GlCanvas>( Use base::MakeUnique<Type>(arguments...) and no need to new. renderer_->OnSurfaceCreated(base::MakeUnique<GlCanvas>(static_cast<int>(egl_context_->client_version()))); ...
3 years, 11 months ago (2017-01-09 23:11:52 UTC) #36
joedow
https://codereview.chromium.org/2591363002/diff/100001/remoting/client/display/canvas.h File remoting/client/display/canvas.h (right): https://codereview.chromium.org/2591363002/diff/100001/remoting/client/display/canvas.h#newcode11 remoting/client/display/canvas.h:11: #include "base/threading/thread_checker.h" Remote thread_checker header since it is no ...
3 years, 11 months ago (2017-01-10 00:19:44 UTC) #41
nicholss
https://codereview.chromium.org/2591363002/diff/100001/remoting/client/display/canvas.h File remoting/client/display/canvas.h (right): https://codereview.chromium.org/2591363002/diff/100001/remoting/client/display/canvas.h#newcode11 remoting/client/display/canvas.h:11: #include "base/threading/thread_checker.h" On 2017/01/10 00:19:43, joedow wrote: > Remote ...
3 years, 11 months ago (2017-01-10 16:58:34 UTC) #45
joedow
https://codereview.chromium.org/2591363002/diff/100001/remoting/client/display/canvas.h File remoting/client/display/canvas.h (right): https://codereview.chromium.org/2591363002/diff/100001/remoting/client/display/canvas.h#newcode20 remoting/client/display/canvas.h:20: Canvas(){}; On 2017/01/10 16:58:34, nicholss wrote: > On 2017/01/10 ...
3 years, 11 months ago (2017-01-10 18:49:27 UTC) #47
Yuwei
https://codereview.chromium.org/2591363002/diff/100001/remoting/client/display/canvas.h File remoting/client/display/canvas.h (right): https://codereview.chromium.org/2591363002/diff/100001/remoting/client/display/canvas.h#newcode60 remoting/client/display/canvas.h:60: // Version if applicable to implementation. On 2017/01/10 16:58:34, ...
3 years, 11 months ago (2017-01-10 19:36:10 UTC) #50
nicholss
PTAL https://codereview.chromium.org/2591363002/diff/100001/remoting/client/display/canvas.h File remoting/client/display/canvas.h (right): https://codereview.chromium.org/2591363002/diff/100001/remoting/client/display/canvas.h#newcode67 remoting/client/display/canvas.h:67: DISALLOW_COPY_AND_ASSIGN(Canvas); On 2017/01/10 00:19:43, joedow wrote: > Add ...
3 years, 11 months ago (2017-01-10 21:43:10 UTC) #51
joedow
lgtm https://codereview.chromium.org/2591363002/diff/160001/remoting/client/display/canvas.h File remoting/client/display/canvas.h (right): https://codereview.chromium.org/2591363002/diff/160001/remoting/client/display/canvas.h#newcode59 remoting/client/display/canvas.h:59: // Version if applicable to implementation. Can this ...
3 years, 11 months ago (2017-01-10 22:01:55 UTC) #54
Yuwei
LGTM https://codereview.chromium.org/2591363002/diff/160001/remoting/client/display/gl_cursor.cc File remoting/client/display/gl_cursor.cc (right): https://codereview.chromium.org/2591363002/diff/160001/remoting/client/display/gl_cursor.cc#newcode78 remoting/client/display/gl_cursor.cc:78: layer_.reset(new GlRenderLayer(kGlCursorTextureId, canvas->GetWeakPtr())); Just pass canvas. No need ...
3 years, 11 months ago (2017-01-10 22:09:53 UTC) #55
Sergey Ulanov
https://codereview.chromium.org/2591363002/diff/100001/remoting/client/display/canvas.h File remoting/client/display/canvas.h (right): https://codereview.chromium.org/2591363002/diff/100001/remoting/client/display/canvas.h#newcode20 remoting/client/display/canvas.h:20: Canvas(){}; On 2017/01/10 18:49:27, joedow wrote: > On 2017/01/10 ...
3 years, 11 months ago (2017-01-10 23:07:18 UTC) #56
Sergey Ulanov
https://codereview.chromium.org/2591363002/diff/160001/remoting/client/display/canvas.h File remoting/client/display/canvas.h (right): https://codereview.chromium.org/2591363002/diff/160001/remoting/client/display/canvas.h#newcode21 remoting/client/display/canvas.h:21: virtual ~Canvas(){}; remove ; in these two lines https://codereview.chromium.org/2591363002/diff/160001/remoting/client/display/canvas.h#newcode56 ...
3 years, 11 months ago (2017-01-10 23:24:02 UTC) #57
nicholss
PTAL. Comments have been addressed. https://codereview.chromium.org/2591363002/diff/160001/remoting/client/display/canvas.h File remoting/client/display/canvas.h (right): https://codereview.chromium.org/2591363002/diff/160001/remoting/client/display/canvas.h#newcode56 remoting/client/display/canvas.h:56: GLuint vertex_buffer, On 2017/01/10 ...
3 years, 11 months ago (2017-01-11 18:56:44 UTC) #63
Yuwei
https://codereview.chromium.org/2591363002/diff/160001/remoting/client/display/drawable.h File remoting/client/display/drawable.h (right): https://codereview.chromium.org/2591363002/diff/160001/remoting/client/display/drawable.h#newcode38 remoting/client/display/drawable.h:38: int GetZIndex() { return z_index_; }; On 2017/01/11 18:56:43, ...
3 years, 11 months ago (2017-01-11 19:16:58 UTC) #65
Sergey Ulanov
lgtm when my comments are addressed https://codereview.chromium.org/2591363002/diff/160001/remoting/client/display/drawable.h File remoting/client/display/drawable.h (right): https://codereview.chromium.org/2591363002/diff/160001/remoting/client/display/drawable.h#newcode38 remoting/client/display/drawable.h:38: int GetZIndex() { ...
3 years, 11 months ago (2017-01-11 22:47:31 UTC) #68
nicholss
Will commit after tests are green again. Thanks for reviewing. https://codereview.chromium.org/2591363002/diff/160001/remoting/client/display/gl_renderer.cc File remoting/client/display/gl_renderer.cc (right): https://codereview.chromium.org/2591363002/diff/160001/remoting/client/display/gl_renderer.cc#newcode27 ...
3 years, 11 months ago (2017-01-11 23:43:25 UTC) #71
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/2591363002/220001
3 years, 11 months ago (2017-01-12 16:00:44 UTC) #76
commit-bot: I haz the power
Committed patchset #13 (id:220001) as https://chromium.googlesource.com/chromium/src/+/f62cc8a96c95682f25b90b9f5264b4ecd9c30613
3 years, 11 months ago (2017-01-12 16:09:22 UTC) #79
Yuwei
https://codereview.chromium.org/2591363002/diff/220001/remoting/client/display/gl_renderer.cc File remoting/client/display/gl_renderer.cc (right): https://codereview.chromium.org/2591363002/diff/220001/remoting/client/display/gl_renderer.cc#newcode177 remoting/client/display/gl_renderer.cc:177: renderer->AddDrawable(renderer->desktop_.GetWeakPtr()); Sorry that I haven't spied the bug here. ...
3 years, 11 months ago (2017-01-12 23:23:17 UTC) #80
joedow
3 years, 11 months ago (2017-01-13 15:49:45 UTC) #81
Message was sent while issue was closed.
https://codereview.chromium.org/2591363002/diff/220001/remoting/client/displa...
File remoting/client/display/gl_renderer.cc (right):

https://codereview.chromium.org/2591363002/diff/220001/remoting/client/displa...
remoting/client/display/gl_renderer.cc:177:
renderer->AddDrawable(renderer->desktop_.GetWeakPtr());
On 2017/01/12 23:23:17, Yuwei wrote:
> Sorry that I haven't spied the bug here. The thread checkers of these
drawables
> will be bound to whatever thread CreateGlRendererWithDesktop is called on.
> 
> I'll send a CL to fix this.

The thread checkers of the drawables will be initialized to the thread they were
created on (affinity is set in the c'tor of ewach drawable unless Detach is
called).  The renderer will have affinity to the thread
CreateGlRendererWithDesktop() is called on.  Not sure if that affects the
scenario you are concerned about.

Powered by Google App Engine
This is Rietveld 408576698