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

Issue 2866683003: Use more than double buffering in SoftwareOutputDeviceMac (Closed)

Created:
3 years, 7 months ago by ccameron
Modified:
3 years, 7 months ago
Reviewers:
jbauman
CC:
chromium-reviews, mac-reviews_chromium.org, jam, jbauman+watch_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, kalyank, danakj+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Use more than double buffering in SoftwareOutputDeviceMac Previously, this would flip between two buffers, but that had issues because the IOSurfaces would sometimes still be being read by the window server while the next frame was writing (leading to flashes). Change this to a buffer queue very similar to the GPU output surface BufferQueue. Use the IOSurfaceIsInUse function to ensure that buffers are not painted to until they are not being read by the window server. Limit the number of buffers being held in the queue to 4 (determined empirically). If we need more than 4, then they will thrash (by frequent allocation and discard). The window server will keep more than 4 IOSurfaces alive (as many as it needs) regardless of our purging here. BUG=650484 Review-Url: https://codereview.chromium.org/2866683003 Cr-Commit-Position: refs/heads/master@{#469876} Committed: https://chromium.googlesource.com/chromium/src/+/469d0548dfb4c3304c03571ba3f0f1a9bc58e2a4

Patch Set 1 #

Total comments: 4

Patch Set 2 : Review feedback and tests #

Patch Set 3 : Review feedback and tests #

Patch Set 4 : Fix compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+262 lines, -72 lines) Patch
M content/browser/compositor/software_output_device_mac.h View 1 2 3 3 chunks +40 lines, -20 lines 0 comments Download
M content/browser/compositor/software_output_device_mac.mm View 1 4 chunks +100 lines, -52 lines 0 comments Download
A content/browser/compositor/software_output_device_mac_unittest.mm View 1 2 1 chunk +120 lines, -0 lines 0 comments Download
M content/test/BUILD.gn View 1 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (12 generated)
ccameron
I tried very hard to this share the logic of BufferQueue, but ultimately didn't find ...
3 years, 7 months ago (2017-05-05 17:44:17 UTC) #2
jbauman
lgtm with a couple of nits. https://codereview.chromium.org/2866683003/diff/1/content/browser/compositor/software_output_device_mac.h File content/browser/compositor/software_output_device_mac.h (right): https://codereview.chromium.org/2866683003/diff/1/content/browser/compositor/software_output_device_mac.h#newcode63 content/browser/compositor/software_output_device_mac.h:63: // This surface ...
3 years, 7 months ago (2017-05-05 19:19:25 UTC) #3
ccameron
Thanks -- updated (and added a test for previous==next). https://codereview.chromium.org/2866683003/diff/1/content/browser/compositor/software_output_device_mac.h File content/browser/compositor/software_output_device_mac.h (right): https://codereview.chromium.org/2866683003/diff/1/content/browser/compositor/software_output_device_mac.h#newcode63 content/browser/compositor/software_output_device_mac.h:63: ...
3 years, 7 months ago (2017-05-05 22:06:08 UTC) #4
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/2866683003/20001
3 years, 7 months ago (2017-05-05 22:07:36 UTC) #7
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/2866683003/40001
3 years, 7 months ago (2017-05-05 22:13:14 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/446699)
3 years, 7 months ago (2017-05-05 22:31:31 UTC) #12
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/2866683003/60001
3 years, 7 months ago (2017-05-06 06:30:16 UTC) #15
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/2866683003/60001
3 years, 7 months ago (2017-05-06 09:16:16 UTC) #18
commit-bot: I haz the power
3 years, 7 months ago (2017-05-06 19:15:59 UTC) #21
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/469d0548dfb4c3304c03571ba3f0...

Powered by Google App Engine
This is Rietveld 408576698