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

Issue 10916292: Adaptively throttle texture uploads (Closed)

Created:
8 years, 3 months ago by brianderson
Modified:
8 years, 3 months ago
Reviewers:
jamesr, nduca, reveman, Nat
CC:
chromium-reviews
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Adaptively throttle texture uploads We need adaptive texture uploading because we run on a wide variety of systems and a one size fits all policy will not work. This patch maintains a tick rate of 4ms and default upload count of 12 textures per tick, but allows for more textures per tick if we've measured that we can be faster. The number of partial updates allowed is also communicated from the impl thread to the main thread at the beggining of each frame. BUG=145825 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=157473

Patch Set 1 #

Total comments: 5

Patch Set 2 : Add tests. #

Total comments: 14

Patch Set 3 : Address comments in PS2, except constant partials #

Total comments: 12

Patch Set 4 : Address comments #

Patch Set 5 : rebase #

Patch Set 6 : cc_unittests passing again #

Total comments: 2

Patch Set 7 : Fix CCTextureUpdateController::updateMoreTexturesNow due to rebase #

Patch Set 8 : Do not vary partial upload limit #

Total comments: 15

Patch Set 9 : Rebase. Estimate in textures not pixels. #

Total comments: 6

Patch Set 10 : rename maxPartialTextures #

Patch Set 11 : 1lu #

Patch Set 12 : Fix platform specific compile errors. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+108 lines, -24 lines) Patch
M cc/CCTextureUpdateController.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -0 lines 0 comments Download
M cc/CCTextureUpdateController.cpp View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +20 lines, -16 lines 0 comments Download
M cc/CCTextureUpdateControllerTest.cpp View 1 2 3 4 5 6 7 8 8 chunks +8 lines, -2 lines 0 comments Download
M cc/TextureUploader.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M cc/ThrottledTextureUploader.h View 1 2 3 4 5 6 7 8 4 chunks +10 lines, -1 line 0 comments Download
M cc/ThrottledTextureUploader.cpp View 1 2 3 4 5 6 7 8 7 chunks +62 lines, -5 lines 0 comments Download
M cc/UnthrottledTextureUploader.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M cc/test/CCTiledLayerTestCommon.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 35 (0 generated)
brianderson
Continuing review from https://bugs.webkit.org/show_bug.cgi?id=96067. This patch synchronizes the number of texture uploads on the main ...
8 years, 3 months ago (2012-09-13 19:55:17 UTC) #1
brianderson
https://codereview.chromium.org/10916292/diff/1/cc/CCLayerTreeHost.cpp File cc/CCLayerTreeHost.cpp (right): https://codereview.chromium.org/10916292/diff/1/cc/CCLayerTreeHost.cpp#newcode510 cc/CCLayerTreeHost.cpp:510: *maxTextureUpdates = m_maxPartialTextureUpdates; // We need to communicate that ...
8 years, 3 months ago (2012-09-13 20:09:26 UTC) #2
nduca
why on earth? https://codereview.chromium.org/10916292/diff/1/cc/CCLayerTreeHost.h File cc/CCLayerTreeHost.h (right): https://codereview.chromium.org/10916292/diff/1/cc/CCLayerTreeHost.h#newcode235 cc/CCLayerTreeHost.h:235: void updateLayers(LayerChromium*, CCTextureUpdateQueue&, size_t *maxTextureUpdates); wat?
8 years, 3 months ago (2012-09-13 20:23:04 UTC) #3
brianderson
> why on earth? Yeah, I wasn't thinking straight last night. Changing it as we ...
8 years, 3 months ago (2012-09-13 20:24:27 UTC) #4
nduca
Hehe sorry :)
8 years, 3 months ago (2012-09-13 20:29:54 UTC) #5
brianderson
This adds a metric to the texture upload benchmark to measure average commit time. It ...
8 years, 3 months ago (2012-09-14 04:09:56 UTC) #6
nduca
Is it easy to separate out the stats changes from the throttling changes?
8 years, 3 months ago (2012-09-14 05:24:53 UTC) #7
nduca
https://codereview.chromium.org/10916292/diff/8001/cc/CCTextureUpdateController.cpp File cc/CCTextureUpdateController.cpp (left): https://codereview.chromium.org/10916292/diff/8001/cc/CCTextureUpdateController.cpp#oldcode69 cc/CCTextureUpdateController.cpp:69: uploader->uploadTexture(resourceProvider, queue->takeFirstPartialUpload()); I think we should do partials all ...
8 years, 3 months ago (2012-09-14 05:50:26 UTC) #8
brianderson
https://codereview.chromium.org/10916292/diff/8001/cc/CCTextureUpdateController.cpp File cc/CCTextureUpdateController.cpp (left): https://codereview.chromium.org/10916292/diff/8001/cc/CCTextureUpdateController.cpp#oldcode69 cc/CCTextureUpdateController.cpp:69: uploader->uploadTexture(resourceProvider, queue->takeFirstPartialUpload()); Do you mean we should not upload ...
8 years, 3 months ago (2012-09-14 19:12:00 UTC) #9
brianderson
I removed the tests and will put them in a separate patch. Also addressed most ...
8 years, 3 months ago (2012-09-15 00:26:26 UTC) #10
reveman
https://codereview.chromium.org/10916292/diff/1016/cc/CCTextureUpdateController.cpp File cc/CCTextureUpdateController.cpp (right): https://codereview.chromium.org/10916292/diff/1016/cc/CCTextureUpdateController.cpp#newcode64 cc/CCTextureUpdateController.cpp:64: uploadMore = queue->fullUploadSize() && fullUploadCount < count; hm, I ...
8 years, 3 months ago (2012-09-15 17:26:19 UTC) #11
brianderson
https://codereview.chromium.org/10916292/diff/1016/cc/CCTextureUpdateController.cpp File cc/CCTextureUpdateController.cpp (right): https://codereview.chromium.org/10916292/diff/1016/cc/CCTextureUpdateController.cpp#newcode64 cc/CCTextureUpdateController.cpp:64: uploadMore = queue->fullUploadSize() && fullUploadCount < count; Sounds good. ...
8 years, 3 months ago (2012-09-17 22:48:27 UTC) #12
brianderson
https://codereview.chromium.org/10916292/diff/12015/cc/CCTextureUpdateController.cpp File cc/CCTextureUpdateController.cpp (right): https://codereview.chromium.org/10916292/diff/12015/cc/CCTextureUpdateController.cpp#newcode54 cc/CCTextureUpdateController.cpp:54: void CCTextureUpdateController::updateTextures(CCResourceProvider* resourceProvider, TextureCopier* copier, TextureUploader* uploader, CCTextureUpdateQueue* queue, ...
8 years, 3 months ago (2012-09-18 00:45:52 UTC) #13
brianderson
Latest patch doesn't vary the partial upload limit and pegs the partial upload limit at ...
8 years, 3 months ago (2012-09-18 02:55:16 UTC) #14
nduca
LGTM https://codereview.chromium.org/10916292/diff/24001/cc/CCTextureUpdateController.cpp File cc/CCTextureUpdateController.cpp (right): https://codereview.chromium.org/10916292/diff/24001/cc/CCTextureUpdateController.cpp#newcode21 cc/CCTextureUpdateController.cpp:21: static const size_t textureUpdatesPerFullTickMin = 12; i think ...
8 years, 3 months ago (2012-09-18 03:17:06 UTC) #15
reveman
I think this needs a bit more work. I created this https://codereview.chromium.org/10937007/ to removed throttling ...
8 years, 3 months ago (2012-09-18 05:30:35 UTC) #16
nduca
Why do you think this needs more work?
8 years, 3 months ago (2012-09-18 06:12:48 UTC) #17
reveman
On 2012/09/18 06:12:48, nduca wrote: > Why do you think this needs more work? I ...
8 years, 3 months ago (2012-09-18 06:36:38 UTC) #18
nduca
I'm fine if you can land your removals of partials. Looks like you're mostly done? ...
8 years, 3 months ago (2012-09-18 07:26:00 UTC) #19
reveman
On 2012/09/18 07:26:00, nduca wrote: > I'm fine if you can land your removals of ...
8 years, 3 months ago (2012-09-18 07:51:03 UTC) #20
brianderson
https://codereview.chromium.org/10916292/diff/24001/cc/CCTextureUpdateController.cpp File cc/CCTextureUpdateController.cpp (right): https://codereview.chromium.org/10916292/diff/24001/cc/CCTextureUpdateController.cpp#newcode18 cc/CCTextureUpdateController.cpp:18: static const size_t pixelsPerTexture = 256 * 256; On ...
8 years, 3 months ago (2012-09-18 20:03:00 UTC) #21
reveman
Awesome! LGTM with nits. https://codereview.chromium.org/10916292/diff/22004/cc/CCTextureUpdateController.cpp File cc/CCTextureUpdateController.cpp (right): https://codereview.chromium.org/10916292/diff/22004/cc/CCTextureUpdateController.cpp#newcode19 cc/CCTextureUpdateController.cpp:19: static const size_t maxPartialTextures = ...
8 years, 3 months ago (2012-09-18 20:34:18 UTC) #22
brianderson
https://codereview.chromium.org/10916292/diff/22004/cc/CCTextureUpdateController.cpp File cc/CCTextureUpdateController.cpp (right): https://codereview.chromium.org/10916292/diff/22004/cc/CCTextureUpdateController.cpp#newcode19 cc/CCTextureUpdateController.cpp:19: static const size_t maxPartialTextures = 12; Going with partialTextureUpdatesMax. ...
8 years, 3 months ago (2012-09-18 21:09:31 UTC) #23
jamesr
https://codereview.chromium.org/10916292/diff/22004/cc/CCTextureUpdateController.cpp File cc/CCTextureUpdateController.cpp (right): https://codereview.chromium.org/10916292/diff/22004/cc/CCTextureUpdateController.cpp#newcode43 cc/CCTextureUpdateController.cpp:43: return std::max(static_cast<size_t>(1), texturesPerTick); On 2012/09/18 21:09:31, Brian Anderson wrote: ...
8 years, 3 months ago (2012-09-18 21:13:00 UTC) #24
brianderson
https://codereview.chromium.org/10916292/diff/22004/cc/CCTextureUpdateController.cpp File cc/CCTextureUpdateController.cpp (right): https://codereview.chromium.org/10916292/diff/22004/cc/CCTextureUpdateController.cpp#newcode43 cc/CCTextureUpdateController.cpp:43: return std::max(static_cast<size_t>(1), texturesPerTick); On 2012/09/18 21:13:00, jamesr wrote: > ...
8 years, 3 months ago (2012-09-18 21:15:14 UTC) #25
brianderson
I'm having trouble getting try bots to run. The "Try More Bots" link result in ...
8 years, 3 months ago (2012-09-18 21:32:33 UTC) #26
jamesr
On 2012/09/18 21:32:33, Brian Anderson wrote: > I'm having trouble getting try bots to run. ...
8 years, 3 months ago (2012-09-18 21:35:31 UTC) #27
reveman
On 2012/09/18 21:35:31, jamesr wrote: > On 2012/09/18 21:32:33, Brian Anderson wrote: > > I'm ...
8 years, 3 months ago (2012-09-18 21:38:53 UTC) #28
Nat
Looks like the try server was just restartd? On Tue, Sep 18, 2012 at 2:35 ...
8 years, 3 months ago (2012-09-18 21:39:00 UTC) #29
brianderson
> For the authentication on the > command line, you want to use your svn ...
8 years, 3 months ago (2012-09-18 21:40:56 UTC) #30
brianderson
Can the following try bot errors be ignored? 1) A few failures are with "check_deps2submodules" ...
8 years, 3 months ago (2012-09-18 22:38:18 UTC) #31
jamesr
On 2012/09/18 22:38:18, Brian Anderson wrote: > Can the following try bot errors be ignored? ...
8 years, 3 months ago (2012-09-18 22:39:21 UTC) #32
nduca
Yeah looks ready to commit.
8 years, 3 months ago (2012-09-18 22:49:45 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/brianderson@chromium.org/10916292/24022
8 years, 3 months ago (2012-09-18 22:51:35 UTC) #34
commit-bot: I haz the power
8 years, 3 months ago (2012-09-19 01:51:22 UTC) #35
Change committed as 157473

Powered by Google App Engine
This is Rietveld 408576698