Since we'll be running skia in the GPU process, a lot of initialization logic for resource cache limits and such that we do in the renderer needs to be replicated in the GPU process when running OOP raster. Example: Font cache limits (https://cs.chromium.org/chromium/src/content/renderer/renderer_main.cc?type=cs&g=0&l=141).
We also want memory pressure signals in the GPU to purge skia's caches.
Patches in review/CQ: https://chromium-review.googlesource.com/c/chromium/src/+/1081610 and https://chromium-review.googlesource.com/c/chromium/src/+/1081273.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a4e236f29d7501bcbaa62ecb6464bb384244cec2 commit a4e236f29d7501bcbaa62ecb6464bb384244cec2 Author: Khushal <khushalsagar@chromium.org> Date: Fri Jun 01 03:00:46 2018 content: Initialize skia in the GPU process for OOP raster. Pull out the common skia initialization setup to a skia_utils used for skia initialization in both the renderer and GPU. R=piman@chromium.org Bug: 844207 Change-Id: I629a7a036def92ede84dbb05f61207ce82762abf Reviewed-on: https://chromium-review.googlesource.com/1081610 Commit-Queue: Khushal <khushalsagar@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Cr-Commit-Position: refs/heads/master@{#563506} [modify] https://crrev.com/a4e236f29d7501bcbaa62ecb6464bb384244cec2/content/browser/gpu/gpu_process_host.cc [modify] https://crrev.com/a4e236f29d7501bcbaa62ecb6464bb384244cec2/content/common/BUILD.gn [add] https://crrev.com/a4e236f29d7501bcbaa62ecb6464bb384244cec2/content/common/skia_utils.cc [add] https://crrev.com/a4e236f29d7501bcbaa62ecb6464bb384244cec2/content/common/skia_utils.h [modify] https://crrev.com/a4e236f29d7501bcbaa62ecb6464bb384244cec2/content/gpu/gpu_child_thread.cc [modify] https://crrev.com/a4e236f29d7501bcbaa62ecb6464bb384244cec2/content/gpu/gpu_main.cc [modify] https://crrev.com/a4e236f29d7501bcbaa62ecb6464bb384244cec2/content/renderer/render_thread_impl.cc [modify] https://crrev.com/a4e236f29d7501bcbaa62ecb6464bb384244cec2/content/renderer/renderer_main.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0aac620787d48dbc9b40964542430b6ed104c343 commit 0aac620787d48dbc9b40964542430b6ed104c343 Author: Khushal <khushalsagar@chromium.org> Date: Fri Jun 01 19:33:17 2018 content: Hook up memory pressure signal to the GPU process. Listen to memory pressure signals in the GPU process to clear caches from skia for OOP raster. R=dcheng@chromium.org, piman@chromium.org Bug: 844207 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel Change-Id: Ia78d1ebcf73747322a310b02071efb8d304ae017 Reviewed-on: https://chromium-review.googlesource.com/1081273 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Khushal <khushalsagar@chromium.org> Cr-Commit-Position: refs/heads/master@{#563753} [modify] https://crrev.com/0aac620787d48dbc9b40964542430b6ed104c343/components/viz/service/main/viz_main_impl.h [modify] https://crrev.com/0aac620787d48dbc9b40964542430b6ed104c343/content/child/child_thread_impl.cc [modify] https://crrev.com/0aac620787d48dbc9b40964542430b6ed104c343/content/child/child_thread_impl.h [modify] https://crrev.com/0aac620787d48dbc9b40964542430b6ed104c343/content/gpu/gpu_child_thread.cc [modify] https://crrev.com/0aac620787d48dbc9b40964542430b6ed104c343/content/gpu/gpu_child_thread.h [modify] https://crrev.com/0aac620787d48dbc9b40964542430b6ed104c343/content/public/app/mojo/content_browser_manifest.json [modify] https://crrev.com/0aac620787d48dbc9b40964542430b6ed104c343/content/renderer/render_thread_impl.cc [modify] https://crrev.com/0aac620787d48dbc9b40964542430b6ed104c343/content/renderer/render_thread_impl.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/96f72653c2d3e1492d53d2fb105e4df973f64845 commit 96f72653c2d3e1492d53d2fb105e4df973f64845 Author: Khushal <khushalsagar@chromium.org> Date: Fri Jun 01 23:50:06 2018 gpu: Add memory pressure signal to ServiceTransferCache. A lot of memory caching moves to the transfer cache with OOP rasterization, we should take the memory state of the system into account when budgeting. R=piman@chromium.org Bug: 844207 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: I1888acaea33f6d9f8c27db479866f77fbfe49b82 Reviewed-on: https://chromium-review.googlesource.com/1083139 Commit-Queue: Khushal <khushalsagar@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Cr-Commit-Position: refs/heads/master@{#563867} [modify] https://crrev.com/96f72653c2d3e1492d53d2fb105e4df973f64845/gpu/BUILD.gn [modify] https://crrev.com/96f72653c2d3e1492d53d2fb105e4df973f64845/gpu/command_buffer/service/service_transfer_cache.cc [modify] https://crrev.com/96f72653c2d3e1492d53d2fb105e4df973f64845/gpu/command_buffer/service/service_transfer_cache.h [add] https://crrev.com/96f72653c2d3e1492d53d2fb105e4df973f64845/gpu/command_buffer/service/service_transfer_cache_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9b937d838986b6bd6c7e645a61a9702f635de8da commit 9b937d838986b6bd6c7e645a61a9702f635de8da Author: Khushal <khushalsagar@chromium.org> Date: Mon Jun 04 22:18:03 2018 content: Set up binding request for memory coordinator from GPU. Change [1] hooked up handling of signals from the memory coordinator in the GPU process, but didn't set up binding the request to the global coordinator in the browser. [1]: https://chromium-review.googlesource.com/c/chromium/src/+/1081273 Bug: 844207 Change-Id: Icc3b4ee98952b549e3c3b3ed13dc3637a1c7b0e0 Reviewed-on: https://chromium-review.googlesource.com/1083148 Commit-Queue: Khushal <khushalsagar@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Reviewed-by: Kenichi Ishibashi <bashi@chromium.org> Cr-Commit-Position: refs/heads/master@{#564265} [modify] https://crrev.com/9b937d838986b6bd6c7e645a61a9702f635de8da/content/browser/gpu/gpu_process_host.cc [modify] https://crrev.com/9b937d838986b6bd6c7e645a61a9702f635de8da/content/browser/gpu/gpu_process_host.h [modify] https://crrev.com/9b937d838986b6bd6c7e645a61a9702f635de8da/content/browser/memory/memory_coordinator_impl_browsertest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/437a6e06afb10d3f39fb44969ab3734aad99ca88 commit 437a6e06afb10d3f39fb44969ab3734aad99ca88 Author: Khushal <khushalsagar@chromium.org> Date: Thu Jun 14 05:08:53 2018 gpu: Tune Gr cache memory limits for OOP raster. Use same limits for GrContext cache limits in OOP and GPU raster, which is tuned based on system memory. R=piman@chromium.org TBR=sadrul@chromium.org Bug: 844207 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I7a0ae83a4b1ff14d2a9b5f14f6568a9c9cf25dc1 Reviewed-on: https://chromium-review.googlesource.com/1100008 Commit-Queue: Khushal <khushalsagar@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Cr-Commit-Position: refs/heads/master@{#567148} [modify] https://crrev.com/437a6e06afb10d3f39fb44969ab3734aad99ca88/cc/test/DEPS [modify] https://crrev.com/437a6e06afb10d3f39fb44969ab3734aad99ca88/cc/test/test_in_process_context_provider.cc [modify] https://crrev.com/437a6e06afb10d3f39fb44969ab3734aad99ca88/components/viz/service/display_embedder/viz_process_context_provider.cc [modify] https://crrev.com/437a6e06afb10d3f39fb44969ab3734aad99ca88/components/viz/test/DEPS [modify] https://crrev.com/437a6e06afb10d3f39fb44969ab3734aad99ca88/components/viz/test/test_context_provider.cc [modify] https://crrev.com/437a6e06afb10d3f39fb44969ab3734aad99ca88/gpu/command_buffer/common/BUILD.gn [add] https://crrev.com/437a6e06afb10d3f39fb44969ab3734aad99ca88/gpu/command_buffer/common/skia_utils.cc [add] https://crrev.com/437a6e06afb10d3f39fb44969ab3734aad99ca88/gpu/command_buffer/common/skia_utils.h [modify] https://crrev.com/437a6e06afb10d3f39fb44969ab3734aad99ca88/gpu/command_buffer/service/raster_decoder.cc [modify] https://crrev.com/437a6e06afb10d3f39fb44969ab3734aad99ca88/gpu/skia_bindings/grcontext_for_gles2_interface.cc [modify] https://crrev.com/437a6e06afb10d3f39fb44969ab3734aad99ca88/gpu/skia_bindings/grcontext_for_gles2_interface.h [modify] https://crrev.com/437a6e06afb10d3f39fb44969ab3734aad99ca88/services/ui/public/cpp/gpu/context_provider_command_buffer.cc [modify] https://crrev.com/437a6e06afb10d3f39fb44969ab3734aad99ca88/ui/compositor/test/in_process_context_provider.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8a9bb7e97fd63fe5042739582211898df9c13841 commit 8a9bb7e97fd63fe5042739582211898df9c13841 Author: Khushal <khushalsagar@chromium.org> Date: Fri Jun 15 00:33:11 2018 gpu: Move skia_utils to raster_sources in gpu/command_buffer/common. R=piman@chromium.org Bug: 844207 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I5b324498db07afdb342d555982781f922a3e3b94 Reviewed-on: https://chromium-review.googlesource.com/1101458 Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Khushal <khushalsagar@chromium.org> Cr-Commit-Position: refs/heads/master@{#567499} [modify] https://crrev.com/8a9bb7e97fd63fe5042739582211898df9c13841/cc/test/test_in_process_context_provider.cc [modify] https://crrev.com/8a9bb7e97fd63fe5042739582211898df9c13841/components/viz/service/display_embedder/viz_process_context_provider.cc [modify] https://crrev.com/8a9bb7e97fd63fe5042739582211898df9c13841/components/viz/test/test_context_provider.cc [modify] https://crrev.com/8a9bb7e97fd63fe5042739582211898df9c13841/gpu/command_buffer/common/BUILD.gn [modify] https://crrev.com/8a9bb7e97fd63fe5042739582211898df9c13841/gpu/command_buffer/common/skia_utils.cc [modify] https://crrev.com/8a9bb7e97fd63fe5042739582211898df9c13841/gpu/command_buffer/common/skia_utils.h [modify] https://crrev.com/8a9bb7e97fd63fe5042739582211898df9c13841/gpu/command_buffer/service/BUILD.gn [modify] https://crrev.com/8a9bb7e97fd63fe5042739582211898df9c13841/services/ui/public/cpp/gpu/BUILD.gn [modify] https://crrev.com/8a9bb7e97fd63fe5042739582211898df9c13841/services/ui/public/cpp/gpu/context_provider_command_buffer.cc [modify] https://crrev.com/8a9bb7e97fd63fe5042739582211898df9c13841/ui/compositor/test/in_process_context_provider.cc
Comment 1 by enne@chromium.org
, May 18 2018