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

Issue 807733002: Split surface id and simplify connecting to surfaces service (Closed)

Created:
6 years ago by jamesr
Modified:
5 years, 10 months ago
Reviewers:
esprehn, sky, eseidel
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, darin (slow to review), eseidel, mojo-reviews_chromium.org, ojan, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
git@github.com:domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Split surface id and simplify connecting to surfaces service Surface IDs are composed of a namespace component and a local identifier component. This splits up the two pieces in the mojom to make it clearer. This also simplifies the path for connecting to the surfaces service. In order to perform any operations with surfaces, each client must know what its id namespace value is. This was done by first connecting to a SurfacesService interface and then calling CreateSurfaceConnection which returned a Surface pointer and the namespace. Having to connect to this extra interface and receive the Surface impl asynchronously complicated startup code for applications by adding extra states in startup. Instead of that, this allows connecting to the Surface interface directly and promises that the ID namespace will be provided as the first message in the pipe directed at the SurfaceClient. Callers can then either block on startup or handle setting the ID namespace asynchronously depending on what other things that thread could be doing at the time. In a follow-up, I plan to define the id namespace value 0 as meaning "the namespace of this connection" which will allow creating surfaces and submitting frames before learning the connection's namespace. The only thing the namespace will be passing surface IDs to other clients for them to embed. This also removes the Size parameter from CreateSurface, which wasn't used by anything. The size of submitted frames is part of the embedder / embedee contract. R=esprehn@chromium.org, sky@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/6f344a8b02226f7375580fd271f00e193b7062e2

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+176 lines, -149 lines) Patch
M examples/bitmap_uploader/bitmap_uploader.h View 1 chunk +2 lines, -1 line 0 comments Download
M examples/bitmap_uploader/bitmap_uploader.cc View 2 chunks +6 lines, -3 lines 0 comments Download
M examples/ganesh_app/texture_uploader.h View 1 chunk +1 line, -0 lines 0 comments Download
M examples/ganesh_app/texture_uploader.cc View 2 chunks +6 lines, -3 lines 0 comments Download
M examples/surfaces_app/child_gl_impl.h View 2 chunks +4 lines, -7 lines 0 comments Download
M examples/surfaces_app/child_gl_impl.cc View 3 chunks +8 lines, -20 lines 0 comments Download
M examples/surfaces_app/child_impl.h View 2 chunks +5 lines, -17 lines 0 comments Download
M examples/surfaces_app/child_impl.cc View 5 chunks +15 lines, -29 lines 0 comments Download
M examples/surfaces_app/embedder.h View 2 chunks +5 lines, -3 lines 1 comment Download
M examples/surfaces_app/embedder.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M examples/surfaces_app/surfaces_app.cc View 4 chunks +19 lines, -29 lines 0 comments Download
M mojo/aura/surface_binding.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M mojo/cc/output_surface_mojo.h View 2 chunks +4 lines, -3 lines 0 comments Download
M mojo/cc/output_surface_mojo.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M mojo/converters/surfaces/surfaces_type_converters.cc View 2 chunks +7 lines, -2 lines 0 comments Download
M mojo/services/surfaces/public/interfaces/surface_id.mojom View 1 chunk +6 lines, -1 line 0 comments Download
M mojo/services/surfaces/public/interfaces/surfaces.mojom View 1 chunk +6 lines, -3 lines 0 comments Download
M services/fake_surfaces/fake_surfaces_service_application.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M services/native_viewport/viewport_surface.h View 1 chunk +1 line, -0 lines 0 comments Download
M services/native_viewport/viewport_surface.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M services/surfaces/surfaces_impl.h View 2 chunks +10 lines, -1 line 0 comments Download
M services/surfaces/surfaces_impl.cc View 2 chunks +21 lines, -4 lines 1 comment Download
M services/surfaces/surfaces_service_application.h View 2 chunks +6 lines, -1 line 0 comments Download
M services/surfaces/surfaces_service_application.cc View 3 chunks +9 lines, -1 line 0 comments Download
M services/view_manager/display_manager.h View 1 chunk +1 line, -0 lines 0 comments Download
M services/view_manager/display_manager.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M sky/compositor/surface_allocator.h View 2 chunks +2 lines, -1 line 0 comments Download
M sky/compositor/surface_allocator.cc View 1 chunk +5 lines, -7 lines 0 comments Download
M sky/compositor/surface_holder.h View 1 chunk +1 line, -0 lines 0 comments Download
M sky/compositor/surface_holder.cc View 1 chunk +5 lines, -2 lines 0 comments Download
M sky/viewer/document_view.cc View 1 chunk +2 lines, -1 line 4 comments Download

Messages

Total messages: 12 (2 generated)
jamesr
https://codereview.chromium.org/807733002/diff/1/sky/viewer/document_view.cc File sky/viewer/document_view.cc (right): https://codereview.chromium.org/807733002/diff/1/sky/viewer/document_view.cc#newcode159 sky/viewer/document_view.cc:159: if (root_) this is not directly related, but fixes ...
6 years ago (2014-12-16 00:02:48 UTC) #1
esprehn
https://codereview.chromium.org/807733002/diff/1/sky/viewer/document_view.cc File sky/viewer/document_view.cc (right): https://codereview.chromium.org/807733002/diff/1/sky/viewer/document_view.cc#newcode159 sky/viewer/document_view.cc:159: if (root_) On 2014/12/16 at 00:02:47, jamesr wrote: > ...
6 years ago (2014-12-16 00:51:11 UTC) #3
jamesr
https://codereview.chromium.org/807733002/diff/1/sky/viewer/document_view.cc File sky/viewer/document_view.cc (right): https://codereview.chromium.org/807733002/diff/1/sky/viewer/document_view.cc#newcode159 sky/viewer/document_view.cc:159: if (root_) On 2014/12/16 00:51:11, esprehn wrote: > On ...
6 years ago (2014-12-16 00:56:09 UTC) #4
eseidel
Does this fix https://github.com/domokit/mojo/issues/31?
6 years ago (2014-12-16 00:58:23 UTC) #6
jamesr
On 2014/12/16 00:58:23, eseidel wrote: > Does this fix https://github.com/domokit/mojo/issues/31 Yes
6 years ago (2014-12-16 01:09:03 UTC) #7
esprehn
https://codereview.chromium.org/807733002/diff/1/sky/viewer/document_view.cc File sky/viewer/document_view.cc (right): https://codereview.chromium.org/807733002/diff/1/sky/viewer/document_view.cc#newcode159 sky/viewer/document_view.cc:159: if (root_) On 2014/12/16 at 00:56:09, jamesr wrote: > ...
6 years ago (2014-12-16 01:23:57 UTC) #8
jamesr
This doesn't come from a message, this runs from a posted task generated by sky: ...
6 years ago (2014-12-16 01:32:00 UTC) #9
esprehn
On 2014/12/16 at 01:32:00, jamesr wrote: > This doesn't come from a message, this runs ...
6 years ago (2014-12-16 02:21:10 UTC) #10
sky
LGTM https://codereview.chromium.org/807733002/diff/1/examples/surfaces_app/embedder.h File examples/surfaces_app/embedder.h (right): https://codereview.chromium.org/807733002/diff/1/examples/surfaces_app/embedder.h#newcode30 examples/surfaces_app/embedder.h:30: void set_surface_id(SurfaceIdPtr id) { id_ = id.Clone(); } ...
6 years ago (2014-12-16 03:34:04 UTC) #11
jamesr
6 years ago (2014-12-16 23:15:26 UTC) #12
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
6f344a8b02226f7375580fd271f00e193b7062e2 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698