|
command_buffer: Defer restoring of FBO bindings when changing virtual contexts
Defer restoring of FBO bindings when changing virtual contexts.
Restoring FBO bindings during MakeCurrent of a virtual context consumes
significant amount of the MakeCurrent duration. For GPU rasterization,
this work is wasted, as Skia will rebind GL state, including FBOs, for
each tile rendered.
Defer the FBO binding only during the context state restore, not
when client calls BindFramebuffer. This is mainly because the
unit test expectations are hard to change correctly.
Following operations leave the FBO binding dirty:
* Decoder state restore (Virtual context MakeCurrent)
* Decoder MakeCurrent (Non-virtual context MakeCurrent)
* Client deleting an FBO that is bound
* Copying a texture with CopyTextureCHROMIUM
* ScopedResolvedFrameBufferBinder
Other operations will bind the correct
FBO eagerly:
* Client calling BindFramebuffer
* Decoder switching surfaces
* ...
These are left to bind eagerly, as the current test expectations are
laborous to modify. Later on, if the benefit in uniformity of the decoder code
or performance is seen as worth the complication in the test expectation setup,
these could be modified too.
All the operations that use the FBOs will now call
GLES2DecoderImpl::ApplyFramebufferBindings before doing operations
that need the FBO.
Changes to the tests:
* Deleting FBOs do not cause any BindFramebuffer calls, so remove the expectation.
* Using another FBO after FBO delete will cause BindFramebuffer call, so add the
expectation at the use site.
* Few tests did bind the targeted framebuffer multiple times without reason.
BUG= 603407
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
Total comments: 3
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+257 lines, -286 lines) |
Patch |
 |
M |
gpu/command_buffer/build_gles2_cmd_buffer.py
|
View
|
1
|
9 chunks |
+16 lines, -10 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
|
View
|
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/framebuffer_manager.h
|
View
|
1
|
1 chunk |
+34 lines, -3 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/framebuffer_manager.cc
|
View
|
1
|
1 chunk |
+60 lines, -4 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gl_state_restorer_impl.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h
|
View
|
|
5 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc
|
View
|
|
9 chunks |
+10 lines, -10 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_decoder.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_decoder.cc
|
View
|
1
|
41 chunks |
+106 lines, -174 lines |
2 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
|
View
|
|
6 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_decoder_mock.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
|
View
|
|
1 chunk |
+1 line, -8 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
|
View
|
|
1 chunk |
+1 line, -4 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
|
View
|
|
1 chunk |
+2 lines, -14 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
|
View
|
1
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc
|
View
|
1
|
4 chunks |
+6 lines, -26 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/texture_manager.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
gpu/config/gpu_driver_bug_list_json.cc
|
View
|
1
|
3 chunks |
+4 lines, -4 lines |
1 comment
|
Download
|
 |
M |
mojo/gpu/mojo_gles2_impl_autogen.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_enums_implementation_autogen.h
|
View
|
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
Depends on Patchset:
Total messages: 7 (4 generated)
|