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

Issue 10052018: Drop frontbuffers with ui-use-gpu-process, synchronized with browser, decoupled from backbuffer dro… (Closed)

Created:
8 years, 8 months ago by mmocny
Modified:
8 years, 4 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, dhollowa+watch_chromium.org, jam, penghuang+watch_chromium.org, apatrick_chromium, joi+watch-content_chromium.org, darin-cc_chromium.org, James Su, wjmaclean
Visibility:
Public.

Description

Drop frontbuffers with ui-use-gpu-process, synchronized with browser, decoupled from backbuffer drop. On Aura, every time a tab is backgrounded, RenderWidgetHostViewAura will reset its handle to the front surface. If that tab is foregrounded again, that front surface will not be used until synchronizing with the gpu process to make sure that surface is still available. By doing this, the gpu process knows when it is safe to discard the front surface. RWHVA sends a FrontSurfaceIsProtected(bool, int) message to the gpu process to keep it informed about front surface protection. The int is a state-of-the-world identifier to protect from ABA issues. RWHVA delays sending FrontSurfaceIsProtected(false) until after the current surface is certain to not be in use, namely after the compositor finishes the current frame and the browser thumbnailer is complete. BUG=112842 TEST=Manual Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=142408 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=142541 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=143590 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=148657

Patch Set 1 #

Patch Set 2 : Removing some needless code, cleanup #

Patch Set 3 : minor cleanup #

Total comments: 1

Patch Set 4 : fixing compile issue for content_unittests #

Total comments: 2

Patch Set 5 : Delay recreating buffer until after swap #

Patch Set 6 : No more channel descheduling. Synchronized with ui compositing. #

Patch Set 7 : Remove ui_stup dependancy. Release BB without involving ui. #

Patch Set 8 : Renaming messages. Updated the other platforms. #

Total comments: 22

Patch Set 9 : Cleanup, some comments, and address some concerns. #

Patch Set 10 : Hopefully fixed other platform compiles. Still have to varify correctness. #

Patch Set 11 : This patch fixes a couple ABA issues. No longer seeing any black flashing, which is a great sign. #

Patch Set 12 : Merging in CL that landed, fixing ABA issue in browser. #

Patch Set 13 : Removing debugging changes #

Patch Set 14 : Cleaning up and adding comments. Still some TODO's #

Patch Set 15 : Don't schedule composite -- observe the current one, or return immedietally. Also, send all reques… #

Patch Set 16 : Protecting from discarding after swap. #

Patch Set 17 : Renamed methods to be more clear. Send request release "false" ack, so we can retry request if it … #

Patch Set 18 : Some more renaming, and adding a cap on number of request release retries #

Patch Set 19 : Adding command line flagh #

Patch Set 20 : minor changes, rebasing with master #

Total comments: 4

Patch Set 21 : Moving command line switch test to gpu instead of browser. +Some Small changes. #

Patch Set 22 : Major simplification! #

Total comments: 21

Patch Set 23 : Cleanup RWHVA to use AdjustSurfaceProtection function #

Patch Set 24 : fix ALL the issues. #

Total comments: 10

Patch Set 25 : fixing typos and adding current_surface_in_use_by_compositor_ in AdjustSurfaceProtection #

Patch Set 26 : fixing endif placement #

Patch Set 27 : possible compile fix for other platforms. Not sure if this is the right approach. #

Patch Set 28 : rebasing, fixing nits #

Patch Set 29 : removing line which was accidentally left in after rebase. #

Patch Set 30 : . #

Total comments: 3

Patch Set 31 : fixing nits #

Total comments: 14

Patch Set 32 : Fixing comments and small nits. #

Patch Set 33 : Fixing unittests. Default value for require_ack should be true so other platforms arent affected. … #

Patch Set 34 : just rebasing #

Patch Set 35 : Fix for failing cros vmtests (possibly) #

Patch Set 36 : Rebasing for tryjob #

Patch Set 37 : Rebasin. Use sync points/IPC. Fix skip_ack not being respected. Replace on_comp_ended with will_sta… #

Patch Set 38 : Restoring fb tab limit to original value. #

Patch Set 39 : Adding null check after GetCompositor, which was causing vmtest to segfault. #

Patch Set 40 : Updating a few comments. #

Total comments: 1

Patch Set 41 : Storing the list of thumbnail callbacks, so that we can issue them upon RWHVA destruction. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+341 lines, -59 lines) Patch
M chrome/browser/chromeos/login/login_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/gpu/gpu_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 2 chunks +12 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 1 chunk +15 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 4 chunks +32 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 14 chunks +164 lines, -25 lines 0 comments Download
M content/common/gpu/gpu_memory_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +0 lines, -4 lines 0 comments Download
M content/common/gpu/gpu_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 3 chunks +8 lines, -0 lines 0 comments Download
M content/common/gpu/image_transport_surface.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 2 chunks +4 lines, -0 lines 0 comments Download
M content/common/gpu/image_transport_surface.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 3 chunks +11 lines, -0 lines 0 comments Download
M content/common/gpu/texture_image_transport_surface.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 3 chunks +9 lines, -1 line 0 comments Download
M content/common/gpu/texture_image_transport_surface.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 11 chunks +79 lines, -28 lines 0 comments Download
M content/public/common/content_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 47 (0 generated)
mmocny
This patch will drop frontbuffers for texture_image_transport_surface. I apologize that this patch is doing a ...
8 years, 8 months ago (2012-04-11 22:58:36 UTC) #1
mmocny
http://codereview.chromium.org/10052018/diff/4001/content/common/gpu/texture_image_transport_surface.cc File content/common/gpu/texture_image_transport_surface.cc (right): http://codereview.chromium.org/10052018/diff/4001/content/common/gpu/texture_image_transport_surface.cc#newcode169 content/common/gpu/texture_image_transport_surface.cc:169: CreateTexture(front(), textures_[front()].size); I am playing with delaying this recreation ...
8 years, 8 months ago (2012-04-12 16:41:27 UTC) #2
piman
At a high level I have a couple of suggestions/comments: - I think you can ...
8 years, 8 months ago (2012-04-18 22:12:44 UTC) #3
mmocny
On 2012/04/18 22:12:44, piman wrote: > At a high level I have a couple of ...
8 years, 7 months ago (2012-05-01 13:59:02 UTC) #4
mmocny
Pasting Antoines reply from email: On 2012/05/01 13:59:02, mmocny wrote: > On 2012/04/18 22:12:44, piman ...
8 years, 7 months ago (2012-05-02 14:13:11 UTC) #5
mmocny
And now my reply: On 2012/05/02 14:13:11, mmocny wrote: > Pasting Antoines reply from email: ...
8 years, 7 months ago (2012-05-02 14:22:39 UTC) #6
mmocny
Updated patch to address some of the concerns raised. Should work: - No longer descheduling ...
8 years, 7 months ago (2012-05-02 21:56:25 UTC) #7
mmocny
On 2012/05/02 21:56:25, mmocny wrote: > Updated patch to address some of the concerns raised. ...
8 years, 7 months ago (2012-05-02 21:58:26 UTC) #8
mmocny
Okay. I've fixed all the straightforward stuff that was missing. The smooth tab transitioning issue ...
8 years, 7 months ago (2012-05-03 21:45:25 UTC) #9
piman
http://codereview.chromium.org/10052018/diff/20002/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): http://codereview.chromium.org/10052018/diff/20002/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode666 content/browser/renderer_host/render_widget_host_view_aura.cc:666: return; The problem here is that it's racy. We ...
8 years, 7 months ago (2012-05-04 00:03:48 UTC) #10
mmocny
I'm about to put up a patch that cleans up a bunch of the issues ...
8 years, 7 months ago (2012-05-04 18:55:52 UTC) #11
mmocny
Alright, new patch up which hopefully is a bit more clear. Still working on: - ...
8 years, 7 months ago (2012-05-04 20:23:02 UTC) #12
mmocny
Also note that I have not yet added explicit frontbuffer protection via any ui message. ...
8 years, 7 months ago (2012-05-04 20:24:31 UTC) #13
mmocny
Just a quick update on this patch: - Working on landing https://chromiumcodereview.appspot.com/10388010/ which fixes a ...
8 years, 7 months ago (2012-05-11 19:49:29 UTC) #14
mmocny
Just another update since its been a while. Sadly, I am still hunting down the ...
8 years, 7 months ago (2012-05-23 16:47:50 UTC) #15
mmocny
I think I have addressed various (hopefully all) concerns raised so far. The feature is ...
8 years, 6 months ago (2012-05-29 15:45:39 UTC) #16
mmocny
http://codereview.chromium.org/10052018/diff/57011/content/common/gpu/gpu_memory_manager.h File content/common/gpu/gpu_memory_manager.h (right): http://codereview.chromium.org/10052018/diff/57011/content/common/gpu/gpu_memory_manager.h#newcode29 content/common/gpu/gpu_memory_manager.h:29: enum { kDefaultMaxSurfacesWithFrontbufferSoftLimit = 3 }; This was checked ...
8 years, 6 months ago (2012-06-01 21:06:51 UTC) #17
mmocny
http://codereview.chromium.org/10052018/diff/57011/content/common/gpu/gpu_memory_manager.h File content/common/gpu/gpu_memory_manager.h (right): http://codereview.chromium.org/10052018/diff/57011/content/common/gpu/gpu_memory_manager.h#newcode29 content/common/gpu/gpu_memory_manager.h:29: enum { kDefaultMaxSurfacesWithFrontbufferSoftLimit = 3 }; On 2012/06/01 21:06:51, ...
8 years, 6 months ago (2012-06-05 14:52:35 UTC) #18
mmocny
Antoine, the most recent patch here is a major simplification thanks to what we discussed ...
8 years, 6 months ago (2012-06-11 20:19:47 UTC) #19
piman
https://chromiumcodereview.appspot.com/10052018/diff/71002/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://chromiumcodereview.appspot.com/10052018/diff/71002/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode219 content/browser/renderer_host/render_widget_host_view_aura.cc:219: weak_factory_(this), ALLOW_THIS_IN_INITIALIZER_LIST https://chromiumcodereview.appspot.com/10052018/diff/71002/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode244 content/browser/renderer_host/render_widget_host_view_aura.cc:244: weak_factory_.InvalidateWeakPtrs(); Do you need this? ...
8 years, 6 months ago (2012-06-11 21:32:24 UTC) #20
mmocny
Thanks for review. All of your points are addressable so I am happy to know ...
8 years, 6 months ago (2012-06-11 21:45:09 UTC) #21
mmocny
Alright, fixed up all the previous concerns. Tested quite a bit on desktop and seems ...
8 years, 6 months ago (2012-06-12 18:26:17 UTC) #22
piman
Some nits, otherwise I think it's almost good to go. https://chromiumcodereview.appspot.com/10052018/diff/76003/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://chromiumcodereview.appspot.com/10052018/diff/76003/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode305 ...
8 years, 6 months ago (2012-06-12 20:59:47 UTC) #23
mmocny
See below for comment on visibility state id. Other other nits are easily addressable, patch ...
8 years, 6 months ago (2012-06-12 21:25:50 UTC) #24
mmocny
Okay, replaced with protection_state_id and addressed minor nits. I played with patch on device earlier ...
8 years, 6 months ago (2012-06-12 22:50:09 UTC) #25
piman
LGTM+nits You should probably send try jobs... https://chromiumcodereview.appspot.com/10052018/diff/81004/content/browser/renderer_host/render_widget_host_impl.cc File content/browser/renderer_host/render_widget_host_impl.cc (right): https://chromiumcodereview.appspot.com/10052018/diff/81004/content/browser/renderer_host/render_widget_host_impl.cc#newcode1839 content/browser/renderer_host/render_widget_host_impl.cc:1839: if (ui_shim) ...
8 years, 6 months ago (2012-06-12 23:05:11 UTC) #26
mmocny
Adding reviewers: @davemoore for chrome/browser/chromeos/login/login_util.cc @sky for content/browser/renderer_host/ @joi for content/port/browser/ and content/public/common/ Thanks!
8 years, 6 months ago (2012-06-13 14:47:22 UTC) #27
Jói
LGTM for content/port and content/common.
8 years, 6 months ago (2012-06-13 15:18:39 UTC) #28
sky
https://chromiumcodereview.appspot.com/10052018/diff/71023/content/browser/renderer_host/render_widget_host_impl.cc File content/browser/renderer_host/render_widget_host_impl.cc (right): https://chromiumcodereview.appspot.com/10052018/diff/71023/content/browser/renderer_host/render_widget_host_impl.cc#newcode1834 content/browser/renderer_host/render_widget_host_impl.cc:1834: void RenderWidgetHostImpl::SendFrontSurfaceIsProtected( What is aura specific here? https://chromiumcodereview.appspot.com/10052018/diff/71023/content/browser/renderer_host/render_widget_host_impl.h File ...
8 years, 6 months ago (2012-06-13 16:21:23 UTC) #29
mmocny
Updated. https://chromiumcodereview.appspot.com/10052018/diff/71023/content/browser/renderer_host/render_widget_host_impl.cc File content/browser/renderer_host/render_widget_host_impl.cc (right): https://chromiumcodereview.appspot.com/10052018/diff/71023/content/browser/renderer_host/render_widget_host_impl.cc#newcode1834 content/browser/renderer_host/render_widget_host_impl.cc:1834: void RenderWidgetHostImpl::SendFrontSurfaceIsProtected( On other platforms this is not ...
8 years, 6 months ago (2012-06-13 18:40:05 UTC) #30
sky
LGTM
8 years, 6 months ago (2012-06-13 21:56:21 UTC) #31
glotov
LGTM
8 years, 6 months ago (2012-06-15 15:11:14 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mmocny@chromium.org/10052018/74023
8 years, 6 months ago (2012-06-15 15:20:19 UTC) #33
commit-bot: I haz the power
Change committed as 142408
8 years, 6 months ago (2012-06-15 16:54:53 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mmocny@chromium.org/10052018/92002
8 years, 6 months ago (2012-06-15 22:40:00 UTC) #35
commit-bot: I haz the power
Change committed as 142541
8 years, 6 months ago (2012-06-16 00:35:57 UTC) #36
Nikita (slow)
I had to revert this change as these bots were broken: http://build.chromium.org/p/chromium.chromiumos/builders/ChromiumOS%20%28amd64%29/builds/2556 http://build.chromium.org/p/chromium.chromiumos/builders/ChromiumOS%20%28x86%29/builds/6039 You should ...
8 years, 6 months ago (2012-06-18 13:18:22 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mmocny@chromium.org/10052018/104003
8 years, 6 months ago (2012-06-21 19:58:22 UTC) #38
commit-bot: I haz the power
Try job failure for 10052018-104003 (retry) on mac_rel for step "browser_tests". It's a second try, ...
8 years, 6 months ago (2012-06-21 21:04:37 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mmocny@chromium.org/10052018/104003
8 years, 6 months ago (2012-06-21 22:11:24 UTC) #40
commit-bot: I haz the power
Try job failure for 10052018-104003 (retry) (retry) on mac_rel for step "browser_tests". It's a second ...
8 years, 6 months ago (2012-06-21 23:41:59 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mmocny@chromium.org/10052018/104003
8 years, 6 months ago (2012-06-22 13:34:44 UTC) #42
commit-bot: I haz the power
Change committed as 143590
8 years, 6 months ago (2012-06-22 15:04:41 UTC) #43
Nikita (slow)
What was the issue with CrOS tests?
8 years, 6 months ago (2012-06-22 15:29:13 UTC) #44
piman
http://codereview.chromium.org/10052018/diff/140002/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): http://codereview.chromium.org/10052018/diff/140002/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode512 content/browser/renderer_host/render_widget_host_view_aura.cc:512: callback); I believe the thumbnailer expects you to run ...
8 years, 5 months ago (2012-07-25 19:56:51 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mmocny@chromium.org/10052018/136017
8 years, 4 months ago (2012-07-26 19:24:58 UTC) #46
commit-bot: I haz the power
8 years, 4 months ago (2012-07-26 23:42:05 UTC) #47
Change committed as 148657

Powered by Google App Engine
This is Rietveld 408576698