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

Issue 1336623004: content/gpu: Simplify gpu channel message handling. (Closed)

Created:
5 years, 3 months ago by sunnyps
Modified:
5 years, 3 months ago
Reviewers:
dcheng, David Yen, jbauman, piman
CC:
chromium-reviews, darin-cc_chromium.org, David Yen, jam, piman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

content/gpu: Simplify gpu channel message handling. This CL makes the following changes to gpu channel message handling: 1. The GpuChannelMessageQueue interface is exposed in the header so that it may be used by the upcoming gpu scheduler. 2. Removed friend classes in GpuChannel. 3. Messages are no longer popped from the message queue and reinserted when retrying. Instead messages are only popped after they have been handled. 4. As a result, we no longer synthesize the Reschedule and RetireSyncPoint IPC messages. BUG=514813 Committed: https://crrev.com/4a6a3d8c391412023e86a755fd35840baa22e578 Cr-Commit-Position: refs/heads/master@{#349584}

Patch Set 1 #

Total comments: 29

Patch Set 2 : dyen + dcheng review #

Patch Set 3 : couple of things missed in the last patch #

Total comments: 10

Patch Set 4 : piman's review #

Patch Set 5 : handle preemption better #

Total comments: 5

Patch Set 6 : piman #

Total comments: 11

Patch Set 7 : dcheng's review #

Total comments: 6

Patch Set 8 : fix compile error and dcheck fail #

Patch Set 9 : dcheng's final comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+366 lines, -373 lines) Patch
M content/common/gpu/gpu_channel.h View 1 2 3 4 5 6 7 chunks +104 lines, -25 lines 0 comments Download
M content/common/gpu/gpu_channel.cc View 1 2 3 4 5 6 7 8 11 chunks +222 lines, -296 lines 0 comments Download
M content/common/gpu/gpu_channel_manager.h View 1 3 chunks +9 lines, -4 lines 0 comments Download
M content/common/gpu/gpu_channel_manager.cc View 1 3 chunks +11 lines, -11 lines 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.h View 1 2 3 4 3 chunks +1 line, -7 lines 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.cc View 1 2 3 4 5 5 chunks +16 lines, -20 lines 0 comments Download
M content/common/gpu/gpu_messages.h View 2 chunks +1 line, -8 lines 0 comments Download
M gpu/command_buffer/service/gpu_scheduler.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 37 (7 generated)
sunnyps
PTAL This is the first step in making message queue hold all the state for ...
5 years, 3 months ago (2015-09-10 21:17:03 UTC) #2
sunnyps
+dyen@
5 years, 3 months ago (2015-09-10 21:17:35 UTC) #3
David Yen
https://codereview.chromium.org/1336623004/diff/1/content/common/gpu/gpu_channel.h File content/common/gpu/gpu_channel.h (left): https://codereview.chromium.org/1336623004/diff/1/content/common/gpu/gpu_channel.h#oldcode182 content/common/gpu/gpu_channel.h:182: uint32_t GetCurrentOrderNum() const { return current_order_num_; } Was this ...
5 years, 3 months ago (2015-09-10 21:23:04 UTC) #5
dcheng
IPC changes are fine, but some other thoughts. https://codereview.chromium.org/1336623004/diff/1/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1336623004/diff/1/content/common/gpu/gpu_channel.cc#newcode117 content/common/gpu/gpu_channel.cc:117: DCHECK(message.type() ...
5 years, 3 months ago (2015-09-10 21:30:38 UTC) #7
David Yen
https://codereview.chromium.org/1336623004/diff/1/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1336623004/diff/1/content/common/gpu/gpu_channel.cc#newcode316 content/common/gpu/gpu_channel.cc:316: const uint32_t order_number = global_order_counter_++; Did you mean to ...
5 years, 3 months ago (2015-09-10 22:42:06 UTC) #9
sunnyps
PTAL Also +jbauman https://codereview.chromium.org/1336623004/diff/1/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1336623004/diff/1/content/common/gpu/gpu_channel.cc#newcode117 content/common/gpu/gpu_channel.cc:117: DCHECK(message.type() == GpuCommandBufferMsg_InsertSyncPoint::ID); On 2015/09/10 21:30:37, ...
5 years, 3 months ago (2015-09-10 23:38:37 UTC) #11
piman
https://codereview.chromium.org/1336623004/diff/40001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1336623004/diff/40001/content/common/gpu/gpu_channel.cc#newcode103 content/common/gpu/gpu_channel.cc:103: if (enabled_) nit: needs {} per style. https://codereview.chromium.org/1336623004/diff/40001/content/common/gpu/gpu_channel.cc#newcode849 content/common/gpu/gpu_channel.cc:849: ...
5 years, 3 months ago (2015-09-11 00:38:34 UTC) #12
sunnyps
PTAL https://codereview.chromium.org/1336623004/diff/40001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1336623004/diff/40001/content/common/gpu/gpu_channel.cc#newcode103 content/common/gpu/gpu_channel.cc:103: if (enabled_) On 2015/09/11 00:38:33, piman (slow to ...
5 years, 3 months ago (2015-09-11 01:53:22 UTC) #13
piman
https://codereview.chromium.org/1336623004/diff/40001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1336623004/diff/40001/content/common/gpu/gpu_channel.cc#newcode849 content/common/gpu/gpu_channel.cc:849: << " with type " << message.type(); On 2015/09/11 ...
5 years, 3 months ago (2015-09-11 02:30:07 UTC) #14
sunnyps
https://codereview.chromium.org/1336623004/diff/40001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1336623004/diff/40001/content/common/gpu/gpu_channel.cc#newcode849 content/common/gpu/gpu_channel.cc:849: << " with type " << message.type(); On 2015/09/11 ...
5 years, 3 months ago (2015-09-11 06:21:59 UTC) #15
David Yen
https://codereview.chromium.org/1336623004/diff/1/content/common/gpu/gpu_channel_manager.cc File content/common/gpu/gpu_channel_manager.cc (right): https://codereview.chromium.org/1336623004/diff/1/content/common/gpu/gpu_channel_manager.cc#newcode255 content/common/gpu/gpu_channel_manager.cc:255: base::AutoLock lock(order_num_lock_); On 2015/09/10 23:38:36, sunnyps wrote: > On ...
5 years, 3 months ago (2015-09-11 16:47:20 UTC) #16
sunnyps
PTAL Fixed the issues with preemption. I think this is better than what we had ...
5 years, 3 months ago (2015-09-14 21:22:02 UTC) #17
sunnyps
ping PTAL
5 years, 3 months ago (2015-09-15 20:43:43 UTC) #18
piman
lgtm https://codereview.chromium.org/1336623004/diff/80001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1336623004/diff/80001/content/common/gpu/gpu_channel.cc#newcode859 content/common/gpu/gpu_channel.cc:859: << " with type " << message.type(); Can ...
5 years, 3 months ago (2015-09-15 23:05:11 UTC) #19
sunnyps
https://codereview.chromium.org/1336623004/diff/80001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1336623004/diff/80001/content/common/gpu/gpu_channel.cc#newcode859 content/common/gpu/gpu_channel.cc:859: << " with type " << message.type(); On 2015/09/15 ...
5 years, 3 months ago (2015-09-15 23:18:51 UTC) #20
piman
On 2015/09/15 23:18:51, sunnyps wrote: > https://codereview.chromium.org/1336623004/diff/80001/content/common/gpu/gpu_channel.cc > File content/common/gpu/gpu_channel.cc (right): > > https://codereview.chromium.org/1336623004/diff/80001/content/common/gpu/gpu_channel.cc#newcode859 > ...
5 years, 3 months ago (2015-09-16 00:33:42 UTC) #21
sunnyps
dcheng PTAL https://codereview.chromium.org/1336623004/diff/80001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1336623004/diff/80001/content/common/gpu/gpu_channel.cc#newcode859 content/common/gpu/gpu_channel.cc:859: << " with type " << message.type(); ...
5 years, 3 months ago (2015-09-16 00:52:24 UTC) #22
piman
lgtm
5 years, 3 months ago (2015-09-16 00:54:05 UTC) #23
jbauman
lgtm
5 years, 3 months ago (2015-09-16 01:03:43 UTC) #24
dcheng
https://codereview.chromium.org/1336623004/diff/100001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1336623004/diff/100001/content/common/gpu/gpu_channel.cc#newcode115 content/common/gpu/gpu_channel.cc:115: DCHECK_EQ(message.type(), GpuCommandBufferMsg_InsertSyncPoint::ID); For consistency with gtest, it's nice to ...
5 years, 3 months ago (2015-09-17 00:15:18 UTC) #25
sunnyps
PTAL https://codereview.chromium.org/1336623004/diff/100001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1336623004/diff/100001/content/common/gpu/gpu_channel.cc#newcode115 content/common/gpu/gpu_channel.cc:115: DCHECK_EQ(message.type(), GpuCommandBufferMsg_InsertSyncPoint::ID); On 2015/09/17 00:15:18, dcheng wrote: > ...
5 years, 3 months ago (2015-09-17 00:32:39 UTC) #26
dcheng
lgtm
5 years, 3 months ago (2015-09-17 00:40:13 UTC) #27
dcheng
https://codereview.chromium.org/1336623004/diff/120001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1336623004/diff/120001/content/common/gpu/gpu_channel.cc#newcode121 content/common/gpu/gpu_channel.cc:121: scoped_ptr<GpuChannelMessage> msg = Forgot to add: here and elsewhere, ...
5 years, 3 months ago (2015-09-17 00:41:31 UTC) #28
David Yen
https://codereview.chromium.org/1336623004/diff/120001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1336623004/diff/120001/content/common/gpu/gpu_channel.cc#newcode174 content/common/gpu/gpu_channel.cc:174: scoped_ptr<GpuChannelMessage> msg = Since all the scoped_ptrs here are ...
5 years, 3 months ago (2015-09-17 17:04:27 UTC) #29
sunnyps
https://codereview.chromium.org/1336623004/diff/120001/content/common/gpu/gpu_channel.cc File content/common/gpu/gpu_channel.cc (right): https://codereview.chromium.org/1336623004/diff/120001/content/common/gpu/gpu_channel.cc#newcode174 content/common/gpu/gpu_channel.cc:174: scoped_ptr<GpuChannelMessage> msg = On 2015/09/17 17:04:27, David Yen wrote: ...
5 years, 3 months ago (2015-09-17 18:31:39 UTC) #30
sunnyps
dyen@ just pointed out that there's a ScopedVector implementation in base. I'll update the CL ...
5 years, 3 months ago (2015-09-17 18:35:38 UTC) #31
sunnyps
After discussing offline with dyen@ we decided not to use ScopedVector because what we really ...
5 years, 3 months ago (2015-09-18 00:35:56 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1336623004/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1336623004/160001
5 years, 3 months ago (2015-09-18 00:36:21 UTC) #35
commit-bot: I haz the power
Committed patchset #9 (id:160001)
5 years, 3 months ago (2015-09-18 02:23:51 UTC) #36
commit-bot: I haz the power
5 years, 3 months ago (2015-09-18 02:24:31 UTC) #37
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/4a6a3d8c391412023e86a755fd35840baa22e578
Cr-Commit-Position: refs/heads/master@{#349584}

Powered by Google App Engine
This is Rietveld 408576698