New issue
Advanced search Search tips

Issue 684072 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 677556



Sign in to add a comment

Cleanup ContextProviderFactory from ui/android

Project Member Reported by khushals...@chromium.org, Jan 23 2017

Issue description

We added a ContextProviderFactory interface in ui/android so Chrome could create ContextProviders for compositors running in blimp.

The impl lives in content and has a lot of complexity, which is now unnecessary since its only CompositorImpl that needs anything from that class. May be we can kill the interface and move what the impl does back to CompositorImpl? The async gpu channel request will go back to CompositorImpl, and it will have a static method to expose the SurfaceManager singleton.

+boliu, sounds good?
 

Comment 1 by boliu@chromium.org, Jan 23 2017

This is basically reverting the refactor that added ContextProviderFactory, right? sgtm
khushalsagar: Any updates on this? You mentioned you'd try to get to this this week.
Status: Started (was: Assigned)
Ah sorry, I'm on it. Another thing here was that requesting the GpuChannelHost from BrowserGpuChannelHostFactory can get reentrant on shutdown, because in the callback the caller sees a null host and makes another request: https://cs.chromium.org/chromium/src/content/browser/gpu/browser_gpu_channel_host_factory.cc?type=cs&l=256

When I wrote the ContextProviderFactory I added an enum to the callback to indicate why the host was null so we don't get more requests on shutdown, may be that should be on GpuChannelEstablishFactory itself?
Project Member

Comment 5 by bugdroid1@chromium.org, Feb 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/31690fb03a1ca682147c4e1f81a7d8479c88a233

commit 31690fb03a1ca682147c4e1f81a7d8479c88a233
Author: khushalsagar <khushalsagar@chromium.org>
Date: Tue Feb 28 23:23:48 2017

content/ui[Android]: Remove ContextProviderFactory.

The class was added in ui/ to expose the compositor dependencies needed
by blimp, which is no longer necessary. The change removes the interface
and the implementation from content with the functionality added to
CompositorImpl.

Also, the logic for shutdown in GpuChannelEstablishFactory can currently
be reentrant, since the factory loops over all pending callbacks, and
running the callbacks with a null host can have the caller retry and add
to this list. This makes sure that the factory doesn't add any more
requests during shutdown.

BUG= 684072 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2686243002
Cr-Commit-Position: refs/heads/master@{#453738}

[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/content/browser/BUILD.gn
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/content/browser/browser_main_loop.cc
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/content/browser/compositor/surface_utils.cc
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/content/browser/gpu/browser_gpu_channel_host_factory.cc
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/content/browser/gpu/gpu_ipc_browsertests.cc
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/content/browser/renderer_host/compositor_impl_android.cc
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/content/browser/renderer_host/compositor_impl_android.h
[delete] https://crrev.com/1a04e1cf3d4912300d625a57318bc6f2ba53ba79/content/browser/renderer_host/context_provider_factory_impl_android.cc
[delete] https://crrev.com/1a04e1cf3d4912300d625a57318bc6f2ba53ba79/content/browser/renderer_host/context_provider_factory_impl_android.h
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/content/browser/renderer_host/offscreen_canvas_surface_manager_unittest.cc
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/content/browser/renderer_host/render_widget_host_unittest.cc
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/content/browser/renderer_host/render_widget_host_view_android.cc
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/content/public/test/test_renderer_host.cc
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/content/public/test/test_renderer_host.h
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/content/test/BUILD.gn
[delete] https://crrev.com/1a04e1cf3d4912300d625a57318bc6f2ba53ba79/content/test/mock_gpu_channel_establish_factory.cc
[delete] https://crrev.com/1a04e1cf3d4912300d625a57318bc6f2ba53ba79/content/test/mock_gpu_channel_establish_factory.h
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/content/test/test_render_view_host.cc
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/services/ui/public/cpp/gpu/command_buffer_metrics.cc
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/services/ui/public/cpp/gpu/command_buffer_metrics.h
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/services/ui/public/cpp/gpu/gpu.cc
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/tools/metrics/histograms/histograms.xml
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/ui/android/BUILD.gn
[delete] https://crrev.com/1a04e1cf3d4912300d625a57318bc6f2ba53ba79/ui/android/context_provider_factory.cc
[delete] https://crrev.com/1a04e1cf3d4912300d625a57318bc6f2ba53ba79/ui/android/context_provider_factory.h
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/ui/android/delegated_frame_host_android.cc
[modify] https://crrev.com/31690fb03a1ca682147c4e1f81a7d8479c88a233/ui/android/delegated_frame_host_android.h

Status: Fixed (was: Started)

Sign in to add a comment