|
|
cc: Make LayerTreeTests use a DelegatingRenderer and Display.
Wherein we rewrite a few thousand cc unit_tests to not use a
DirectRenderer in LayerTreeHostImpl so that we can remove that
possibility from the codebase.
Currently some LayerTreeTests use a DirectRenderer in the
LayerTreeHostImpl, which is the last case of this occuring. Instead
give all LayerTreeTests a TestDelegatingOutputSurface (which means
a DelegatingRenderer in LayerTreeHostImpl). TestDelegatingOutputSurface
delegates drawing to a DirectRenderer via Display, which matches how
things "really work" now.
This means SwapBuffers hooks become async from operations on
LayerTreeHostImpl, so we introduce 3 new hooks for tests:
- DisplayReceivedCompositorFrameOnThread.
- DisplayWillDrawAndSwapOnThread.
- DisplayDidDrawAndSwapOnThread.
None of these receive a LayerTreeHostImpl* since they are async
from it and so using its state from the hook would be racey. These
hooks come from the TestDelegatingOutputSurface instead of from the
LayerTreeHostImpl.
LayerTreeTest gets two methods that can be overridden to control the
output surface:
- CreateDelegatingOutputSurface makes a TestDelegatingOutputSurface
so tests can control the arguments passed to its constructor, or the
ContextProviders given to it.
- CreateDisplayOutputSurface makes an OutputSurface subclass that
will be owned by the Display and used by the DirectRenderer. This
allows tests to control which ContextProvider it uses, and what
subclass of OutputSurface to use, to allow mocking out things as
desired.
Now also with fixes for cc_perftests:
The TestDelegatingOutputSurface was not honoring disable_display_vsync
so they were not saturating the thread, making them take much longer
than 5s to do 5s of thread work, and they'd time out.
Also the TetureMailbox doesn't get released to the main thread
immediately after commit anymore, as you need to wait for the
mailbox to be given to the Display (DisplayReceivedCompositorFrame
is the hook for that fwiw). So we wait for the mailbox to actually
return before ending the test to avoid a crash.
R=enne
BUG= 606056
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel
Committed: https://crrev.com/cae1058e62b7960796709512c4e1e650b6389c0f
Committed: https://crrev.com/014316e35eb9a90a024302daa3a6c3ca3983a8bd
Cr-Original-Commit-Position: refs/heads/master@{#409270}
Cr-Commit-Position: refs/heads/master@{#409845}
Total comments: 1
Total comments: 4
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+731 lines, -583 lines) |
Patch |
 |
M |
android_webview/browser/surfaces_instance.h
|
View
|
1
2
3
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
cc/BUILD.gn
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/cc_tests.gyp
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/layers/surface_layer_unittest.cc
|
View
|
|
3 chunks |
+3 lines, -13 lines |
0 comments
|
Download
|
 |
M |
cc/layers/texture_layer_unittest.cc
|
View
|
1
|
5 chunks |
+30 lines, -24 lines |
0 comments
|
Download
|
 |
M |
cc/output/delegating_renderer_unittest.cc
|
View
|
|
3 chunks |
+18 lines, -49 lines |
0 comments
|
Download
|
 |
M |
cc/output/renderer_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
cc/surfaces/display.h
|
View
|
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/surfaces/display.cc
|
View
|
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
cc/surfaces/display_client.h
|
View
|
|
2 chunks |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
cc/surfaces/display_unittest.cc
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
cc/surfaces/surface_display_output_surface.h
|
View
|
|
1 chunk |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
cc/surfaces/surface_display_output_surface.cc
|
View
|
|
2 chunks |
+14 lines, -2 lines |
0 comments
|
Download
|
 |
D |
cc/test/failure_output_surface.h
|
View
|
|
1 chunk |
+0 lines, -25 lines |
0 comments
|
Download
|
 |
D |
cc/test/failure_output_surface.cc
|
View
|
|
1 chunk |
+0 lines, -18 lines |
0 comments
|
Download
|
 |
M |
cc/test/fake_output_surface.h
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
cc/test/layer_tree_pixel_test.h
|
View
|
1
|
1 chunk |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/test/layer_tree_pixel_test.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+35 lines, -26 lines |
0 comments
|
Download
|
 |
M |
cc/test/layer_tree_test.h
|
View
|
1
|
7 chunks |
+32 lines, -17 lines |
0 comments
|
Download
|
 |
M |
cc/test/layer_tree_test.cc
|
View
|
1
|
10 chunks |
+68 lines, -59 lines |
0 comments
|
Download
|
 |
M |
cc/test/test_context_provider.h
|
View
|
|
3 chunks |
+7 lines, -4 lines |
0 comments
|
Download
|
 |
M |
cc/test/test_context_provider.cc
|
View
|
|
4 chunks |
+27 lines, -9 lines |
0 comments
|
Download
|
 |
M |
cc/test/test_delegating_output_surface.h
|
View
|
1
|
4 chunks |
+23 lines, -3 lines |
0 comments
|
Download
|
 |
M |
cc/test/test_delegating_output_surface.cc
|
View
|
1
2
3
4
5
6
7
|
7 chunks |
+33 lines, -8 lines |
0 comments
|
Download
|
 |
M |
cc/test/test_hooks.h
|
View
|
|
3 chunks |
+17 lines, -7 lines |
0 comments
|
Download
|
 |
M |
cc/test/test_web_graphics_context_3d.cc
|
View
|
1
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
cc/trees/layer_tree_host_impl.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
cc/trees/layer_tree_host_impl_unittest.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
cc/trees/layer_tree_host_perftest.cc
|
View
|
1
2
3
4
5
6
7
|
6 chunks |
+25 lines, -17 lines |
0 comments
|
Download
|
 |
M |
cc/trees/layer_tree_host_unittest.cc
|
View
|
1
2
3
4
5
6
|
20 chunks |
+154 lines, -134 lines |
0 comments
|
Download
|
 |
M |
cc/trees/layer_tree_host_unittest_context.cc
|
View
|
1
|
11 chunks |
+48 lines, -43 lines |
0 comments
|
Download
|
 |
M |
cc/trees/layer_tree_host_unittest_copyrequest.cc
|
View
|
|
10 chunks |
+123 lines, -96 lines |
0 comments
|
Download
|
 |
M |
cc/trees/layer_tree_host_unittest_damage.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/android/synchronous_compositor_output_surface.h
|
View
|
1
2
3
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/renderer/gpu/render_widget_compositor_unittest.cc
|
View
|
1
2
3
|
2 chunks |
+15 lines, -11 lines |
0 comments
|
Download
|
 |
M |
content/test/layouttest_support.cc
|
View
|
1
2
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
services/ui/surfaces/display_compositor.h
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
services/ui/surfaces/display_compositor.cc
|
View
|
|
1 chunk |
+12 lines, -0 lines |
0 comments
|
Download
|
Total messages: 65 (45 generated)
|