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

Issue 1157943004: cc: [WIP] Use worker context and OrderingBarrierCHROMIUM for one-copy. (Closed)

Created:
5 years, 6 months ago by sohanjg
Modified:
5 years, 2 months ago
Reviewers:
danakj, reveman, piman
CC:
cc-bugs_chromium.org, chromium-reviews, sohanjg_
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Use worker context and OrderingBarrierCHROMIUM for one-copy. This patch makes the texture copy operation in a worker context instead of the main cc context, and flushes the output to cc on completion. BUG=490295 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Patch Set 1 #

Patch Set 2 : do copy in worker thread. #

Total comments: 27

Patch Set 3 : review comments addressed. #

Total comments: 3

Patch Set 4 : handle sync while copying texture. #

Total comments: 1

Patch Set 5 : worker context in resource provider. #

Patch Set 6 : avoid invoking ResourceProvider from worker thread. #

Patch Set 7 : piman's comments. #

Total comments: 22

Patch Set 8 : review comments + command completed check. #

Total comments: 16

Patch Set 9 : piman's comments #

Total comments: 4

Patch Set 10 : keep resource ownership in compositor. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+212 lines, -260 lines) Patch
M cc/raster/one_copy_tile_task_worker_pool.h View 1 2 3 4 5 6 7 8 9 4 chunks +3 lines, -33 lines 0 comments Download
M cc/raster/one_copy_tile_task_worker_pool.cc View 1 2 3 4 5 6 7 8 9 13 chunks +52 lines, -216 lines 0 comments Download
M cc/resources/resource_provider.h View 1 2 3 4 5 6 7 8 2 chunks +37 lines, -0 lines 0 comments Download
M cc/resources/resource_provider.cc View 1 2 3 4 5 6 7 8 9 3 chunks +120 lines, -3 lines 2 comments Download
M content/browser/gpu/compositor_util.cc View 1 2 3 4 5 1 chunk +0 lines, -8 lines 0 comments Download

Messages

Total messages: 34 (4 generated)
sohanjg
Can you please take a look. thanks.
5 years, 6 months ago (2015-06-04 11:15:28 UTC) #2
reveman
This doesn't move the copy operations to a worker context. It just makes some unnecessary ...
5 years, 6 months ago (2015-06-04 13:52:12 UTC) #3
sohanjg
On 2015/06/04 13:52:12, reveman wrote: > This doesn't move the copy operations to a worker ...
5 years, 6 months ago (2015-06-04 14:05:38 UTC) #4
sohanjg
On 2015/06/04 14:05:38, sohanjg wrote: > On 2015/06/04 13:52:12, reveman wrote: > > This doesn't ...
5 years, 6 months ago (2015-06-04 15:20:27 UTC) #5
danakj
How does this change what context the upload is done on? The copy happens in ...
5 years, 6 months ago (2015-06-04 17:07:10 UTC) #6
danakj
On Thu, Jun 4, 2015 at 10:07 AM, <danakj@chromium.org> wrote: > How does this change ...
5 years, 6 months ago (2015-06-04 17:08:18 UTC) #7
sohanjg
Can you please take a look, if this is what we want ? Based on ...
5 years, 6 months ago (2015-06-09 09:23:41 UTC) #8
sohanjg
Can you please take a look, if this is what we want ? Based on ...
5 years, 6 months ago (2015-06-09 09:23:41 UTC) #9
reveman
https://codereview.chromium.org/1157943004/diff/20001/cc/raster/one_copy_tile_task_worker_pool.cc File cc/raster/one_copy_tile_task_worker_pool.cc (left): https://codereview.chromium.org/1157943004/diff/20001/cc/raster/one_copy_tile_task_worker_pool.cc#oldcode103 cc/raster/one_copy_tile_task_worker_pool.cc:103: const int kMaxCopyOperations = 32; we still need this ...
5 years, 6 months ago (2015-06-09 13:30:56 UTC) #10
sohanjg
please take a look, thanks. https://codereview.chromium.org/1157943004/diff/20001/cc/raster/one_copy_tile_task_worker_pool.cc File cc/raster/one_copy_tile_task_worker_pool.cc (left): https://codereview.chromium.org/1157943004/diff/20001/cc/raster/one_copy_tile_task_worker_pool.cc#oldcode103 cc/raster/one_copy_tile_task_worker_pool.cc:103: const int kMaxCopyOperations = ...
5 years, 6 months ago (2015-06-09 15:59:24 UTC) #12
reveman
https://codereview.chromium.org/1157943004/diff/20001/cc/raster/one_copy_tile_task_worker_pool.cc File cc/raster/one_copy_tile_task_worker_pool.cc (left): https://codereview.chromium.org/1157943004/diff/20001/cc/raster/one_copy_tile_task_worker_pool.cc#oldcode103 cc/raster/one_copy_tile_task_worker_pool.cc:103: const int kMaxCopyOperations = 32; On 2015/06/09 at 15:59:23, ...
5 years, 6 months ago (2015-06-09 18:00:30 UTC) #13
reveman
Please update IsZeroCopyUploadEnabled in compositor_util.cc as part of this change.
5 years, 6 months ago (2015-06-10 04:38:28 UTC) #14
sohanjg
On 2015/06/10 04:38:28, reveman wrote: > Please update IsZeroCopyUploadEnabled in compositor_util.cc as part of this ...
5 years, 6 months ago (2015-06-10 15:06:18 UTC) #15
sohanjg
Can you please take a look. thanks. https://codereview.chromium.org/1157943004/diff/20001/cc/raster/one_copy_tile_task_worker_pool.cc File cc/raster/one_copy_tile_task_worker_pool.cc (left): https://codereview.chromium.org/1157943004/diff/20001/cc/raster/one_copy_tile_task_worker_pool.cc#oldcode103 cc/raster/one_copy_tile_task_worker_pool.cc:103: const int ...
5 years, 6 months ago (2015-06-11 13:32:26 UTC) #16
reveman
I think we need to take a step back and make sure we understand how ...
5 years, 6 months ago (2015-06-11 14:19:26 UTC) #17
sohanjg
Hi reveman@, As i couldn't reach you last week, i discussed the CL with piman@. ...
5 years, 5 months ago (2015-06-30 14:26:45 UTC) #19
danakj
On Tue, Jun 30, 2015 at 7:26 AM, <sohan.jyoti@samsung.com> wrote: > Hi reveman@, > > ...
5 years, 5 months ago (2015-06-30 18:51:41 UTC) #21
sohanjg
thanks Dana. will try that. piman@, i have updated as per your comments offline. Please ...
5 years, 5 months ago (2015-07-01 12:27:06 UTC) #22
piman
On Tue, Jun 30, 2015 at 11:51 AM, Dana Jansens <danakj@chromium.org> wrote: > On Tue, ...
5 years, 5 months ago (2015-07-01 21:08:31 UTC) #23
reveman
Sorry for not being able to review this recently. I think the crux is resource ...
5 years, 5 months ago (2015-07-01 21:29:11 UTC) #24
piman
A bunch of comments / direction suggestion, but reveman@ should take a closer look. https://codereview.chromium.org/1157943004/diff/160001/cc/raster/one_copy_tile_task_worker_pool.cc ...
5 years, 5 months ago (2015-07-01 22:11:05 UTC) #25
sohanjg
Finaaally we have rendered with this patchset! thanks piman@ :) Please take a look. We ...
5 years, 5 months ago (2015-07-02 14:40:28 UTC) #26
piman
Some comments, but really need reveman@ to take a look and we do need some ...
5 years, 5 months ago (2015-07-08 23:12:13 UTC) #27
sohanjg
PTAL, waiting for reveman@ to have a look. and then finalize the throttling logic. thanks. ...
5 years, 5 months ago (2015-07-09 10:04:56 UTC) #28
piman
https://codereview.chromium.org/1157943004/diff/200001/cc/raster/one_copy_tile_task_worker_pool.cc File cc/raster/one_copy_tile_task_worker_pool.cc (right): https://codereview.chromium.org/1157943004/diff/200001/cc/raster/one_copy_tile_task_worker_pool.cc#newcode83 cc/raster/one_copy_tile_task_worker_pool.cc:83: reusing_raster_resource, lock_.Pass(), gl_lock_.Pass(), Oh, actually, something I missed in ...
5 years, 5 months ago (2015-07-10 02:25:09 UTC) #29
sohanjg
PTAL. thanks. And reg throttling, is it safe to access resource pool, and do CheckBusyResources. ...
5 years, 5 months ago (2015-07-10 13:34:31 UTC) #30
reveman
https://codereview.chromium.org/1157943004/diff/220001/cc/resources/resource_provider.cc File cc/resources/resource_provider.cc (right): https://codereview.chromium.org/1157943004/diff/220001/cc/resources/resource_provider.cc#newcode1032 cc/resources/resource_provider.cc:1032: make_scoped_refptr(new CopyTextureFence(gl, query_id_)); How does is this supposed to ...
5 years, 5 months ago (2015-07-10 13:50:34 UTC) #31
piman
https://codereview.chromium.org/1157943004/diff/220001/cc/resources/resource_provider.cc File cc/resources/resource_provider.cc (right): https://codereview.chromium.org/1157943004/diff/220001/cc/resources/resource_provider.cc#newcode1032 cc/resources/resource_provider.cc:1032: make_scoped_refptr(new CopyTextureFence(gl, query_id_)); On 2015/07/10 13:50:34, reveman wrote: > ...
5 years, 5 months ago (2015-07-10 17:12:36 UTC) #32
reveman
On 2015/07/10 at 17:12:36, piman wrote: > https://codereview.chromium.org/1157943004/diff/220001/cc/resources/resource_provider.cc > File cc/resources/resource_provider.cc (right): > > https://codereview.chromium.org/1157943004/diff/220001/cc/resources/resource_provider.cc#newcode1032 ...
5 years, 5 months ago (2015-07-10 19:56:07 UTC) #33
reveman
5 years, 5 months ago (2015-07-14 22:35:42 UTC) #34
On 2015/07/10 at 19:56:07, reveman wrote:
> On 2015/07/10 at 17:12:36, piman wrote:
> >
https://codereview.chromium.org/1157943004/diff/220001/cc/resources/resource_...
> > File cc/resources/resource_provider.cc (right):
> > 
> >
https://codereview.chromium.org/1157943004/diff/220001/cc/resources/resource_...
> > cc/resources/resource_provider.cc:1032: make_scoped_refptr(new
CopyTextureFence(gl, query_id_));
> > On 2015/07/10 13:50:34, reveman wrote:
> > > How does is this supposed to work? We have to create a fence for the
context
> > > that we used to perform the copy operation and not the cc thread. We also
want
> > > to use these fences to block on the worker context.
> > > 
> > > I think we need to create the query for the worker context on the worker
thread
> > > as part of issuing the copy command.
> > 
> > The query is created on the worker context around the copy (see
BeginCopyTexture/EndCopyTexture), but you're right that we need to use the
worker context here rather than the compositor context, but causes further
problems since queries are not shared across contexts.
> > 
> > > This also means that you can't use the
> > > "busy" login in the resource pool to check for completion.
> > > 
> > > I'm wondering if it wouldn't be much easier to avoid using the
ResourcePool
> > > class and ResourceProvider for staging resources all together and just
manage
> > > staging resources inside the OneCopyTileTaskWorkerPool.
> > 
> > I think that's a really reasonable approach.
> 
> I'll try to put together a simple patch that shows what this direction would
look like.

Something like this seem to work well:
https://codereview.chromium.org/1230203007

Powered by Google App Engine
This is Rietveld 408576698