|
Migrate WebGL contexts on backgrounded tabs to the integrated GPU.
Use the canvas element's PageVisibilityObserver to detect when the tab
is moved to the background, and for WebGL contexts, give a hint that
they should use low power mode. This causes the CGLPixelFormatObj
which was causing the context to use the discrete GPU to be released.
It's not clear whether this is legal. In the past, problems were seen
where the discrete GPU on macOS supported certain resource formats
(textures, renderbuffers, etc.) that the integrated GPU didn't. It's
not clear what happens to these resources if the system switches from
the discrete to the integrated GPU.
Lightly tested this manually with Google Maps, ShaderToy, and the
WebGL Aquarium. The cost of switching GPUs appears to be low though
not insignificant, but no obviously incorrect rendering was observed.
BUG= 681341
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+260 lines, -11 lines) |
Patch |
 |
M |
gpu/GLES2/gl2chromium_autogen.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/GLES2/gl2extchromium.h
|
View
|
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/build_gles2_cmd_buffer.py
|
View
|
|
2 chunks |
+15 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/client/gles2_c_lib_autogen.h
|
View
|
|
2 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/client/gles2_cmd_helper_autogen.h
|
View
|
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/client/gles2_implementation_autogen.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/client/gles2_implementation_impl_autogen.h
|
View
|
|
1 chunk |
+8 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/client/gles2_interface_autogen.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/client/gles2_interface_stub_autogen.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/client/gles2_trace_implementation_autogen.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/cmd_buffer_functions.txt
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/common/gles2_cmd_format_autogen.h
|
View
|
|
1 chunk |
+33 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
|
View
|
|
1 chunk |
+11 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/common/gles2_cmd_ids_autogen.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/common/gles2_cmd_utils_autogen.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
|
View
|
|
2 chunks |
+19 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_decoder.cc
|
View
|
|
2 chunks |
+17 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
|
View
|
|
1 chunk |
+15 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doer_prototypes.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
|
View
|
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers_autogen.cc
|
View
|
|
1 chunk |
+14 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_validation_autogen.h
|
View
|
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h
|
View
|
|
1 chunk |
+11 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_bindings.h
|
View
|
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_context.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_context.cc
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_context_cgl.h
|
View
|
|
2 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/gl/gl_context_cgl.cc
|
View
|
|
3 chunks |
+31 lines, -10 lines |
2 comments
|
Download
|
 |
M |
ui/gl/gpu_preference.h
|
View
|
|
1 chunk |
+7 lines, -0 lines |
0 comments
|
Download
|
Total messages: 7 (2 generated)
|