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

Issue 2555803002: Adding the iOS app and integration example with GlRenderer. (Closed)

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

Description

Moving source from internal to chromium to provide an app for CRD iOS. Integrating CRD iOS with the new OpenGL renderer. This will allow iOS and android to share a significant amount of render code. It also could be used to build a smoke test of the CRD iOS app in Chromium with similar dependencies to the real app. BUG=671692 Review-Url: https://codereview.chromium.org/2555803002 Cr-Commit-Position: refs/heads/master@{#446679} Committed: https://chromium.googlesource.com/chromium/src/+/28f74dd4d3b78681833af7c4ac7fb6b2d8f64859

Patch Set 1 #

Patch Set 2 : Adjusting how gl_renderer draws layers and added a demo app for CRD iOS. #

Total comments: 30

Patch Set 3 : Merging with branch from CL/2591363002 #

Patch Set 4 : Merging with cl 2628403002 #

Patch Set 5 : Updating copyright date to 2017. #

Patch Set 6 : Minor code cleanup. #

Patch Set 7 : Moving demo app to be placeholder for real app. #

Patch Set 8 : Cleaning up gl_display_handler for chromium. #

Total comments: 33

Patch Set 9 : Updating based on feedback. #

Patch Set 10 : Adding todo reminder for ES3 vs ES2. #

Total comments: 24

Patch Set 11 : cleaning up includes. #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+573 lines, -284 lines) Patch
M remoting/branding_Chrome View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M remoting/branding_Chromium View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M remoting/client/ios/BUILD.gn View 1 2 3 4 5 6 2 chunks +0 lines, -25 lines 0 comments Download
A remoting/client/ios/app/BUILD.gn View 1 2 3 4 5 6 1 chunk +81 lines, -0 lines 0 comments Download
A + remoting/client/ios/app/app_delegate.h View 1 2 3 4 5 6 2 chunks +4 lines, -4 lines 0 comments Download
A + remoting/client/ios/app/app_delegate.mm View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
A remoting/client/ios/app/example_view_controller.h View 1 2 3 4 5 6 7 8 1 chunk +32 lines, -0 lines 0 comments Download
A + remoting/client/ios/app/example_view_controller.mm View 1 2 3 4 5 6 7 8 9 6 chunks +22 lines, -11 lines 0 comments Download
A + remoting/client/ios/app/main.mm View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
A + remoting/client/ios/app/resources/Info.plist View 1 2 3 4 5 6 2 chunks +4 lines, -4 lines 0 comments Download
A remoting/client/ios/app/resources/Remoting.entitlements View 1 2 3 4 5 6 1 chunk +17 lines, -0 lines 0 comments Download
D remoting/client/ios/app_delegate.h View 1 2 3 4 5 6 1 chunk +0 lines, -18 lines 0 comments Download
D remoting/client/ios/app_delegate.mm View 1 2 3 4 5 6 1 chunk +0 lines, -41 lines 0 comments Download
A remoting/client/ios/display/BUILD.gn View 1 2 3 4 1 chunk +45 lines, -0 lines 0 comments Download
A remoting/client/ios/display/gl_demo_screen.h View 1 2 3 4 5 6 7 8 1 chunk +40 lines, -0 lines 0 comments Download
A remoting/client/ios/display/gl_demo_screen.mm View 1 2 3 4 5 6 7 8 9 10 1 chunk +115 lines, -0 lines 3 comments Download
A remoting/client/ios/display/gl_display_handler.h View 1 2 3 4 5 6 7 1 chunk +32 lines, -0 lines 0 comments Download
A remoting/client/ios/display/gl_display_handler.mm View 1 2 3 4 5 6 7 1 chunk +155 lines, -0 lines 4 comments Download
D remoting/client/ios/example_view_controller.h View 1 2 3 4 5 6 1 chunk +0 lines, -20 lines 0 comments Download
M remoting/client/ios/example_view_controller.mm View 1 2 3 4 5 6 1 chunk +0 lines, -76 lines 0 comments Download
D remoting/client/ios/main.mm View 1 2 3 4 5 6 1 chunk +0 lines, -33 lines 0 comments Download
D remoting/client/ios/remoting_ios-Info.plist View 1 2 3 4 5 6 1 chunk +0 lines, -48 lines 0 comments Download
M remoting/remoting_version.gni View 1 2 3 4 5 6 2 chunks +14 lines, -0 lines 0 comments Download

Messages

Total messages: 49 (22 generated)
Yuwei
Thanks for looking at the OpenGL stuffs! https://codereview.chromium.org/2555803002/diff/20001/remoting/client/gl_renderer.h File remoting/client/gl_renderer.h (right): https://codereview.chromium.org/2555803002/diff/20001/remoting/client/gl_renderer.h#newcode95 remoting/client/gl_renderer.h:95: void AddDrawable(GlDrawable* ...
4 years ago (2016-12-19 23:26:09 UTC) #5
Sergey Ulanov
Exciting stuff! This CL looks too big. Is it possible to split it into multiple ...
4 years ago (2016-12-19 23:50:22 UTC) #7
Yuwei
https://codereview.chromium.org/2555803002/diff/20001/remoting/client/gl_renderer.h File remoting/client/gl_renderer.h (right): https://codereview.chromium.org/2555803002/diff/20001/remoting/client/gl_renderer.h#newcode95 remoting/client/gl_renderer.h:95: void AddDrawable(GlDrawable* drawable); On 2016/12/19 23:26:09, Yuwei wrote: > ...
4 years ago (2016-12-19 23:54:19 UTC) #10
joedow
Can this CL be broken up? It seems to be doing a lot. Also, there ...
4 years ago (2016-12-19 23:56:26 UTC) #12
nicholss
Thanks for the comments all! I am going to split this up into a couple ...
4 years ago (2016-12-20 00:00:57 UTC) #13
nicholss
On 2016/12/20 00:00:57, nicholss wrote: > Thanks for the comments all! > > I am ...
4 years ago (2016-12-21 22:46:29 UTC) #14
nicholss
On 2016/12/21 22:46:29, nicholss wrote: > On 2016/12/20 00:00:57, nicholss wrote: > > Thanks for ...
3 years, 11 months ago (2017-01-13 18:49:15 UTC) #17
nicholss
On 2017/01/13 18:49:15, nicholss wrote: > On 2016/12/21 22:46:29, nicholss wrote: > > On 2016/12/20 ...
3 years, 11 months ago (2017-01-19 17:16:28 UTC) #19
nicholss
PTAL, please note that this is not intended to be a production ready app or ...
3 years, 11 months ago (2017-01-19 17:57:06 UTC) #20
joedow
I am not comfortable with signing off on the chromiumoting name or the commented out ...
3 years, 11 months ago (2017-01-19 18:56:46 UTC) #21
nicholss
On 2017/01/19 18:56:46, joedow wrote: > I am not comfortable with signing off on the ...
3 years, 11 months ago (2017-01-23 21:38:06 UTC) #22
Yuwei
Some questions... Haven't carefully looked at the code yet. https://codereview.chromium.org/2555803002/diff/180001/remoting/client/ios/app/example_view_controller.mm File remoting/client/ios/app/example_view_controller.mm (right): https://codereview.chromium.org/2555803002/diff/180001/remoting/client/ios/app/example_view_controller.mm#newcode33 remoting/client/ios/app/example_view_controller.mm:33: ...
3 years, 11 months ago (2017-01-23 21:56:16 UTC) #24
joedow
https://codereview.chromium.org/2555803002/diff/180001/remoting/branding_Chromium File remoting/branding_Chromium (right): https://codereview.chromium.org/2555803002/diff/180001/remoting/branding_Chromium#newcode6 remoting/branding_Chromium:6: IOS_EXEC_NAME=chromoting Should these mimic the names in the Chrome ...
3 years, 11 months ago (2017-01-25 23:16:29 UTC) #25
nicholss
Thanks for the review. Feedback addressed. https://codereview.chromium.org/2555803002/diff/180001/remoting/branding_Chromium File remoting/branding_Chromium (right): https://codereview.chromium.org/2555803002/diff/180001/remoting/branding_Chromium#newcode6 remoting/branding_Chromium:6: IOS_EXEC_NAME=chromoting On 2017/01/25 ...
3 years, 11 months ago (2017-01-26 18:00:16 UTC) #26
Jamie
https://codereview.chromium.org/2555803002/diff/180001/remoting/client/ios/app/example_view_controller.mm File remoting/client/ios/app/example_view_controller.mm (right): https://codereview.chromium.org/2555803002/diff/180001/remoting/client/ios/app/example_view_controller.mm#newcode33 remoting/client/ios/app/example_view_controller.mm:33: _context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3]; On 2017/01/26 18:00:16, nicholss ...
3 years, 11 months ago (2017-01-26 18:06:12 UTC) #27
nicholss
https://codereview.chromium.org/2555803002/diff/180001/remoting/client/ios/app/example_view_controller.mm File remoting/client/ios/app/example_view_controller.mm (right): https://codereview.chromium.org/2555803002/diff/180001/remoting/client/ios/app/example_view_controller.mm#newcode33 remoting/client/ios/app/example_view_controller.mm:33: _context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3]; On 2017/01/26 18:06:12, Jamie ...
3 years, 11 months ago (2017-01-26 18:28:40 UTC) #28
Yuwei
https://codereview.chromium.org/2555803002/diff/180001/remoting/client/ios/display/gl_demo_screen.mm File remoting/client/ios/display/gl_demo_screen.mm (right): https://codereview.chromium.org/2555803002/diff/180001/remoting/client/ios/display/gl_demo_screen.mm#newcode1 remoting/client/ios/display/gl_demo_screen.mm:1: // Copyright 2017 The Chromium Authors. All rights reserved. ...
3 years, 11 months ago (2017-01-26 20:18:26 UTC) #29
joedow
lgtm. Looks much better after the cleanup, thanks! https://codereview.chromium.org/2555803002/diff/220001/remoting/client/ios/display/gl_demo_screen.mm File remoting/client/ios/display/gl_demo_screen.mm (right): https://codereview.chromium.org/2555803002/diff/220001/remoting/client/ios/display/gl_demo_screen.mm#newcode63 remoting/client/ios/display/gl_demo_screen.mm:63: return ...
3 years, 11 months ago (2017-01-26 21:30:23 UTC) #30
Yuwei
https://codereview.chromium.org/2555803002/diff/220001/remoting/client/ios/display/gl_demo_screen.mm File remoting/client/ios/display/gl_demo_screen.mm (right): https://codereview.chromium.org/2555803002/diff/220001/remoting/client/ios/display/gl_demo_screen.mm#newcode113 remoting/client/ios/display/gl_demo_screen.mm:113: DCHECK(thread_checker_.CalledOnValidThread()); On 2017/01/26 21:30:23, joedow wrote: > On 2017/01/26 ...
3 years, 11 months ago (2017-01-26 21:33:53 UTC) #31
joedow
https://codereview.chromium.org/2555803002/diff/220001/remoting/client/ios/display/gl_demo_screen.mm File remoting/client/ios/display/gl_demo_screen.mm (right): https://codereview.chromium.org/2555803002/diff/220001/remoting/client/ios/display/gl_demo_screen.mm#newcode113 remoting/client/ios/display/gl_demo_screen.mm:113: DCHECK(thread_checker_.CalledOnValidThread()); On 2017/01/26 21:33:53, Yuwei wrote: > On 2017/01/26 ...
3 years, 11 months ago (2017-01-26 21:40:51 UTC) #32
nicholss
https://codereview.chromium.org/2555803002/diff/220001/remoting/client/ios/display/gl_demo_screen.mm File remoting/client/ios/display/gl_demo_screen.mm (right): https://codereview.chromium.org/2555803002/diff/220001/remoting/client/ios/display/gl_demo_screen.mm#newcode7 remoting/client/ios/display/gl_demo_screen.mm:7: #import <Foundation/Foundation.h> On 2017/01/26 20:18:25, Yuwei wrote: > Is ...
3 years, 11 months ago (2017-01-26 23:46:44 UTC) #35
Yuwei
https://codereview.chromium.org/2555803002/diff/220001/remoting/client/ios/display/gl_demo_screen.mm File remoting/client/ios/display/gl_demo_screen.mm (right): https://codereview.chromium.org/2555803002/diff/220001/remoting/client/ios/display/gl_demo_screen.mm#newcode43 remoting/client/ios/display/gl_demo_screen.mm:43: canvas_ = canvas; On 2017/01/26 23:46:44, nicholss wrote: > ...
3 years, 11 months ago (2017-01-26 23:55:18 UTC) #37
nicholss
All comments addressed. https://codereview.chromium.org/2555803002/diff/220001/remoting/client/ios/display/gl_demo_screen.mm File remoting/client/ios/display/gl_demo_screen.mm (right): https://codereview.chromium.org/2555803002/diff/220001/remoting/client/ios/display/gl_demo_screen.mm#newcode43 remoting/client/ios/display/gl_demo_screen.mm:43: canvas_ = canvas; On 2017/01/26 23:55:18, ...
3 years, 11 months ago (2017-01-27 00:51:05 UTC) #39
Yuwei
LGTM https://codereview.chromium.org/2555803002/diff/220001/remoting/client/ios/display/gl_demo_screen.mm File remoting/client/ios/display/gl_demo_screen.mm (right): https://codereview.chromium.org/2555803002/diff/220001/remoting/client/ios/display/gl_demo_screen.mm#newcode43 remoting/client/ios/display/gl_demo_screen.mm:43: canvas_ = canvas; On 2017/01/27 00:51:05, nicholss wrote: ...
3 years, 11 months ago (2017-01-27 01:11:48 UTC) #40
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/2555803002/240001
3 years, 10 months ago (2017-01-27 16:08:06 UTC) #45
commit-bot: I haz the power
Committed patchset #11 (id:240001) as https://chromium.googlesource.com/chromium/src/+/28f74dd4d3b78681833af7c4ac7fb6b2d8f64859
3 years, 10 months ago (2017-01-27 16:14:50 UTC) #48
Sergey Ulanov
3 years, 10 months ago (2017-01-27 19:47:44 UTC) #49
Message was sent while issue was closed.
Sorry about belated comments.

https://codereview.chromium.org/2555803002/diff/240001/remoting/client/ios/di...
File remoting/client/ios/display/gl_demo_screen.mm (right):

https://codereview.chromium.org/2555803002/diff/240001/remoting/client/ios/di...
remoting/client/ios/display/gl_demo_screen.mm:15: const GLfloat square[] =
{-1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 1.0};
This should be kSquare (or kSquareCoordinates).
Same for the consts below.

See https://google.github.io/styleguide/cppguide.html#Constant_Names

https://codereview.chromium.org/2555803002/diff/240001/remoting/client/ios/di...
remoting/client/ios/display/gl_demo_screen.mm:30: const GLchar* a_position =
"a_position";
kPositionAttributeName

https://codereview.chromium.org/2555803002/diff/240001/remoting/client/ios/di...
remoting/client/ios/display/gl_demo_screen.mm:89: if (skip == square_size_) {
This whole statement can be written as follows.
 skip = (i % 2) * square_size_;

and then skip can be moved inside the loop.

https://codereview.chromium.org/2555803002/diff/240001/remoting/client/ios/di...
File remoting/client/ios/display/gl_display_handler.mm (right):

https://codereview.chromium.org/2555803002/diff/240001/remoting/client/ios/di...
remoting/client/ios/display/gl_display_handler.mm:34:
Core(remoting::ios::AppRuntime* runtime);
runtime_ is used only to get display_task_runner(), so maybe pass just the task
runner here?

https://codereview.chromium.org/2555803002/diff/240001/remoting/client/ios/di...
remoting/client/ios/display/gl_display_handler.mm:48: // Will be std::move'd
when GrabFrameConsumer() is called.
Is this comment about owned_frame_consumer_? If so it should be moved one line
below.

https://codereview.chromium.org/2555803002/diff/240001/remoting/client/ios/di...
remoting/client/ios/display/gl_display_handler.mm:121: @property(nonatomic)
remoting::GlDisplayHandler::Core* core_;
does this need to be a property instead of an interface field?

I'm not an expert in Obj C, so sorry if this is a stupid question.

https://codereview.chromium.org/2555803002/diff/240001/remoting/client/ios/di...
remoting/client/ios/display/gl_display_handler.mm:140:
self.core_->GetWeakPtr()));
Which thread is the core_ destroyed on? I assume it's supposed to be destroyed
on display_thread_, otherwise weak-pointer usage isn't safe. I don't see
anything that ensures that it's destroyed on the right thread. I think you need
to call display_task_runner()->DeleteSoon(core_) when GlDisplayHandler is being
destroyed. That would also ensure that Core is destroyed after all tasks that
were posted for it, so you won't need to use weak pointer here.

Powered by Google App Engine
This is Rietveld 408576698