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

Issue 2885533002: cc: Allocate resources on worker context.

Created:
3 years, 7 months ago by sunnyps
Modified:
3 years, 6 months ago
Reviewers:
vmiura, piman
CC:
chromium-reviews, cc-bugs_chromium.org, vmiura, ericrk
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Allocate resources on worker context. ScopedWriteLockGL will not pre-allocate its resource if async worker context (gpu scheduler) is enabled. Instead it will only create a GL id and mailbox for the resource on the compositor context. Later on the worker context, ScopedTextureProvider creates a GL id and allocates the resource if necessary. This works with both GL and GMB resources. This CL also includes minor cleanup in resource provider code. R=piman BUG=514819 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Patch Set 1 #

Patch Set 2 : cc: Allocate resources on worker context. #

Patch Set 3 : rebase #

Patch Set 4 : fix tests #

Total comments: 6

Patch Set 5 : WIP #

Patch Set 6 : WIP #

Patch Set 7 : fix gmb #

Patch Set 8 : test fix #

Patch Set 9 : gmb fix #

Patch Set 10 : test fix #

Patch Set 11 : rebase #

Patch Set 12 : cc: Allocate resources on worker context. #

Patch Set 13 : also upload gmb resources #

Patch Set 14 : tests #

Total comments: 3

Patch Set 15 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+637 lines, -321 lines) Patch
M cc/raster/gpu_raster_buffer_provider.cc View 1 2 3 4 5 5 chunks +56 lines, -7 lines 0 comments Download
M cc/raster/one_copy_raster_buffer_provider.cc View 1 2 3 4 5 4 chunks +9 lines, -6 lines 0 comments Download
M cc/resources/resource_format.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M cc/resources/resource_format.cc View 1 2 3 4 1 chunk +17 lines, -0 lines 0 comments Download
M cc/resources/resource_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 chunks +64 lines, -58 lines 0 comments Download
M cc/resources/resource_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 13 chunks +200 lines, -203 lines 0 comments Download
M cc/resources/resource_provider_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 11 chunks +289 lines, -47 lines 0 comments Download

Messages

Total messages: 48 (39 generated)
sunnyps
piman PTAL vmiura, ericrk FYI PTAL if you like
3 years, 7 months ago (2017-05-16 01:34:50 UTC) #9
sunnyps
Please hold off on l-g-t-m-ing this. There's a bug with GMB resources with async worker ...
3 years, 7 months ago (2017-05-17 20:36:38 UTC) #12
piman
https://codereview.chromium.org/2885533002/diff/60001/cc/resources/resource_provider.h File cc/resources/resource_provider.h (right): https://codereview.chromium.org/2885533002/diff/60001/cc/resources/resource_provider.h#newcode311 cc/resources/resource_provider.h:311: ResourceProvider::Resource* resource_; I don't think it's safe to keep ...
3 years, 7 months ago (2017-05-17 20:58:58 UTC) #13
sunnyps
https://codereview.chromium.org/2885533002/diff/60001/cc/resources/resource_provider.h File cc/resources/resource_provider.h (right): https://codereview.chromium.org/2885533002/diff/60001/cc/resources/resource_provider.h#newcode311 cc/resources/resource_provider.h:311: ResourceProvider::Resource* resource_; On 2017/05/17 20:58:58, piman wrote: > I ...
3 years, 7 months ago (2017-05-17 22:01:35 UTC) #14
piman
On 2017/05/17 22:01:35, sunnyps wrote: > https://codereview.chromium.org/2885533002/diff/60001/cc/resources/resource_provider.h > File cc/resources/resource_provider.h (right): > > https://codereview.chromium.org/2885533002/diff/60001/cc/resources/resource_provider.h#newcode311 > ...
3 years, 7 months ago (2017-05-17 22:08:11 UTC) #15
vmiura
https://codereview.chromium.org/2885533002/diff/60001/cc/resources/resource_provider.h File cc/resources/resource_provider.h (right): https://codereview.chromium.org/2885533002/diff/60001/cc/resources/resource_provider.h#newcode311 cc/resources/resource_provider.h:311: ResourceProvider::Resource* resource_; On 2017/05/17 22:01:35, sunnyps wrote: > On ...
3 years, 7 months ago (2017-05-17 22:13:10 UTC) #17
sunnyps
Iterators can be but not references or pointers. From that same page, below the iterator ...
3 years, 7 months ago (2017-05-17 22:14:49 UTC) #18
sunnyps
PTAL Addressed all comments and added tests for ScopedWriteLockGL (both async and default). This CL ...
3 years, 6 months ago (2017-06-08 00:30:07 UTC) #45
piman
3 years, 6 months ago (2017-06-09 22:14:20 UTC) #48
https://codereview.chromium.org/2885533002/diff/260001/cc/resources/resource_...
File cc/resources/resource_provider.cc (left):

https://codereview.chromium.org/2885533002/diff/260001/cc/resources/resource_...
cc/resources/resource_provider.cc:1681: resource->SetSynchronized();
Why are we removing this one? Won't this cause extra WaitSyncTokens when we
reuse the resource?

https://codereview.chromium.org/2885533002/diff/260001/cc/resources/resource_...
File cc/resources/resource_provider.cc (right):

https://codereview.chromium.org/2885533002/diff/260001/cc/resources/resource_...
cc/resources/resource_provider.cc:1150: bool async_worker_context_enabled)
nit: I'm not sure the parameter name is just right, because we pass false in
ResourceProvider::CopyToResource, even though async workers might very well be
enabled.
Maybe something like "defer_resource_allocation" or something?

https://codereview.chromium.org/2885533002/diff/260001/cc/resources/resource_...
File cc/resources/resource_provider_unittest.cc (right):

https://codereview.chromium.org/2885533002/diff/260001/cc/resources/resource_...
cc/resources/resource_provider_unittest.cc:3899: false);
nit: you may want to add Mock::VerifyAndClearExpectations(context) here and
other places to make sure the expectations have happened by now (i.e. are not
deferred until a later point).

Powered by Google App Engine
This is Rietveld 408576698