|
Make lost context and error message callbacks on GpuControl go to client
In this we introduce a GpuControlClient, that implementations of
GpuControl will call to notify about the context becoming lost, or of
error messages.
Users of GpuControl implement the client to hear about these states.
The most important users of GpuControl here are:
- GLES2Implementation, which now has 2 base::Callbacks which it forwards
these events to, if they have been set by the user of the
GLES2Implementation.
- PPB_Graphics3D_Impl, which acts on these two events.
- PepperVideoEncoderHost, which turns lost context events into a call
to NotifyPepperError(PP_ERROR_RESOURCE_FAILED).
- mojo::GLES2Context, which forwards the lost context event to a
registered callback.
Other owners of GpuControl (if they exist) never set callbacks on
CommandBufferProxyImpl or equivalent before, so they don't care to
listen to these events and just opt out of setting the client
altogether.
The main implementations of GpuControl here are:
- CommandBufferProxyImpl, which will now call the client instead of
owning base::Callbacks for these two events.
- mojo::CommandBufferClientImpl, which notifies its client of lost
contexts, but has no concept of error messages.
- InProcessCommandBuffer, which will now call the client (on the client
thread) instead of owning and wrapping base::Callbacks for the lost
context event. It also has no error messages.
For other implementations of GpuControl there is no chance to lose the
context or generate error messages, and they don't even bother to store
the client since it would go unused.
WebGraphicsContext3D{CommandBuffer}Impl continues to be used for these
callbacks, but it now goes directly to the GLES2Implementation to set
callbacks, instead of bypassing it to the CommandBufferProxyImpl.
The next step will be to have Blink or the ContextProvider directly set
these callbacks on the GLES2Implementation, bypassing the
WebGraphicsContext3DImpls entirely. This isn't possible today as the
two versions of WebGraphicsContext3DImpl (which are
WebGraphicsContext3DCommandBufferImpl and
WebGraphicsContext3DInProcessCommandBufferImpl) each have different
versions of the GpuControl, while both having a GLES2Implementation,
forcing ContextProviderCommandBuffer to route through this fork
when setting the callbacks.
R=piman@chomium.org
BUG= 584497
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel
Committed: https://crrev.com/10057772128ab5e67452dc736bf15752dc434ed3
Cr-Commit-Position: refs/heads/master@{#386761}
Total comments: 5
Total comments: 3
Total comments: 8
Total comments: 3
Total comments: 4
Total comments: 6
Total comments: 17
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+321 lines, -221 lines) |
Patch |
 |
M |
android_webview/browser/aw_render_thread_context_provider.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
blimp/client/BUILD.gn
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
blimp/client/feature/compositor/blimp_context_provider.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/test/test_context_provider.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
components/mus/gles2/command_buffer_local.h
|
View
|
1
2
3
4
5
6
7
8
9
|
4 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/mus/gles2/command_buffer_local.cc
|
View
|
1
2
3
4
5
6
|
4 chunks |
+11 lines, -2 lines |
0 comments
|
Download
|
 |
M |
components/mus/gles2/command_buffer_local_client.h
|
View
|
1
2
3
4
5
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
components/mus/surfaces/surfaces_context_provider.h
|
View
|
1
2
3
4
5
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
components/mus/surfaces/surfaces_context_provider.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+1 line, -5 lines |
0 comments
|
Download
|
 |
M |
content/browser/android/in_process/context_provider_in_process.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/common/gpu/client/context_provider_command_buffer.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h
|
View
|
1
2
3
4
5
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+18 lines, -8 lines |
0 comments
|
Download
|
 |
M |
content/renderer/pepper/pepper_video_encoder_host.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
4 chunks |
+11 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/pepper/pepper_video_encoder_host.cc
|
View
|
1
2
3
4
5
6
7
8
|
2 chunks |
+11 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/renderer/pepper/ppb_graphics_3d_impl.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
4 chunks |
+12 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/renderer/pepper/ppb_graphics_3d_impl.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
4 chunks |
+26 lines, -17 lines |
0 comments
|
Download
|
 |
M |
gpu/blink/webgraphicscontext3d_impl.h
|
View
|
1
2
3
4
5
|
1 chunk |
+2 lines, -10 lines |
0 comments
|
Download
|
 |
M |
gpu/blink/webgraphicscontext3d_impl.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+0 lines, -38 lines |
0 comments
|
Download
|
 |
M |
gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc
|
View
|
1
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/client/client_test_helper.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/client/gl_in_process_context.h
|
View
|
1
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/client/gl_in_process_context.cc
|
View
|
1
2
|
6 chunks |
+0 lines, -16 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/client/gles2_implementation.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
7 chunks |
+15 lines, -12 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/client/gles2_implementation.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
6 chunks |
+34 lines, -3 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/client/gles2_implementation_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+9 lines, -6 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/client/gpu_control.h
|
View
|
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
A |
gpu/command_buffer/client/gpu_control_client.h
|
View
|
|
1 chunk |
+20 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/in_process_command_buffer.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
6 chunks |
+17 lines, -7 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/in_process_command_buffer.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
13 chunks |
+44 lines, -25 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/tests/gl_manager.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/tests/gl_manager.cc
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/gles2_conform_support/egl/display.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/gles2_conform_support/egl/display.cc
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/ipc/client/command_buffer_proxy_impl.h
|
View
|
|
4 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
gpu/ipc/client/command_buffer_proxy_impl.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
6 chunks |
+17 lines, -24 lines |
0 comments
|
Download
|
 |
M |
mojo/gles2/command_buffer_client_impl.h
|
View
|
|
3 chunks |
+3 lines, -8 lines |
0 comments
|
Download
|
 |
M |
mojo/gles2/command_buffer_client_impl.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
4 chunks |
+12 lines, -7 lines |
0 comments
|
Download
|
 |
M |
mojo/gles2/gles2_context.h
|
View
|
1
2
3
4
5
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
mojo/gles2/gles2_context.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+12 lines, -6 lines |
0 comments
|
Download
|
 |
M |
ppapi/proxy/ppapi_command_buffer_proxy.h
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
ppapi/proxy/ppapi_command_buffer_proxy.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
Depends on Patchset:
Dependent Patchsets:
Total messages: 87 (33 generated)
|