Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1470)

Issue 2297933002: blimp: Set up the CompositorDependencies for blimp in Chrome. (Closed)

Created:
4 years, 3 months ago by Khushal
Modified:
4 years, 3 months ago
CC:
chromium-reviews, anandc+watch-blimp_chromium.org, maniscalco+watch-blimp_chromium.org, sriramsr+watch-blimp_chromium.org, gcasto+watch-blimp_chromium.org, nyquist+watch-blimp_chromium.org, marcinjb+watch-blimp_chromium.org, jessicag+watch-blimp_chromium.org, kmarshall+watch-blimp_chromium.org, lethalantidote+watch-blimp_chromium.org, dtrainor+watch-blimp_chromium.org, shaktisahu+watch-blimp_chromium.org, khushalsagar+watch-blimp_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

blimp: Set up the CompositorDependencies for blimp in Chrome. Add ChromeCompositorDependencies to implement the CompositorDependencies for blimp in Chrome. The class passes through to the ui::ContextProviderFactory to create the contexts. TBR=jochen BUG=611105 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/8ecea2e7082ed06d138d5b74f8a6cff2873b6af9 Cr-Commit-Position: refs/heads/master@{#416333}

Patch Set 1 #

Total comments: 16

Patch Set 2 : Rebase #

Patch Set 3 : addressed comments. #

Total comments: 4

Patch Set 4 : comments addressed. #

Patch Set 5 : Rebase #

Total comments: 12

Patch Set 6 : remove the struct #

Patch Set 7 : change to a Gpu Channel callback #

Total comments: 19

Patch Set 8 : Addressed comments. #

Total comments: 8

Patch Set 9 : Addressed Dana's comments #

Patch Set 10 : Rebase. #

Patch Set 11 : retry gpu process failures after crbug.com/643282 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+627 lines, -293 lines) Patch
M blimp/client/app/compositor/browser_compositor.cc View 1 chunk +1 line, -1 line 0 comments Download
M blimp/client/core/compositor/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M blimp/client/core/compositor/blimp_compositor.h View 1 2 3 4 5 4 chunks +8 lines, -7 lines 0 comments Download
M blimp/client/core/compositor/blimp_compositor.cc View 1 2 3 4 5 5 chunks +25 lines, -13 lines 0 comments Download
M blimp/client/core/compositor/blimp_compositor_dependencies.h View 1 2 3 chunks +6 lines, -0 lines 0 comments Download
M blimp/client/core/compositor/blimp_compositor_dependencies.cc View 1 2 2 chunks +11 lines, -0 lines 0 comments Download
M blimp/client/public/blimp_client_context.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M blimp/client/public/compositor/compositor_dependencies.h View 1 2 3 4 5 2 chunks +5 lines, -6 lines 0 comments Download
M blimp/client/support/compositor/blimp_context_provider.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M blimp/client/support/compositor/blimp_context_provider.cc View 1 1 chunk +1 line, -3 lines 0 comments Download
M blimp/client/support/compositor/blimp_layer_tree_settings.cc View 1 2 2 chunks +51 lines, -0 lines 0 comments Download
M blimp/client/support/compositor/compositor_dependencies_impl.h View 1 2 1 chunk +2 lines, -4 lines 0 comments Download
M blimp/client/support/compositor/compositor_dependencies_impl.cc View 1 2 3 4 5 3 chunks +8 lines, -65 lines 0 comments Download
M blimp/client/support/compositor/mock_compositor_dependencies.h View 1 1 chunk +1 line, -1 line 0 comments Download
M blimp/client/support/compositor/mock_compositor_dependencies.cc View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/android/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/android/blimp/blimp_client_context_factory.cc View 1 2 chunks +4 lines, -1 line 0 comments Download
A chrome/browser/android/blimp/chrome_compositor_dependencies.h View 1 2 3 4 5 6 7 8 1 chunk +47 lines, -0 lines 0 comments Download
A chrome/browser/android/blimp/chrome_compositor_dependencies.cc View 1 2 3 4 5 6 7 8 1 chunk +131 lines, -0 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 7 8 9 3 chunks +9 lines, -2 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +7 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest_unittest.cc View 1 2 3 4 5 6 7 8 9 7 chunks +18 lines, -0 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +44 lines, -27 lines 0 comments Download
M content/browser/renderer_host/context_provider_factory_impl_android.h View 1 2 3 4 5 6 7 8 9 5 chunks +26 lines, -36 lines 0 comments Download
M content/browser/renderer_host/context_provider_factory_impl_android.cc View 1 2 3 4 5 6 7 8 9 7 chunks +96 lines, -107 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_unittest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +7 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/test/test_renderer_host.h View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -0 lines 0 comments Download
M content/public/test/test_renderer_host.cc View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -0 lines 0 comments Download
A content/test/mock_gpu_channel_establish_factory.h View 1 2 3 4 5 6 7 8 9 1 chunk +26 lines, -0 lines 0 comments Download
A content/test/mock_gpu_channel_establish_factory.cc View 1 2 3 4 5 6 7 8 9 1 chunk +28 lines, -0 lines 0 comments Download
M content/test/test_render_view_host.cc View 1 2 3 4 5 6 7 8 9 3 chunks +20 lines, -7 lines 0 comments Download
M ui/android/context_provider_factory.h View 1 2 3 4 5 6 7 8 9 3 chunks +21 lines, -6 lines 0 comments Download

Messages

Total messages: 52 (20 generated)
Khushal
4 years, 3 months ago (2016-08-30 23:10:20 UTC) #2
Khushal
+danakj for DEPS.
4 years, 3 months ago (2016-08-30 23:11:52 UTC) #4
David Trainor- moved to gerrit
https://codereview.chromium.org/2297933002/diff/1/blimp/client/core/blimp_client_context_impl_unittest.cc File blimp/client/core/blimp_client_context_impl_unittest.cc (right): https://codereview.chromium.org/2297933002/diff/1/blimp/client/core/blimp_client_context_impl_unittest.cc#newcode53 blimp/client/core/blimp_client_context_impl_unittest.cc:53: base::MakeUnique<CompositorDependenciesImpl>()); I moved MockCompositorDependencies out to blimp/client/support/compositor since that ...
4 years, 3 months ago (2016-08-31 00:28:58 UTC) #5
Khushal
https://codereview.chromium.org/2297933002/diff/1/blimp/client/core/blimp_client_context_impl_unittest.cc File blimp/client/core/blimp_client_context_impl_unittest.cc (right): https://codereview.chromium.org/2297933002/diff/1/blimp/client/core/blimp_client_context_impl_unittest.cc#newcode53 blimp/client/core/blimp_client_context_impl_unittest.cc:53: base::MakeUnique<CompositorDependenciesImpl>()); On 2016/08/31 00:28:58, David Trainor wrote: > I ...
4 years, 3 months ago (2016-08-31 21:22:51 UTC) #6
Khushal
4 years, 3 months ago (2016-08-31 21:46:07 UTC) #8
David Trainor- moved to gerrit
lgtm % nits https://codereview.chromium.org/2297933002/diff/40001/blimp/client/core/compositor/blimp_compositor.cc File blimp/client/core/compositor/blimp_compositor.cc (right): https://codereview.chromium.org/2297933002/diff/40001/blimp/client/core/compositor/blimp_compositor.cc#newcode288 blimp/client/core/compositor/blimp_compositor.cc:288: settings->abort_commit_before_output_surface_creation = false; Add comment why ...
4 years, 3 months ago (2016-08-31 21:49:58 UTC) #9
Khushal
https://codereview.chromium.org/2297933002/diff/40001/blimp/client/core/compositor/blimp_compositor.cc File blimp/client/core/compositor/blimp_compositor.cc (right): https://codereview.chromium.org/2297933002/diff/40001/blimp/client/core/compositor/blimp_compositor.cc#newcode288 blimp/client/core/compositor/blimp_compositor.cc:288: settings->abort_commit_before_output_surface_creation = false; On 2016/08/31 21:49:58, David Trainor wrote: ...
4 years, 3 months ago (2016-08-31 22:04:57 UTC) #10
danakj
https://codereview.chromium.org/2297933002/diff/80001/chrome/browser/android/blimp/chrome_compositor_dependencies.cc File chrome/browser/android/blimp/chrome_compositor_dependencies.cc (right): https://codereview.chromium.org/2297933002/diff/80001/chrome/browser/android/blimp/chrome_compositor_dependencies.cc#newcode18 chrome/browser/android/blimp/chrome_compositor_dependencies.cc:18: if (!context_provider) Why would it not just be a ...
4 years, 3 months ago (2016-09-01 19:26:06 UTC) #15
Khushal
https://codereview.chromium.org/2297933002/diff/80001/chrome/browser/android/blimp/chrome_compositor_dependencies.cc File chrome/browser/android/blimp/chrome_compositor_dependencies.cc (right): https://codereview.chromium.org/2297933002/diff/80001/chrome/browser/android/blimp/chrome_compositor_dependencies.cc#newcode18 chrome/browser/android/blimp/chrome_compositor_dependencies.cc:18: if (!context_provider) On 2016/09/01 19:26:06, danakj wrote: > Why ...
4 years, 3 months ago (2016-09-01 19:39:57 UTC) #16
danakj
https://codereview.chromium.org/2297933002/diff/80001/chrome/browser/android/blimp/chrome_compositor_dependencies.cc File chrome/browser/android/blimp/chrome_compositor_dependencies.cc (right): https://codereview.chromium.org/2297933002/diff/80001/chrome/browser/android/blimp/chrome_compositor_dependencies.cc#newcode22 chrome/browser/android/blimp/chrome_compositor_dependencies.cc:22: return context_provider->ContextGL()->GetGraphicsResetStatusKHR() == On 2016/09/01 19:39:57, Khushal wrote: > ...
4 years, 3 months ago (2016-09-01 19:55:20 UTC) #17
Khushal
https://codereview.chromium.org/2297933002/diff/80001/chrome/browser/android/blimp/chrome_compositor_dependencies.cc File chrome/browser/android/blimp/chrome_compositor_dependencies.cc (right): https://codereview.chromium.org/2297933002/diff/80001/chrome/browser/android/blimp/chrome_compositor_dependencies.cc#newcode22 chrome/browser/android/blimp/chrome_compositor_dependencies.cc:22: return context_provider->ContextGL()->GetGraphicsResetStatusKHR() == On 2016/09/01 19:55:20, danakj wrote: > ...
4 years, 3 months ago (2016-09-01 20:10:24 UTC) #18
danakj
https://codereview.chromium.org/2297933002/diff/80001/chrome/browser/android/blimp/chrome_compositor_dependencies.cc File chrome/browser/android/blimp/chrome_compositor_dependencies.cc (right): https://codereview.chromium.org/2297933002/diff/80001/chrome/browser/android/blimp/chrome_compositor_dependencies.cc#newcode133 chrome/browser/android/blimp/chrome_compositor_dependencies.cc:133: context_provider_factory_->CreateOffscreenContextProvider( On 2016/09/01 20:10:23, Khushal wrote: > On 2016/09/01 ...
4 years, 3 months ago (2016-09-01 20:14:01 UTC) #19
Khushal
https://codereview.chromium.org/2297933002/diff/80001/chrome/browser/android/blimp/chrome_compositor_dependencies.cc File chrome/browser/android/blimp/chrome_compositor_dependencies.cc (right): https://codereview.chromium.org/2297933002/diff/80001/chrome/browser/android/blimp/chrome_compositor_dependencies.cc#newcode133 chrome/browser/android/blimp/chrome_compositor_dependencies.cc:133: context_provider_factory_->CreateOffscreenContextProvider( On 2016/09/01 20:14:01, danakj wrote: > On 2016/09/01 ...
4 years, 3 months ago (2016-09-01 20:47:37 UTC) #20
danakj
On Thu, Sep 1, 2016 at 1:47 PM, <khushalsagar@chromium.org> wrote: > > https://codereview.chromium.org/2297933002/diff/80001/ > chrome/browser/android/blimp/chrome_compositor_dependencies.cc ...
4 years, 3 months ago (2016-09-01 21:00:00 UTC) #21
Khushal
Changed it to option 1. Could you take another look Dana?
4 years, 3 months ago (2016-09-01 23:10:29 UTC) #22
Khushal
+piman for content change, I'm sorry about the back and forth on this. Hopefully this ...
4 years, 3 months ago (2016-09-01 23:35:07 UTC) #24
danakj
I guess this gets a bunch simpler when we move ContextProviderCommandBuffer from content/ to gpu/. ...
4 years, 3 months ago (2016-09-01 23:35:19 UTC) #26
danakj
On 2016/09/01 23:35:19, danakj wrote: > I guess this gets a bunch simpler when we ...
4 years, 3 months ago (2016-09-01 23:39:06 UTC) #27
Khushal
Thanks Dana, done! https://codereview.chromium.org/2297933002/diff/120001/chrome/browser/android/blimp/chrome_compositor_dependencies.cc File chrome/browser/android/blimp/chrome_compositor_dependencies.cc (right): https://codereview.chromium.org/2297933002/diff/120001/chrome/browser/android/blimp/chrome_compositor_dependencies.cc#newcode73 chrome/browser/android/blimp/chrome_compositor_dependencies.cc:73: pending_requests_.push_back(callback); On 2016/09/01 23:35:18, danakj wrote: ...
4 years, 3 months ago (2016-09-02 00:24:33 UTC) #28
danakj
https://codereview.chromium.org/2297933002/diff/120001/chrome/browser/android/blimp/chrome_compositor_dependencies.cc File chrome/browser/android/blimp/chrome_compositor_dependencies.cc (right): https://codereview.chromium.org/2297933002/diff/120001/chrome/browser/android/blimp/chrome_compositor_dependencies.cc#newcode80 chrome/browser/android/blimp/chrome_compositor_dependencies.cc:80: const scoped_refptr<gpu::GpuChannelHost>& gpu_channel_host, On 2016/09/02 00:24:32, Khushal wrote: > ...
4 years, 3 months ago (2016-09-02 00:30:56 UTC) #29
danakj
Thanks :) https://codereview.chromium.org/2297933002/diff/140001/chrome/browser/android/blimp/chrome_compositor_dependencies.h File chrome/browser/android/blimp/chrome_compositor_dependencies.h (right): https://codereview.chromium.org/2297933002/diff/140001/chrome/browser/android/blimp/chrome_compositor_dependencies.h#newcode8 chrome/browser/android/blimp/chrome_compositor_dependencies.h:8: #include <queue> not used in the end? ...
4 years, 3 months ago (2016-09-02 00:35:29 UTC) #30
piman
LGTM after Dana's comments are addressed.
4 years, 3 months ago (2016-09-02 01:07:15 UTC) #32
Khushal
https://codereview.chromium.org/2297933002/diff/120001/chrome/browser/android/blimp/chrome_compositor_dependencies.cc File chrome/browser/android/blimp/chrome_compositor_dependencies.cc (right): https://codereview.chromium.org/2297933002/diff/120001/chrome/browser/android/blimp/chrome_compositor_dependencies.cc#newcode80 chrome/browser/android/blimp/chrome_compositor_dependencies.cc:80: const scoped_refptr<gpu::GpuChannelHost>& gpu_channel_host, On 2016/09/02 00:30:56, danakj wrote: > ...
4 years, 3 months ago (2016-09-02 01:13:35 UTC) #33
Khushal
https://codereview.chromium.org/2297933002/diff/140001/chrome/browser/android/blimp/chrome_compositor_dependencies.h File chrome/browser/android/blimp/chrome_compositor_dependencies.h (right): https://codereview.chromium.org/2297933002/diff/140001/chrome/browser/android/blimp/chrome_compositor_dependencies.h#newcode8 chrome/browser/android/blimp/chrome_compositor_dependencies.h:8: #include <queue> On 2016/09/02 00:35:29, danakj wrote: > not ...
4 years, 3 months ago (2016-09-02 16:26:47 UTC) #34
Khushal
Much of what the rebase pulled in was test changes from https://codereview.chromium.org/2297273004/ which was reverted. ...
4 years, 3 months ago (2016-09-02 17:37:27 UTC) #36
danakj
On Fri, Sep 2, 2016 at 10:37 AM, <khushalsagar@chromium.org> wrote: > Much of what the ...
4 years, 3 months ago (2016-09-02 20:13:28 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2297933002/200001
4 years, 3 months ago (2016-09-02 20:20:24 UTC) #45
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 3 months ago (2016-09-02 20:26:17 UTC) #47
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/8ecea2e7082ed06d138d5b74f8a6cff2873b6af9 Cr-Commit-Position: refs/heads/master@{#416333}
4 years, 3 months ago (2016-09-02 20:27:59 UTC) #49
Khushal
On 2016/09/02 20:13:28, danakj wrote: > On Fri, Sep 2, 2016 at 10:37 AM, <mailto:khushalsagar@chromium.org> ...
4 years, 3 months ago (2016-09-02 23:01:11 UTC) #50
danakj
On Fri, Sep 2, 2016 at 4:01 PM, <khushalsagar@chromium.org> wrote: > On 2016/09/02 20:13:28, danakj ...
4 years, 3 months ago (2016-09-02 23:10:24 UTC) #51
Khushal
4 years, 3 months ago (2016-09-02 23:33:50 UTC) #52
Message was sent while issue was closed.
On 2016/09/02 23:10:24, danakj wrote:
> On Fri, Sep 2, 2016 at 4:01 PM, <mailto:khushalsagar@chromium.org> wrote:
> 
> > On 2016/09/02 20:13:28, danakj wrote:
> > > On Fri, Sep 2, 2016 at 10:37 AM, <mailto:khushalsagar@chromium.org>
> > wrote:
> > >
> > > > Much of what the rebase pulled in was test changes from
> > > > https://codereview.chromium.org/2297273004/ which was reverted.
> > > >
> > > > Now the callers get notified when the GpuChannelEstablishFactory gives
> > a
> > > > null
> > > > host. The original change was having us retry because we assume that
> > it is
> > > > because of a system failure to initialize the Gpu process but it
> > probably
> > > > needs
> > > > more info to know if its because the Gpu is disabled (see
> > crbug.com/643282)?
> > > > And
> > > > in that case should the fallback be to software, that's what the
> > renderer
> > > > does?
> > > > So I've added a TODO there till the discussion on the bug is resolved.
> > > >
> > >
> > > You may wanna mimic what GpuProcessTransportFactory does. It doesn't try
> > to
> > > use GPU if the GpuDataManager says we can't use GpuCompositing. And it
> > > falls back to software if it fails N times in a row to establish a
> > channel.
> > > Take care to think about ensuring that both the Browser and the Renderer
> > > compositors see the same thing (they both go into software compositing or
> > > neither does, and one sees a lost context if the other has transitioned.
> > >
> >
> > I'll let sievers@ take it from here, he would know if there is a reason
> > we don't
> > do it for android. From what I saw at least in the renderer the software
> > path
> > happens on android too so we can definitely have the case where the
> > renderer
> > goes to software but the browser doesn't.
> >
> 
> Oh right blimp is android. Android does not do software compositing at all.
> It tries forever for GPU and crashes if it can't.
> 
> You're right the renderer could fallback without the browser, that's a
> weird race between browser/renderer that has come up recently a couple
> times and we could do better. But CompositorImpl would crash on fewer tries
>
https://cs.chromium.org/chromium/src/content/browser/renderer_host/compositor...
> (2 tries) whereas RenderWidgetCompositor tries 4, so it kinda works in a
> roundabout way.

Ah okay. Its kinda fine right now then. May be nicer to crash the renderer with
a log too to match what the browser does. Also CompositorImpl would crash at
that place if the context initialization failed. But if we don't create a Gpu
process itself, it will just sit there idly. :P

> 
> 
> >
> > >
> > > >
> > > > https://codereview.chromium.org/2297933002/
> > > >
> > >
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "Chromium-reviews" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an
> > email
> > > to mailto:chromium-reviews+unsubscribe@chromium.org.
> >
> >
> >
> > https://codereview.chromium.org/2297933002/
> >
> 
> -- 
> You received this message because you are subscribed to the Google Groups
> "Chromium-reviews" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email
> to mailto:chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698