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

Issue 826423008: Use local ids for Surfaces APIs that can only apply to local surfaces (Closed)

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

Description

Use local ids for Surfaces APIs that can only apply to local surfaces Surfaces identifiers have a local and a namespace component. The namespace is particular to a connection. The local component is up to the endpoint of the connection to manage. In contexts where a surface that may be from anywhere is referenced, a fully qualified ID with both the local and namespace component is needed in order to be unambiguous. In contexts that can only apply to local surfaces only the local id is needed. This updates the mojo.Surface APIs that can only refer to local IDs to only take the local component. In particular creating, destroying, or submitting a frame can only refer to surfaces created on that connection. References to surfaces within a frame may refer to local or foreign surfaces so they use fully qualified IDs. This also skips the SurfacesService indirection since many applications can perform useful operations on a mojo.Surface interface such as create surfaces and submit frames without knowing their ID namespace. The namespace component is needed only to pass fully qualified IDs to other actors that may wish to reference the produced frame. R=sky@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/099fb6d741bdf62067d1905879302e99303eb966

Patch Set 1 #

Patch Set 2 : #

Total comments: 14

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+307 lines, -477 lines) Patch
M examples/bitmap_uploader/bitmap_uploader.h View 1 4 chunks +1 line, -6 lines 0 comments Download
M examples/bitmap_uploader/bitmap_uploader.cc View 1 4 chunks +20 lines, -25 lines 0 comments Download
M examples/ganesh_app/texture_uploader.h View 2 chunks +3 lines, -5 lines 0 comments Download
M examples/ganesh_app/texture_uploader.cc View 1 2 4 chunks +22 lines, -29 lines 0 comments Download
M examples/surfaces_app/child_gl_impl.h View 2 chunks +12 lines, -13 lines 0 comments Download
M examples/surfaces_app/child_gl_impl.cc View 1 2 3 chunks +24 lines, -15 lines 0 comments Download
M examples/surfaces_app/child_impl.h View 1 chunk +6 lines, -5 lines 0 comments Download
M examples/surfaces_app/child_impl.cc View 4 chunks +18 lines, -18 lines 0 comments Download
M examples/surfaces_app/embedder.h View 2 chunks +2 lines, -5 lines 0 comments Download
M examples/surfaces_app/embedder.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M examples/surfaces_app/surfaces_app.cc View 6 chunks +14 lines, -10 lines 0 comments Download
M mojo/aura/surface_binding.cc View 1 2 11 chunks +44 lines, -56 lines 0 comments Download
M mojo/cc/BUILD.gn View 1 chunk +0 lines, -2 lines 0 comments Download
D mojo/cc/output_surface_mojo.h View 1 chunk +0 lines, -52 lines 0 comments Download
D mojo/cc/output_surface_mojo.cc View 1 chunk +0 lines, -61 lines 0 comments Download
M mojo/services/surfaces/public/interfaces/surface_id.mojom View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M mojo/services/surfaces/public/interfaces/surfaces.mojom View 1 chunk +4 lines, -6 lines 0 comments Download
M mojo/services/surfaces/public/interfaces/surfaces_service.mojom View 1 1 chunk +2 lines, -0 lines 0 comments Download
M services/fake_surfaces/fake_surfaces_service_application.h View 2 chunks +6 lines, -1 line 0 comments Download
M services/fake_surfaces/fake_surfaces_service_application.cc View 5 chunks +17 lines, -10 lines 0 comments Download
M services/native_viewport/native_viewport_impl.h View 2 chunks +2 lines, -2 lines 0 comments Download
M services/native_viewport/native_viewport_impl.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M services/native_viewport/viewport_surface.h View 3 chunks +2 lines, -9 lines 0 comments Download
M services/native_viewport/viewport_surface.cc View 1 2 7 chunks +18 lines, -23 lines 0 comments Download
M services/surfaces/surfaces_impl.h View 2 chunks +6 lines, -4 lines 0 comments Download
M services/surfaces/surfaces_impl.cc View 4 chunks +16 lines, -37 lines 0 comments Download
M services/view_manager/display_manager.h View 1 2 2 chunks +2 lines, -5 lines 0 comments Download
M services/view_manager/display_manager.cc View 1 2 6 chunks +28 lines, -25 lines 0 comments Download
M sky/compositor/layer_host.h View 1 chunk +0 lines, -2 lines 0 comments Download
M sky/compositor/layer_host.cc View 2 chunks +1 line, -8 lines 0 comments Download
M sky/compositor/surface_holder.h View 3 chunks +3 lines, -8 lines 0 comments Download
M sky/compositor/surface_holder.cc View 2 chunks +23 lines, -29 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
jamesr
Some cleanups in preparation for de-clienting.
5 years, 11 months ago (2015-01-13 01:29:10 UTC) #1
sky
https://codereview.chromium.org/826423008/diff/20001/examples/ganesh_app/texture_uploader.cc File examples/ganesh_app/texture_uploader.cc (right): https://codereview.chromium.org/826423008/diff/20001/examples/ganesh_app/texture_uploader.cc#newcode45 examples/ganesh_app/texture_uploader.cc:45: surface_->DestroySurface(local_id_); As the pipe is destroyed in the destructor ...
5 years, 11 months ago (2015-01-13 18:14:27 UTC) #2
jamesr
Thanks, PTAL. https://codereview.chromium.org/826423008/diff/20001/examples/ganesh_app/texture_uploader.cc File examples/ganesh_app/texture_uploader.cc (right): https://codereview.chromium.org/826423008/diff/20001/examples/ganesh_app/texture_uploader.cc#newcode45 examples/ganesh_app/texture_uploader.cc:45: surface_->DestroySurface(local_id_); On 2015/01/13 18:14:27, sky wrote: > ...
5 years, 11 months ago (2015-01-14 01:50:30 UTC) #3
sky
LGTM
5 years, 11 months ago (2015-01-14 16:15:11 UTC) #4
jamesr
5 years, 11 months ago (2015-01-14 18:25:36 UTC) #5
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
099fb6d741bdf62067d1905879302e99303eb966 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698