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

Issue 10388010: Decoupling backbuffer allocation suggestion from frontbuffer allocation suggestion. (Closed)

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

Description

Decoupling backbuffer allocation suggestion from frontbuffer allocation suggestion. Frontbuffer drop was hinged onto the discardBackbuffer message. Since only a single discard mess is sent now, and since discarding backbuffer comes first, a message frontbuffer drop was waiting for would never come. This cl just refactors to decouple the two allocations and should be functionally equivalent to current behaviour, except it does not make assumptions about when discard messages should come through. BUG=126542 TEST=Manual Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=137432

Patch Set 1 #

Total comments: 14

Patch Set 2 : Caching size in EGL (compiles, not tested), and DCHECKS to win (not tested). #

Total comments: 10

Patch Set 3 : Updating all platforms to really decouple the two allocations by not using a shared AdjustBufferAll… #

Total comments: 4

Patch Set 4 : Fixing EGL issues with DCHECKS and fixing review comment #

Patch Set 5 : Adding swap DCHECK to other platforms #

Patch Set 6 : SwapBuffers returns a bool #

Total comments: 10

Patch Set 7 : Reseting damage when dropping front buffer. #

Patch Set 8 : Reset previous damage at time of swap. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+175 lines, -149 lines) Patch
M content/common/gpu/gpu_command_buffer_stub.h View 1 2 3 4 5 3 chunks +0 lines, -8 lines 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.cc View 1 2 3 4 5 3 chunks +6 lines, -20 lines 0 comments Download
M content/common/gpu/image_transport_surface_linux.cc View 1 2 3 4 5 6 7 13 chunks +62 lines, -51 lines 0 comments Download
M content/common/gpu/image_transport_surface_mac.cc View 1 2 3 4 5 5 chunks +29 lines, -21 lines 0 comments Download
M content/common/gpu/image_transport_surface_win.cc View 1 2 3 4 5 6 chunks +30 lines, -25 lines 0 comments Download
M content/common/gpu/texture_image_transport_surface.h View 1 2 3 4 5 2 chunks +5 lines, -1 line 0 comments Download
M content/common/gpu/texture_image_transport_surface.cc View 1 2 3 4 5 6 7 4 chunks +28 lines, -11 lines 0 comments Download
M ui/gl/gl_surface.h View 1 2 3 4 5 2 chunks +5 lines, -9 lines 0 comments Download
M ui/gl/gl_surface.cc View 1 2 3 4 5 2 chunks +10 lines, -3 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
mmocny
Jonathan, may I get a review? Al tried this out last night and confirmed it ...
8 years, 7 months ago (2012-05-08 14:17:13 UTC) #1
jonathan.backer
There's a lot of minor code in common between the different transport surfaces. I don't ...
8 years, 7 months ago (2012-05-09 18:13:01 UTC) #2
mmocny
Regarding your comment on lots of duplicated code: I can add implementation of "suggested_allocations" to ...
8 years, 7 months ago (2012-05-09 18:59:14 UTC) #3
mmocny
Patch is up. I tested on windows yesterday, and John Bates tested on Mac for ...
8 years, 7 months ago (2012-05-10 17:32:10 UTC) #4
jonathan.backer
I think that the code will be simpler still (easier to reason about), if we ...
8 years, 7 months ago (2012-05-10 21:37:48 UTC) #5
mmocny
Updated as per review comments. I agree, this is cleaner to completely separate out the ...
8 years, 7 months ago (2012-05-11 17:10:49 UTC) #6
jonathan.backer
https://chromiumcodereview.appspot.com/10388010/diff/4005/content/common/gpu/image_transport_surface_linux.cc File content/common/gpu/image_transport_surface_linux.cc (right): https://chromiumcodereview.appspot.com/10388010/diff/4005/content/common/gpu/image_transport_surface_linux.cc#newcode352 content/common/gpu/image_transport_surface_linux.cc:352: if (!!back_surface_.get() != backbuffer_suggested_allocation_) { This check seems redundant ...
8 years, 7 months ago (2012-05-11 18:43:15 UTC) #7
mmocny
Alright, most recent patch is tested on all platforms except windows (I am getting some ...
8 years, 7 months ago (2012-05-14 17:10:36 UTC) #8
jonathan.backer
https://chromiumcodereview.appspot.com/10388010/diff/13002/content/common/gpu/image_transport_surface_linux.cc File content/common/gpu/image_transport_surface_linux.cc (right): https://chromiumcodereview.appspot.com/10388010/diff/13002/content/common/gpu/image_transport_surface_linux.cc#newcode402 content/common/gpu/image_transport_surface_linux.cc:402: if (!frontbuffer_suggested_allocation_) Need to set |previous_damage_rect_| here. AFAIK, we ...
8 years, 7 months ago (2012-05-15 15:53:30 UTC) #9
mmocny
Alright, this patch fixes the issues raised. I've tested again on EGL, and still working ...
8 years, 7 months ago (2012-05-15 20:02:27 UTC) #10
mmocny
Finally got a build on windows. Verified that this patch is not causing any issues.
8 years, 7 months ago (2012-05-15 20:40:53 UTC) #11
jonathan.backer
LGTM I have a slight preference from the preview_damage_rect to be set at the time ...
8 years, 7 months ago (2012-05-16 02:39:00 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mmocny@chromium.org/10388010/7015
8 years, 7 months ago (2012-05-16 14:36:44 UTC) #13
mmocny
I think the |previous_damage_rect_| may need to be set at the time of discard for ...
8 years, 7 months ago (2012-05-16 14:41:49 UTC) #14
commit-bot: I haz the power
8 years, 7 months ago (2012-05-16 15:55:56 UTC) #15
Change committed as 137432

Powered by Google App Engine
This is Rietveld 408576698