|
Add a Display and ContextProvider concept to mojom, use to recreate
This introduces two new concepts to make initializing and reinitializing
the objects needed to draw onscreen easier. This makes it easier to draw
things and will make recovering from lost contexts simpler.
The first is ContextProvider which is an interface for creating contexts
(in the GPU command buffer sense) associated with a piece of state (such
as drawing to a particular native viewport). This allows code to request
command buffer contexts associated with a particular native viewport
multiple times without requiring passing identifiers around since the
identity of the native viewport in question is contained in the identity
of the message pipe that the interface is bound to. This also makes it
possible for the gpu mojoms to produce viewport-bound contexts without
needing to be aware of the native viewport interfaces explicitly or
through opaque ID side channels.
The second is Display which is an interface used to submit frames that
should be drawn onscreen. A Display is somewhat like a Surface with a
few differences that make interacting with one simpler than interacting
with a Surface in general. Display is only drawn to and never embedded
in another frame so it does not need to have an explicit size or global
ID as those are only used when embedding one Surface's frame into
another. The only operations a Display has to support is receiving
frames, ACKing them and returning resources when unused.
A Display needs to know how to draw to a particular context so it can be
constructed from a ContextProvider if that ContextProvider is associated
with the desired native viewport. This means that in turn the native
viewport service doesn't have to know anything about surfaces, it only
needs to provide appropriate ContextProvider implementations to whomever
asks.
R=qsr@chromium.org
Committed: https://chromium.googlesource.com/external/mojo/+/187e1faf437be935fe55ae769f0ecc19ce4c3db4
Total comments: 6
Total comments: 1
Total comments: 12
Total comments: 11
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+876 lines, -695 lines) |
Patch |
 |
M |
examples/spinning_cube/gles2_client_impl.h
|
View
|
1
2
3
4
|
3 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
examples/spinning_cube/gles2_client_impl.cc
|
View
|
1
2
3
4
|
3 chunks |
+31 lines, -21 lines |
0 comments
|
Download
|
 |
M |
examples/spinning_cube/spinning_cube.h
|
View
|
1
2
3
4
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
examples/spinning_cube/spinning_cube.cc
|
View
|
1
2
3
4
|
2 chunks |
+1 line, -6 lines |
0 comments
|
Download
|
 |
M |
examples/spinning_cube/spinning_cube_app.cc
|
View
|
1
2
3
4
|
2 chunks |
+10 lines, -23 lines |
0 comments
|
Download
|
 |
M |
examples/surfaces_app/child_gl_impl.h
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
examples/surfaces_app/child_gl_impl.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
examples/surfaces_app/embedder.h
|
View
|
|
2 chunks |
+6 lines, -11 lines |
0 comments
|
Download
|
 |
M |
examples/surfaces_app/embedder.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+7 lines, -3 lines |
0 comments
|
Download
|
 |
M |
examples/surfaces_app/surfaces_app.cc
|
View
|
1
|
4 chunks |
+29 lines, -28 lines |
0 comments
|
Download
|
 |
M |
mojo/services/gpu/public/interfaces/BUILD.gn
|
View
|
1
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
A |
mojo/services/gpu/public/interfaces/context_provider.mojom
|
View
|
1
2
3
4
5
|
1 chunk |
+28 lines, -0 lines |
0 comments
|
Download
|
 |
M |
mojo/services/gpu/public/interfaces/gpu.mojom
|
View
|
1
|
1 chunk |
+1 line, -6 lines |
0 comments
|
Download
|
 |
M |
mojo/services/native_viewport/public/interfaces/native_viewport.mojom
|
View
|
1
|
2 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
 |
M |
mojo/services/surfaces/public/interfaces/BUILD.gn
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
A |
mojo/services/surfaces/public/interfaces/display.mojom
|
View
|
1
2
|
1 chunk |
+33 lines, -0 lines |
0 comments
|
Download
|
 |
M |
mojo/services/surfaces/public/interfaces/surfaces.mojom
|
View
|
|
2 chunks |
+0 lines, -7 lines |
0 comments
|
Download
|
 |
M |
services/fake_surfaces/fake_surfaces_service_application.h
|
View
|
1
|
3 chunks |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
services/fake_surfaces/fake_surfaces_service_application.cc
|
View
|
1
|
3 chunks |
+80 lines, -30 lines |
0 comments
|
Download
|
 |
M |
services/gles2/BUILD.gn
|
View
|
1
2
3
|
1 chunk |
+7 lines, -0 lines |
0 comments
|
Download
|
 |
M |
services/gles2/command_buffer_driver.h
|
View
|
|
2 chunks |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
services/gles2/command_buffer_driver.cc
|
View
|
|
4 chunks |
+4 lines, -6 lines |
0 comments
|
Download
|
 |
M |
services/gles2/gpu_impl.h
|
View
|
|
2 chunks |
+4 lines, -42 lines |
0 comments
|
Download
|
 |
M |
services/gles2/gpu_impl.cc
|
View
|
|
1 chunk |
+1 line, -27 lines |
0 comments
|
Download
|
 |
A |
services/gles2/gpu_state.h
|
View
|
|
1 chunk |
+52 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/gles2/gpu_state.cc
|
View
|
|
1 chunk |
+21 lines, -0 lines |
0 comments
|
Download
|
 |
M |
services/native_viewport/BUILD.gn
|
View
|
1
|
3 chunks |
+2 lines, -8 lines |
0 comments
|
Download
|
 |
M |
services/native_viewport/main.cc
|
View
|
1
|
2 chunks |
+9 lines, -10 lines |
0 comments
|
Download
|
 |
M |
services/native_viewport/native_viewport_impl.h
|
View
|
1
2
3
4
|
3 chunks |
+12 lines, -22 lines |
0 comments
|
Download
|
 |
M |
services/native_viewport/native_viewport_impl.cc
|
View
|
1
2
3
4
|
6 chunks |
+14 lines, -36 lines |
0 comments
|
Download
|
 |
A |
services/native_viewport/onscreen_context_provider.h
|
View
|
1
|
1 chunk |
+46 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/native_viewport/onscreen_context_provider.cc
|
View
|
|
1 chunk |
+58 lines, -0 lines |
0 comments
|
Download
|
 |
D |
services/native_viewport/viewport_surface.h
|
View
|
1
|
1 chunk |
+0 lines, -48 lines |
0 comments
|
Download
|
 |
M |
services/native_viewport/viewport_surface.cc
|
View
|
1
|
1 chunk |
+0 lines, -106 lines |
0 comments
|
Download
|
 |
M |
services/surfaces/BUILD.gn
|
View
|
1
|
2 chunks |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/surfaces/display_factory_impl.h
|
View
|
1
|
1 chunk |
+44 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/surfaces/display_factory_impl.cc
|
View
|
1
|
1 chunk |
+36 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/surfaces/display_impl.h
|
View
|
1
|
1 chunk |
+80 lines, -0 lines |
0 comments
|
Download
|
 |
A |
services/surfaces/display_impl.cc
|
View
|
1
2
3
4
|
1 chunk |
+124 lines, -0 lines |
0 comments
|
Download
|
 |
M |
services/surfaces/surfaces_impl.h
|
View
|
1
|
2 chunks |
+4 lines, -45 lines |
0 comments
|
Download
|
 |
M |
services/surfaces/surfaces_impl.cc
|
View
|
1
|
4 chunks |
+8 lines, -80 lines |
0 comments
|
Download
|
 |
M |
services/surfaces/surfaces_scheduler.h
|
View
|
1
2
3
4
|
3 chunks |
+11 lines, -10 lines |
0 comments
|
Download
|
 |
M |
services/surfaces/surfaces_scheduler.cc
|
View
|
1
2
3
4
|
3 chunks |
+17 lines, -5 lines |
0 comments
|
Download
|
 |
M |
services/surfaces/surfaces_service_application.h
|
View
|
1
|
2 chunks |
+9 lines, -17 lines |
0 comments
|
Download
|
 |
M |
services/surfaces/surfaces_service_application.cc
|
View
|
1
|
2 chunks |
+14 lines, -28 lines |
0 comments
|
Download
|
 |
M |
services/view_manager/display_manager.h
|
View
|
1
|
3 chunks |
+5 lines, -9 lines |
0 comments
|
Download
|
 |
M |
services/view_manager/display_manager.cc
|
View
|
1
|
9 chunks |
+28 lines, -49 lines |
0 comments
|
Download
|
 |
M |
shell/android/native_viewport_application_loader.h
|
View
|
1
2
3
4
|
2 chunks |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
shell/android/native_viewport_application_loader.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
Total messages: 15 (3 generated)
|