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

Issue 14772021: cc::OutputSurfaceClient::InitializeForGL (Closed)

Created:
7 years, 7 months ago by boliu
Modified:
7 years, 6 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, cc-bugs_chromium.org, jam, android-webview-reviews_chromium.org
Visibility:
Public.

Description

cc::OutputSurfaceClient::DeferredInitialize SynchronousCompositorOutputSurface first starts in software only mode, then cc::OutputSurfaceClient::InitializeForGL is called to initialize the GL parts. BUG=230197 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=204771

Patch Set 1 #

Patch Set 2 : Start in dummy software mode. Loads of code dup in cc. #

Patch Set 3 : rebase #

Patch Set 4 : Dedup and refactor code #

Total comments: 6

Patch Set 5 : Rebased onto r201804 #

Patch Set 6 : Rebase onto r201857 (in the middle of refactor, do not review) #

Patch Set 7 : cc refactors to reduce duplication #

Total comments: 4

Patch Set 8 : Reduce scope of change in cc #

Patch Set 9 : cleanups #

Total comments: 4

Patch Set 10 : rebase, minor fix ups #

Patch Set 11 : only InitializeForGL #

Patch Set 12 : Renamed to DeferredInitialize. Added smoke tests. #

Total comments: 2

Patch Set 13 : Do not drop resources since coming from resourceless software mode #

Total comments: 9

Patch Set 14 : comments #

Total comments: 7

Patch Set 15 : fix test, revert scheduler change, DCHECK(!inside_draw_) #

Total comments: 1

Patch Set 16 : Do not update caps in DidTryInitializeRendererOnImplThread #

Total comments: 8

Patch Set 17 : Add swap callback dcheck, fix test #

Total comments: 1

Patch Set 18 : fix last nit #

Patch Set 19 : rebase #

Patch Set 20 : fix win compile by including ContextProvider from output_surface_client.h #

Unified diffs Side-by-side diffs Delta from patch set Stats (+246 lines, -14 lines) Patch
M cc/output/output_surface_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +7 lines, -0 lines 0 comments Download
M cc/output/output_surface_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +4 lines, -0 lines 0 comments Download
M cc/scheduler/frame_rate_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M cc/scheduler/frame_rate_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +4 lines, -0 lines 0 comments Download
M cc/scheduler/scheduler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M cc/scheduler/scheduler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +4 lines, -0 lines 0 comments Download
M cc/test/fake_layer_tree_host_impl_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -0 lines 0 comments Download
M cc/test/fake_output_surface.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +7 lines, -1 line 0 comments Download
M cc/test/fake_output_surface.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +11 lines, -0 lines 0 comments Download
M cc/test/fake_picture_layer_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +5 lines, -0 lines 0 comments Download
M cc/test/fake_picture_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +9 lines, -2 lines 0 comments Download
M cc/test/test_web_graphics_context_3d.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +4 lines, -0 lines 0 comments Download
M cc/test/test_web_graphics_context_3d.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +8 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +8 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +25 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 6 chunks +41 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +68 lines, -0 lines 0 comments Download
M cc/trees/single_thread_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -0 lines 0 comments Download
M cc/trees/single_thread_proxy.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -0 lines 0 comments Download
M cc/trees/thread_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -0 lines 0 comments Download
M cc/trees/thread_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +23 lines, -8 lines 0 comments Download

Messages

Total messages: 66 (0 generated)
boliu
Currently, LTHI::InitilizeForGL is very similar to calling InitializeRenderer but with the same output surface. Then ...
7 years, 7 months ago (2013-05-20 23:24:59 UTC) #1
joth
couple comments on the not-cc-internals parts of the change https://codereview.chromium.org/14772021/diff/8001/android_webview/browser/in_process_renderer/in_process_view_renderer.cc File android_webview/browser/in_process_renderer/in_process_view_renderer.cc (right): https://codereview.chromium.org/14772021/diff/8001/android_webview/browser/in_process_renderer/in_process_view_renderer.cc#newcode201 android_webview/browser/in_process_renderer/in_process_view_renderer.cc:201: ...
7 years, 7 months ago (2013-05-21 02:08:00 UTC) #2
danakj
I'm not so sure about making a new "DidUpdateCaps" path like this. When the caps ...
7 years, 7 months ago (2013-05-21 14:00:49 UTC) #3
joth
On 21 May 2013 07:00, <danakj@chromium.org> wrote: > I'm not so sure about making a ...
7 years, 7 months ago (2013-05-21 17:23:58 UTC) #4
danakj
On Tue, May 21, 2013 at 1:23 PM, Jonathan Dixon <joth@chromium.org> wrote: > > > ...
7 years, 7 months ago (2013-05-21 17:34:20 UTC) #5
boliu
On 2013/05/21 17:34:20, danakj wrote: > Ah okay thanks. This still sounds a lot like ...
7 years, 7 months ago (2013-05-21 18:11:06 UTC) #6
danakj
On Tue, May 21, 2013 at 2:11 PM, <boliu@chromium.org> wrote: > On 2013/05/21 17:34:20, danakj ...
7 years, 7 months ago (2013-05-21 18:31:05 UTC) #7
boliu
On 2013/05/21 18:31:05, danakj wrote: > Do we need to split up "initialized surface" and ...
7 years, 7 months ago (2013-05-21 19:00:33 UTC) #8
danakj
On 2013/05/21 19:00:33, boliu wrote: > On 2013/05/21 18:31:05, danakj wrote: > > Do we ...
7 years, 7 months ago (2013-05-21 20:22:06 UTC) #9
boliu
Back to looking at this one now. On 2013/05/21 20:22:06, danakj wrote: > > One ...
7 years, 7 months ago (2013-05-23 18:37:37 UTC) #10
boliu
Dana: PTAL Tried invert the call after LTHI::InitializeRenderer, but couldn't get all the way. There ...
7 years, 7 months ago (2013-05-24 02:36:36 UTC) #11
danakj
On 2013/05/24 02:36:36, boliu wrote: > Dana: PTAL > > Tried invert the call after ...
7 years, 7 months ago (2013-05-24 16:04:23 UTC) #12
boliu
Venturing into things beyond my knowledge On 2013/05/24 16:04:23, danakj wrote: > I feel like ...
7 years, 7 months ago (2013-05-24 17:19:22 UTC) #13
danakj
On Fri, May 24, 2013 at 1:19 PM, <boliu@chromium.org> wrote: > Venturing into things beyond ...
7 years, 7 months ago (2013-05-24 17:36:33 UTC) #14
boliu
On 2013/05/24 17:36:33, danakj wrote: > > See thread proxy's call to > layer_tree_host_->DeleteContentsTexturesOnImplThread(layer_tree_host_impl_->resource_provider()); > ...
7 years, 7 months ago (2013-05-24 18:00:39 UTC) #15
danakj
On Fri, May 24, 2013 at 2:00 PM, <boliu@chromium.org> wrote: > On 2013/05/24 17:36:33, danakj ...
7 years, 7 months ago (2013-05-24 18:11:40 UTC) #16
danakj
I think a bit of thought needs to go into the "we have no ResourceProvider ...
7 years, 7 months ago (2013-05-24 19:02:30 UTC) #17
jamesr
Why would you not want to have a ResourceProvider when using the compositor?
7 years, 7 months ago (2013-05-24 19:11:13 UTC) #18
aelias_OOO_until_Jul13
On 2013/05/24 19:11:13, jamesr wrote: > Why would you not want to have a ResourceProvider ...
7 years, 7 months ago (2013-05-24 19:32:13 UTC) #19
aelias_OOO_until_Jul13
> A race by design seems problematic to me :/ I'm not sure what the ...
7 years, 7 months ago (2013-05-24 19:36:22 UTC) #20
jamesr
On 2013/05/24 19:32:13, aelias wrote: > On 2013/05/24 19:11:13, jamesr wrote: > > Why would ...
7 years, 7 months ago (2013-05-24 19:37:49 UTC) #21
jamesr
This is too complex. I can't review it.
7 years, 7 months ago (2013-05-24 20:05:07 UTC) #22
aelias_OOO_until_Jul13
On 2013/05/24 19:37:49, jamesr wrote: > On 2013/05/24 19:32:13, aelias wrote: > > On 2013/05/24 ...
7 years, 7 months ago (2013-05-24 20:50:45 UTC) #23
boliu
James: PTAL Reduced scope. Correctness depends on: 1) tile-free software mode does not create any ...
7 years, 7 months ago (2013-05-24 22:57:38 UTC) #24
jamesr
I still think this is really complicated. I'm not going to be able to review ...
7 years, 7 months ago (2013-05-24 22:59:22 UTC) #25
boliu
On 2013/05/24 22:59:22, jamesr wrote: > I still think this is really complicated. I'm not ...
7 years, 7 months ago (2013-05-24 23:02:51 UTC) #26
aelias_OOO_until_Jul13
Note this patch is one of the last blockers to switching over WebView fully to ...
7 years, 7 months ago (2013-05-24 23:08:52 UTC) #27
jamesr
You need a reviewer who understands cc, the ResourceProvider system, and context startup. This has ...
7 years, 7 months ago (2013-05-24 23:12:24 UTC) #28
aelias_OOO_until_Jul13
OK. We'll leave this pending for now and keep working on the other blockers for ...
7 years, 7 months ago (2013-05-24 23:31:37 UTC) #29
piman
https://codereview.chromium.org/14772021/diff/48001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): https://codereview.chromium.org/14772021/diff/48001/cc/trees/layer_tree_host_impl.cc#newcode1436 cc/trees/layer_tree_host_impl.cc:1436: renderer_ = SoftwareRenderer::Create(this, output_surface.get(), NULL); I wasn't involved in ...
7 years, 6 months ago (2013-05-28 23:35:33 UTC) #30
aelias_OOO_until_Jul13
Recall that we're required to support software rendering at any time, in particular in the ...
7 years, 6 months ago (2013-05-29 00:37:03 UTC) #31
piman
On Tue, May 28, 2013 at 5:37 PM, <aelias@chromium.org> wrote: > Recall that we're required ...
7 years, 6 months ago (2013-05-29 00:57:34 UTC) #32
aelias_OOO_until_Jul13
On 2013/05/29 00:57:34, piman wrote: > On Tue, May 28, 2013 at 5:37 PM, <mailto:aelias@chromium.org> ...
7 years, 6 months ago (2013-05-29 01:02:14 UTC) #33
aelias_OOO_until_Jul13
OK, we added several sections to the original design doc to deal with some of ...
7 years, 6 months ago (2013-05-29 03:49:32 UTC) #34
aelias_OOO_until_Jul13
https://codereview.chromium.org/14772021/diff/48001/cc/trees/thread_proxy.cc File cc/trees/thread_proxy.cc (right): https://codereview.chromium.org/14772021/diff/48001/cc/trees/thread_proxy.cc#newcode1169 cc/trees/thread_proxy.cc:1169: scheduler_on_impl_thread_->DidCreateAndInitializeOutputSurface(); This scheduler change looks to be the other ...
7 years, 6 months ago (2013-05-30 06:42:43 UTC) #35
boliu
https://codereview.chromium.org/14772021/diff/48001/cc/trees/thread_proxy.cc File cc/trees/thread_proxy.cc (right): https://codereview.chromium.org/14772021/diff/48001/cc/trees/thread_proxy.cc#newcode1169 cc/trees/thread_proxy.cc:1169: scheduler_on_impl_thread_->DidCreateAndInitializeOutputSurface(); On 2013/05/30 06:42:44, aelias wrote: > This scheduler ...
7 years, 6 months ago (2013-05-30 16:24:34 UTC) #36
boliu
Will separate this into 3 patchs for clarity: (1) OutputSurfaceClient::InitializeForGL. (2) Expose protected OutputSurface method ...
7 years, 6 months ago (2013-06-04 19:59:04 UTC) #37
boliu
PTAL Renamed method to DeferredInitialize in anticipation to also call it for reverting back to ...
7 years, 6 months ago (2013-06-05 00:26:17 UTC) #38
piman
https://codereview.chromium.org/14772021/diff/70001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): https://codereview.chromium.org/14772021/diff/70001/cc/trees/layer_tree_host_impl.cc#newcode1465 cc/trees/layer_tree_host_impl.cc:1465: resource_provider_->DidLoseOutputSurface(); You don't want to do that in the ...
7 years, 6 months ago (2013-06-05 00:39:36 UTC) #39
boliu
https://codereview.chromium.org/14772021/diff/70001/cc/trees/layer_tree_host_impl.cc File cc/trees/layer_tree_host_impl.cc (right): https://codereview.chromium.org/14772021/diff/70001/cc/trees/layer_tree_host_impl.cc#newcode1465 cc/trees/layer_tree_host_impl.cc:1465: resource_provider_->DidLoseOutputSurface(); On 2013/06/05 00:39:37, piman wrote: > You don't ...
7 years, 6 months ago (2013-06-05 01:01:54 UTC) #40
boliu
Destroying and recreating ResourceProvider won't be quite correct either because will also need to recreate ...
7 years, 6 months ago (2013-06-05 02:05:11 UTC) #41
danakj
On Tue, Jun 4, 2013 at 10:05 PM, <boliu@chromium.org> wrote: > Destroying and recreating ResourceProvider ...
7 years, 6 months ago (2013-06-05 14:40:20 UTC) #42
boliu
On 2013/06/05 14:40:20, danakj wrote: > I thought we're going down the lost context-type path ...
7 years, 6 months ago (2013-06-05 15:39:54 UTC) #43
danakj
On Wed, Jun 5, 2013 at 11:39 AM, <boliu@chromium.org> wrote: > On 2013/06/05 14:40:20, danakj ...
7 years, 6 months ago (2013-06-05 18:03:29 UTC) #44
joth
On 5 June 2013 11:03, Dana Jansens <danakj@chromium.org> wrote: > On Wed, Jun 5, 2013 ...
7 years, 6 months ago (2013-06-05 18:26:16 UTC) #45
boliu
I'll start looking into not skip creaing resource manager/tile manager in software mode (crbug.com/245935), but ...
7 years, 6 months ago (2013-06-05 20:29:51 UTC) #46
danakj
On Wed, Jun 5, 2013 at 4:29 PM, <boliu@chromium.org> wrote: > I'll start looking into ...
7 years, 6 months ago (2013-06-05 21:07:21 UTC) #47
danakj
Thanks for keeping this pretty simple. https://codereview.chromium.org/14772021/diff/76001/cc/scheduler/scheduler_state_machine.cc File cc/scheduler/scheduler_state_machine.cc (right): https://codereview.chromium.org/14772021/diff/76001/cc/scheduler/scheduler_state_machine.cc#newcode436 cc/scheduler/scheduler_state_machine.cc:436: // This can ...
7 years, 6 months ago (2013-06-05 21:53:31 UTC) #48
boliu
Answering comments about offscreen context. No new patch set yet. On 2013/06/05 21:07:21, danakj wrote: ...
7 years, 6 months ago (2013-06-05 22:17:26 UTC) #49
boliu
all comments done
7 years, 6 months ago (2013-06-06 00:09:23 UTC) #50
danakj
Trying to think through the possible implications of making calls to change state on the ...
7 years, 6 months ago (2013-06-06 14:49:30 UTC) #51
boliu
On 2013/06/06 14:49:30, danakj wrote: > Trying to think through the possible implications of making ...
7 years, 6 months ago (2013-06-06 16:07:12 UTC) #52
danakj
On Thu, Jun 6, 2013 at 12:07 PM, <boliu@chromium.org> wrote: > On 2013/06/06 14:49:30, danakj ...
7 years, 6 months ago (2013-06-06 16:30:53 UTC) #53
boliu
https://codereview.chromium.org/14772021/diff/89001/cc/trees/layer_tree_host_unittest.cc File cc/trees/layer_tree_host_unittest.cc (right): https://codereview.chromium.org/14772021/diff/89001/cc/trees/layer_tree_host_unittest.cc#newcode2920 cc/trees/layer_tree_host_unittest.cc:2920: host_impl->SetNeedsRedrawRect(gfx::Rect(1, 1)); On 2013/06/06 14:49:31, danakj wrote: > Why ...
7 years, 6 months ago (2013-06-06 17:39:24 UTC) #54
danakj
https://codereview.chromium.org/14772021/diff/89001/cc/trees/thread_proxy.cc File cc/trees/thread_proxy.cc (right): https://codereview.chromium.org/14772021/diff/89001/cc/trees/thread_proxy.cc#newcode1188 cc/trees/thread_proxy.cc:1188: OutputSurface* output_surface_ptr = layer_tree_host_impl_->output_surface(); On 2013/06/06 17:39:25, boliu wrote: ...
7 years, 6 months ago (2013-06-06 17:53:38 UTC) #55
nduca
Make what messes you need to make, then fix them promptly. On Wed, Jun 5, ...
7 years, 6 months ago (2013-06-06 18:57:02 UTC) #56
boliu
https://codereview.chromium.org/14772021/diff/103001/cc/trees/layer_tree_host_unittest.cc File cc/trees/layer_tree_host_unittest.cc (right): https://codereview.chromium.org/14772021/diff/103001/cc/trees/layer_tree_host_unittest.cc#newcode2894 cc/trees/layer_tree_host_unittest.cc:2894: host_impl->SetNeedsRedrawRect(gfx::Rect(1, 1)); And of course, test did not pass ...
7 years, 6 months ago (2013-06-06 19:27:06 UTC) #57
danakj
https://codereview.chromium.org/14772021/diff/103001/cc/trees/layer_tree_host_unittest.cc File cc/trees/layer_tree_host_unittest.cc (right): https://codereview.chromium.org/14772021/diff/103001/cc/trees/layer_tree_host_unittest.cc#newcode2894 cc/trees/layer_tree_host_unittest.cc:2894: host_impl->SetNeedsRedrawRect(gfx::Rect(1, 1)); On 2013/06/06 19:27:14, boliu wrote: > And ...
7 years, 6 months ago (2013-06-06 19:36:12 UTC) #58
boliu
Added DCHECK to make sure swapbuffer callback is still the same. Of course the new ...
7 years, 6 months ago (2013-06-06 20:18:12 UTC) #59
boliu
Tangent: Just talked to joth who is planning on adding OnSwapBuffersComplete callback in software mode: ...
7 years, 6 months ago (2013-06-06 20:46:16 UTC) #60
danakj
LGTM https://codereview.chromium.org/14772021/diff/109001/cc/scheduler/frame_rate_controller.cc File cc/scheduler/frame_rate_controller.cc (right): https://codereview.chromium.org/14772021/diff/109001/cc/scheduler/frame_rate_controller.cc#newcode91 cc/scheduler/frame_rate_controller.cc:91: bool FrameRateController::SwapBuffersCompleteSupported() const { nit: swap_buffers_complete_supported() and move ...
7 years, 6 months ago (2013-06-06 21:23:00 UTC) #61
boliu
Last nit fixed. Going to wait for transform/clip patch (https://codereview.chromium.org/15579002/) to land first since these ...
7 years, 6 months ago (2013-06-06 21:53:28 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/boliu@chromium.org/14772021/98016
7 years, 6 months ago (2013-06-07 00:41:28 UTC) #63
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 6 months ago (2013-06-07 02:32:56 UTC) #64
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/boliu@chromium.org/14772021/132001
7 years, 6 months ago (2013-06-07 05:40:23 UTC) #65
commit-bot: I haz the power
7 years, 6 months ago (2013-06-07 09:03:29 UTC) #66
Message was sent while issue was closed.
Change committed as 204771

Powered by Google App Engine
This is Rietveld 408576698