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

Issue 286953008: cc: Allow DeferredInitialize to use DelegatingRenderer (Closed)

Created:
6 years, 7 months ago by boliu
Modified:
6 years ago
Reviewers:
danakj
CC:
chromium-reviews, cc-bugs_chromium.org
Visibility:
Public.

Description

cc: Allow DeferredInitialize to use DelegatingRenderer Currently DeferredInitialize assumes OutputSurface never has delegated_rendering capability. With this change, remove this assumption by always first creating SoftwareRenderer for OutputSurface with deferred_gl_initialization. Then create either DelegatingRenderer or GLRenderer depending on delegated_rendering capability in DeferredInitialize. With support for DelegatingRenderer and DeferredInititalize, have to ensure that all GL resources are returned to child before ReleasGL is called, because ContextProvider is going away after ReleaseGL. Add a DCHECK for this in ResourceProvider::CleanUpGLIfNeeded. New path covered by LayerTreeHostTestDeferredInitialize. BUG=344087 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=272070

Patch Set 1 #

Total comments: 4

Patch Set 2 : DCHECK #

Total comments: 2

Patch Set 3 : no force software #

Total comments: 2

Patch Set 4 : rebase #

Patch Set 5 : revert CreateAndSetRenderer changes #

Patch Set 6 : Fix test #

Patch Set 7 : bring back force_software_renderer #

Total comments: 1

Patch Set 8 : OutputSurface::ReleaseContextProvider #

Total comments: 6

Patch Set 9 : comments #

Patch Set 10 : No call to self constructor in initializer #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+102 lines, -36 lines) Patch
M cc/layers/picture_layer_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -3 lines 0 comments Download
M cc/output/output_surface.h View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M cc/output/output_surface.cc View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -1 line 0 comments Download
M cc/output/output_surface_client.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M cc/output/output_surface_unittest.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M cc/resources/resource_provider.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M cc/resources/resource_provider_unittest.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -2 lines 0 comments Download
M cc/test/fake_output_surface.h View 1 chunk +3 lines, -3 lines 0 comments Download
M cc/test/fake_output_surface_client.h View 1 2 3 4 5 6 7 8 9 2 chunks +13 lines, -2 lines 1 comment Download
M cc/test/fake_output_surface_client.cc View 1 2 3 4 5 6 7 2 chunks +6 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -4 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 5 chunks +10 lines, -13 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +13 lines, -5 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +22 lines, -2 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
boliu
PTAL, thanks!
6 years, 7 months ago (2014-05-16 21:51:15 UTC) #1
danakj
https://codereview.chromium.org/286953008/diff/1/cc/trees/layer_tree_host_unittest.cc File cc/trees/layer_tree_host_unittest.cc (right): https://codereview.chromium.org/286953008/diff/1/cc/trees/layer_tree_host_unittest.cc#newcode2769 cc/trees/layer_tree_host_unittest.cc:2769: output_surface->set_forced_draw_to_software_device(true); Why are these set calls needed/correct?
6 years, 7 months ago (2014-05-16 22:08:47 UTC) #2
boliu
https://codereview.chromium.org/286953008/diff/1/cc/trees/layer_tree_host_unittest.cc File cc/trees/layer_tree_host_unittest.cc (right): https://codereview.chromium.org/286953008/diff/1/cc/trees/layer_tree_host_unittest.cc#newcode2769 cc/trees/layer_tree_host_unittest.cc:2769: output_surface->set_forced_draw_to_software_device(true); On 2014/05/16 22:08:47, danakj wrote: > Why are ...
6 years, 7 months ago (2014-05-16 22:15:10 UTC) #3
danakj
https://codereview.chromium.org/286953008/diff/1/cc/trees/layer_tree_host_unittest.cc File cc/trees/layer_tree_host_unittest.cc (right): https://codereview.chromium.org/286953008/diff/1/cc/trees/layer_tree_host_unittest.cc#newcode2769 cc/trees/layer_tree_host_unittest.cc:2769: output_surface->set_forced_draw_to_software_device(true); On 2014/05/16 22:15:10, boliu wrote: > On 2014/05/16 ...
6 years, 7 months ago (2014-05-16 22:19:29 UTC) #4
boliu
https://codereview.chromium.org/286953008/diff/1/cc/trees/layer_tree_host_unittest.cc File cc/trees/layer_tree_host_unittest.cc (right): https://codereview.chromium.org/286953008/diff/1/cc/trees/layer_tree_host_unittest.cc#newcode2769 cc/trees/layer_tree_host_unittest.cc:2769: output_surface->set_forced_draw_to_software_device(true); On 2014/05/16 22:19:29, danakj wrote: > We should ...
6 years, 7 months ago (2014-05-16 22:34:37 UTC) #5
danakj
Do you still need those in the test? Or why did you want to keep ...
6 years, 7 months ago (2014-05-16 22:44:29 UTC) #6
boliu
Actually removed all the set_forced_draw_to_software_device things. deferred_initialize should not forbid normal software draws. And the ...
6 years, 7 months ago (2014-05-16 23:08:27 UTC) #7
danakj
https://codereview.chromium.org/286953008/diff/40001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): https://codereview.chromium.org/286953008/diff/40001/cc/trees/layer_tree_host_impl.cc#newcode1822 cc/trees/layer_tree_host_impl.cc:1822: !force_software_renderer) { Ok I am confused by this change ...
6 years, 7 months ago (2014-05-20 18:09:51 UTC) #8
boliu
https://codereview.chromium.org/286953008/diff/40001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): https://codereview.chromium.org/286953008/diff/40001/cc/trees/layer_tree_host_impl.cc#newcode1822 cc/trees/layer_tree_host_impl.cc:1822: !force_software_renderer) { On 2014/05/20 18:09:51, danakj wrote: > Ok ...
6 years, 7 months ago (2014-05-20 18:31:49 UTC) #9
boliu
Works, reverted changes around CreateAndSetRenderer.
6 years, 7 months ago (2014-05-20 18:47:52 UTC) #10
danakj
LGTM
6 years, 7 months ago (2014-05-20 18:52:31 UTC) #11
boliu
PTAL. Sorry for the back and forth, but had to bring back force_software_renderer as it's ...
6 years, 7 months ago (2014-05-20 20:37:49 UTC) #12
danakj
On Tue, May 20, 2014 at 4:37 PM, <boliu@chromium.org> wrote: > PTAL. Sorry for the ...
6 years, 7 months ago (2014-05-20 20:48:11 UTC) #13
boliu
On May 20, 2014 1:48 PM, "Dana Jansens" <danakj@chromium.org> wrote: > > On Tue, May ...
6 years, 7 months ago (2014-05-20 20:59:57 UTC) #14
danakj
On Tue, May 20, 2014 at 4:59 PM, Bo Liu <boliu@chromium.org> wrote: > > On ...
6 years, 7 months ago (2014-05-20 21:01:56 UTC) #15
boliu
On 2014/05/20 21:01:56, danakj wrote: > > This is already the case before DeferredInitialize is ...
6 years, 7 months ago (2014-05-20 22:58:34 UTC) #16
danakj
Is there a test that verifies LTHI is calling ReleaseContextProvider() inside of ReleaseGL()? https://codereview.chromium.org/286953008/diff/140001/cc/output/output_surface.h File ...
6 years, 7 months ago (2014-05-20 23:09:11 UTC) #17
boliu
https://codereview.chromium.org/286953008/diff/140001/cc/output/output_surface.cc File cc/output/output_surface.cc (right): https://codereview.chromium.org/286953008/diff/140001/cc/output/output_surface.cc#newcode166 cc/output/output_surface.cc:166: DCHECK(!context_provider_); This DCHECK and two lines above is verifying ...
6 years, 7 months ago (2014-05-20 23:31:38 UTC) #18
danakj
LGTM https://codereview.chromium.org/286953008/diff/140001/cc/output/output_surface.cc File cc/output/output_surface.cc (right): https://codereview.chromium.org/286953008/diff/140001/cc/output/output_surface.cc#newcode166 cc/output/output_surface.cc:166: DCHECK(!context_provider_); On 2014/05/20 23:31:38, boliu wrote: > This ...
6 years, 7 months ago (2014-05-21 15:34:16 UTC) #19
boliu
The CQ bit was checked by boliu@chromium.org
6 years, 7 months ago (2014-05-21 15:37:54 UTC) #20
boliu
The CQ bit was unchecked by boliu@chromium.org
6 years, 7 months ago (2014-05-21 17:06:19 UTC) #21
boliu
The CQ bit was checked by boliu@chromium.org
6 years, 7 months ago (2014-05-21 17:12:31 UTC) #22
boliu
https://codereview.chromium.org/286953008/diff/180001/cc/test/fake_output_surface_client.h File cc/test/fake_output_surface_client.h (right): https://codereview.chromium.org/286953008/diff/180001/cc/test/fake_output_surface_client.h#newcode17 cc/test/fake_output_surface_client.h:17: FakeOutputSurfaceClient() According to SO (http://stackoverflow.com/questions/308276/c-call-constructor-from-constructor) calling another constructor from ...
6 years, 7 months ago (2014-05-21 17:38:49 UTC) #23
boliu
The CQ bit was checked by boliu@chromium.org
6 years, 7 months ago (2014-05-21 18:33:30 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/boliu@chromium.org/286953008/180001
6 years, 7 months ago (2014-05-21 19:58:39 UTC) #25
commit-bot: I haz the power
6 years, 7 months ago (2014-05-22 03:22:21 UTC) #26
Message was sent while issue was closed.
Change committed as 272070

Powered by Google App Engine
This is Rietveld 408576698