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

Issue 11622008: cc: Defer texture allocation (to allow async allocations). (Closed)

Created:
8 years ago by epenner
Modified:
7 years, 11 months ago
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

cc: Defer texture allocation (to allow async allocations). For textures, delay allocating until the first setPixels or beginSetPixels. This allows us to do a combined async allocation/upload in beginSetPixels. BUG=161337 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=173875 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=174035 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=175884

Patch Set 1 #

Total comments: 10

Patch Set 2 : Address feedback. Test on the way. #

Total comments: 2

Patch Set 3 : Address feedback. Add test. #

Total comments: 8

Patch Set 4 : Address feedback. #

Patch Set 5 : Test removing LockForRead DCHECK. #

Patch Set 6 : Track uninitialized textures. Fix tests. #

Total comments: 3

Patch Set 7 : Fix remaining tests. #

Total comments: 2

Patch Set 8 : Last feedback. #

Patch Set 9 : Try again. #

Patch Set 10 : Fix one new test. #

Patch Set 11 : Add bindTexture to lazy bind. Improve test. #

Patch Set 12 : Move write lock to before flush. #

Patch Set 13 : Rebase. #

Patch Set 14 : Rebase. Rebase test fixes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+183 lines, -19 lines) Patch
M cc/heads_up_display_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +7 lines, -1 line 0 comments Download
M cc/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -0 lines 0 comments Download
M cc/resource_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +6 lines, -0 lines 0 comments Download
M cc/resource_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 17 chunks +71 lines, -16 lines 0 comments Download
M cc/resource_provider_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +93 lines, -1 line 0 comments Download
M cc/resource_update_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M cc/test/render_pass_test_common.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -0 lines 0 comments Download
M cc/texture_layer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 39 (0 generated)
epenner
Ptal. This passes existing tests, which cover basic use cases. Is there any expectation that ...
8 years ago (2012-12-17 22:50:23 UTC) #1
reveman
https://codereview.chromium.org/11622008/diff/1/cc/resource_provider.cc File cc/resource_provider.cc (right): https://codereview.chromium.org/11622008/diff/1/cc/resource_provider.cc#newcode940 cc/resource_provider.cc:940: } else { how about always using asyncTexImage2DCHROMIUM here?
8 years ago (2012-12-17 23:22:08 UTC) #2
piman
test? https://codereview.chromium.org/11622008/diff/1/cc/resource_provider.cc File cc/resource_provider.cc (right): https://codereview.chromium.org/11622008/diff/1/cc/resource_provider.cc#newcode403 cc/resource_provider.cc:403: DCHECK(!resource->exported); nit: Add a DCHECK(resource->allocated); here https://codereview.chromium.org/11622008/diff/1/cc/resource_provider.cc#newcode664 cc/resource_provider.cc:664: ...
8 years ago (2012-12-17 23:29:36 UTC) #3
epennerAtGoogle
https://codereview.chromium.org/11622008/diff/1/cc/resource_provider.cc File cc/resource_provider.cc (right): https://codereview.chromium.org/11622008/diff/1/cc/resource_provider.cc#newcode940 cc/resource_provider.cc:940: } else { On 2012/12/17 23:22:08, David Reveman wrote: ...
8 years ago (2012-12-17 23:35:26 UTC) #4
reveman
On 2012/12/17 23:35:26, epennerAtGoogle wrote: > https://codereview.chromium.org/11622008/diff/1/cc/resource_provider.cc > File cc/resource_provider.cc (right): > > https://codereview.chromium.org/11622008/diff/1/cc/resource_provider.cc#newcode940 > ...
8 years ago (2012-12-17 23:55:02 UTC) #5
epennerAtGoogle
Test is on the way. https://codereview.chromium.org/11622008/diff/1/cc/resource_provider.cc File cc/resource_provider.cc (right): https://codereview.chromium.org/11622008/diff/1/cc/resource_provider.cc#newcode403 cc/resource_provider.cc:403: DCHECK(!resource->exported); On 2012/12/17 23:29:36, ...
8 years ago (2012-12-18 00:12:34 UTC) #6
piman
On Mon, Dec 17, 2012 at 4:12 PM, <epenner@google.com> wrote: > Test is on the ...
8 years ago (2012-12-18 00:30:15 UTC) #7
piman
https://codereview.chromium.org/11622008/diff/7001/cc/resource_provider.cc File cc/resource_provider.cc (right): https://codereview.chromium.org/11622008/diff/7001/cc/resource_provider.cc#newcode872 cc/resource_provider.cc:872: } I'd prefer if this code was shared with ...
8 years ago (2012-12-18 00:30:47 UTC) #8
epenner
Also added a test. Ptal. https://codereview.chromium.org/11622008/diff/7001/cc/resource_provider.cc File cc/resource_provider.cc (right): https://codereview.chromium.org/11622008/diff/7001/cc/resource_provider.cc#newcode872 cc/resource_provider.cc:872: } On 2012/12/18 00:30:47, ...
8 years ago (2012-12-18 04:02:47 UTC) #9
piman
LGTM + nits https://codereview.chromium.org/11622008/diff/2002/cc/resource_provider.cc File cc/resource_provider.cc (right): https://codereview.chromium.org/11622008/diff/2002/cc/resource_provider.cc#newcode987 cc/resource_provider.cc:987: if (!resource->allocated) { nit: if (resource->allocated) ...
8 years ago (2012-12-18 04:12:34 UTC) #10
epenner
https://codereview.chromium.org/11622008/diff/2002/cc/resource_provider.cc File cc/resource_provider.cc (right): https://codereview.chromium.org/11622008/diff/2002/cc/resource_provider.cc#newcode987 cc/resource_provider.cc:987: if (!resource->allocated) { On 2012/12/18 04:12:34, piman wrote: > ...
8 years ago (2012-12-18 04:23:51 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/epenner@chromium.org/11622008/6003
8 years ago (2012-12-18 04:27:05 UTC) #12
piman
https://codereview.chromium.org/11622008/diff/2002/cc/resource_provider_unittest.cc File cc/resource_provider_unittest.cc (right): https://codereview.chromium.org/11622008/diff/2002/cc/resource_provider_unittest.cc#newcode677 cc/resource_provider_unittest.cc:677: uint8_t pixels[16]; On 2012/12/18 04:23:52, epenner wrote: > On ...
8 years ago (2012-12-18 04:36:01 UTC) #13
epenner
On 2012/12/18 04:36:01, piman wrote: > https://codereview.chromium.org/11622008/diff/2002/cc/resource_provider_unittest.cc > File cc/resource_provider_unittest.cc (right): > > https://codereview.chromium.org/11622008/diff/2002/cc/resource_provider_unittest.cc#newcode677 > ...
8 years ago (2012-12-18 04:52:24 UTC) #14
piman
On Mon, Dec 17, 2012 at 8:52 PM, <epenner@chromium.org> wrote: > On 2012/12/18 04:36:01, piman ...
8 years ago (2012-12-18 06:29:01 UTC) #15
epenner
Okay, I kept the DCHECK which nicely lets us track reading from uninitialized textures. However, ...
8 years ago (2012-12-18 22:28:24 UTC) #16
piman
https://codereview.chromium.org/11622008/diff/16001/cc/resource_provider.cc File cc/resource_provider.cc (right): https://codereview.chromium.org/11622008/diff/16001/cc/resource_provider.cc#newcode410 cc/resource_provider.cc:410: DCHECK(resource->allocated); // Texture uninitialized! setPixels or lockForWrite first. nit: ...
8 years ago (2012-12-18 22:41:38 UTC) #17
epenner
Okay, the last offender (doing an uninitialized read) was the HUD layer. Since there might ...
8 years ago (2012-12-19 00:37:05 UTC) #18
piman
https://codereview.chromium.org/11622008/diff/20002/cc/heads_up_display_layer_impl.cc File cc/heads_up_display_layer_impl.cc (right): https://codereview.chromium.org/11622008/diff/20002/cc/heads_up_display_layer_impl.cc#newcode81 cc/heads_up_display_layer_impl.cc:81: // TODO(epenner): This texture was being used before setPixels ...
8 years ago (2012-12-19 00:45:49 UTC) #19
epenner
> It sounds like the allocation should be done in updateHudTexture but I may be ...
8 years ago (2012-12-19 01:18:03 UTC) #20
piman
lgtm
8 years ago (2012-12-19 01:22:39 UTC) #21
epenner
I'm gonna land since looks like you are offline. But I'll make any follow up ...
8 years ago (2012-12-19 01:24:50 UTC) #22
epenner
On 2012/12/19 01:24:50, epenner wrote: > I'm gonna land since looks like you are offline. ...
8 years ago (2012-12-19 01:25:11 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/epenner@chromium.org/11622008/16002
8 years ago (2012-12-19 01:31:49 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/epenner@chromium.org/11622008/16002
8 years ago (2012-12-19 07:10:02 UTC) #25
commit-bot: I haz the power
Change committed as 173875
8 years ago (2012-12-19 07:57:37 UTC) #26
epennerAtGoogle
On 2012/12/19 07:57:37, I haz the power (commit-bot) wrote: > Change committed as 173875 It ...
8 years ago (2012-12-19 21:15:27 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/epenner@chromium.org/11622008/27008
8 years ago (2012-12-19 21:16:09 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/epenner@chromium.org/11622008/27008
8 years ago (2012-12-19 22:41:43 UTC) #29
commit-bot: I haz the power
Change committed as 174035
8 years ago (2012-12-19 23:20:47 UTC) #30
epennerAtGoogle
On 2012/12/19 23:20:47, I haz the power (commit-bot) wrote: > Change committed as 174035 This ...
8 years ago (2012-12-21 03:34:02 UTC) #31
epenner
Okay I've looked at every call-site for ScopedWriteLock and LockForWrite. There isn't very many, and ...
8 years ago (2012-12-21 22:27:55 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/epenner@chromium.org/11622008/21007
8 years ago (2012-12-21 22:28:25 UTC) #33
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests
8 years ago (2012-12-22 02:15:49 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/epenner@chromium.org/11622008/39001
7 years, 11 months ago (2013-01-04 22:10:56 UTC) #35
commit-bot: I haz the power
Failed to apply patch for cc/layer_tree_host_impl_unittest.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 11 months ago (2013-01-04 22:11:03 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/epenner@chromium.org/11622008/53001
7 years, 11 months ago (2013-01-09 17:29:18 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/epenner@chromium.org/11622008/53001
7 years, 11 months ago (2013-01-09 21:03:12 UTC) #38
commit-bot: I haz the power
7 years, 11 months ago (2013-01-09 21:06:13 UTC) #39
Message was sent while issue was closed.
Change committed as 175884

Powered by Google App Engine
This is Rietveld 408576698