|
|
Chromium Code Reviews|
Created:
4 years, 8 months ago by Stephen White Modified:
4 years, 7 months ago Reviewers:
enne (OOO) CC:
blink-reviews, cc-bugs_chromium.org, chromium-reviews Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Descriptioncc: optimize filter backing store texture allocation.
The backing store used for filters in cc is determined by the
primitive bounds, and the filter outsets. This means that
we may end up allocating many textures of different sizes,
defeating Skia's texture cache. Texture allocation can be
slow, so we can ameliorate the allocation pressure by
rounding width and height up to the nearest power of 2.
(This is what Skia does internally for scratch textures).
BUG=602785
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Committed: https://crrev.com/d47a9ef38a0c81f0250e575f08fb47fb56fe1d66
Cr-Commit-Position: refs/heads/master@{#391753}
Patch Set 1 #Patch Set 2 : Update to ToT #Patch Set 3 : Reformat #Patch Set 4 : Update to ToT #Patch Set 5 : cleanup #
Total comments: 6
Patch Set 6 : ok, ok, i'll use floats #Patch Set 7 : New baselines for rotated filters tests #Patch Set 8 : win fix: futz with the fuzz #
Messages
Total messages: 39 (22 generated)
Description was changed from ========== cc: optimize texture allocation. BUG=602785 ========== to ========== cc: optimize texture allocation. BUG=602785 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel ==========
The CQ bit was checked by senorblanco@chromium.org
The CQ bit was unchecked by senorblanco@chromium.org
The CQ bit was checked by senorblanco@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1884553003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1884553003/1
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by senorblanco@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1884553003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1884553003/40001
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by senorblanco@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1884553003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1884553003/80001
Description was changed from ========== cc: optimize texture allocation. BUG=602785 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel ========== to ========== cc: optimize texture allocation. The backing store used for filters in cc is determined by the primitive bounds, and the filter outsets. This means that we may end up asking Skia to allocate many textures of different sizes, defeating Skia's texture cache. Texture allocation can be slow, so we can ameliorate the allocation pressure by rounding width and height up to the nearest power of 2. (This is what Skia does internally for scratch textures). BUG=602785 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel ==========
senorblanco@chromium.org changed reviewers: + enne@chromium.org
Description was changed from ========== cc: optimize texture allocation. The backing store used for filters in cc is determined by the primitive bounds, and the filter outsets. This means that we may end up asking Skia to allocate many textures of different sizes, defeating Skia's texture cache. Texture allocation can be slow, so we can ameliorate the allocation pressure by rounding width and height up to the nearest power of 2. (This is what Skia does internally for scratch textures). BUG=602785 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel ========== to ========== cc: optimize texture allocation. The backing store used for filters in cc is determined by the primitive bounds, and the filter outsets. This means that we may end up allocating many textures of different sizes, defeating Skia's texture cache. Texture allocation can be slow, so we can ameliorate the allocation pressure by rounding width and height up to the nearest power of 2. (This is what Skia does internally for scratch textures). BUG=602785 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel ==========
enne: PTAL. Thanks!
danakj@chromium.org changed reviewers: + danakj@chromium.org
https://codereview.chromium.org/1884553003/diff/80001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/1884553003/diff/80001/cc/output/gl_renderer.c... cc/output/gl_renderer.cc:145: int w, h; you're using ints here but it's a RectF.
https://codereview.chromium.org/1884553003/diff/80001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/1884553003/diff/80001/cc/output/gl_renderer.c... cc/output/gl_renderer.cc:145: int w, h; On 2016/05/04 21:24:58, danakj wrote: > you're using ints here but it's a RectF. Yep. There are implicit casts in the comparisons and the call to set_width() and set_height(), but the multiplies are faster. :)
enne@chromium.org changed reviewers: - danakj@chromium.org
https://codereview.chromium.org/1884553003/diff/80001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/1884553003/diff/80001/cc/output/gl_renderer.c... cc/output/gl_renderer.cc:146: for (w = 1; w < rect->width(); w *= 2) { If you're casting to ints here for performance, might as well go all the way and https://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2 instead of a loop. https://codereview.chromium.org/1884553003/diff/80001/cc/output/gl_renderer.c... cc/output/gl_renderer.cc:1045: // Expand dst_rect size to the nearest power of 2, in order to get Are there limits on the size that is supported here? Like, very big textures now becoming ~2-4 times as big?
Description was changed from ========== cc: optimize texture allocation. The backing store used for filters in cc is determined by the primitive bounds, and the filter outsets. This means that we may end up allocating many textures of different sizes, defeating Skia's texture cache. Texture allocation can be slow, so we can ameliorate the allocation pressure by rounding width and height up to the nearest power of 2. (This is what Skia does internally for scratch textures). BUG=602785 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel ========== to ========== cc: optimize filter backing store texture allocation. The backing store used for filters in cc is determined by the primitive bounds, and the filter outsets. This means that we may end up allocating many textures of different sizes, defeating Skia's texture cache. Texture allocation can be slow, so we can ameliorate the allocation pressure by rounding width and height up to the nearest power of 2. (This is what Skia does internally for scratch textures). BUG=602785 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel ==========
https://codereview.chromium.org/1884553003/diff/80001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/1884553003/diff/80001/cc/output/gl_renderer.c... cc/output/gl_renderer.cc:146: for (w = 1; w < rect->width(); w *= 2) { On 2016/05/04 21:32:22, enne wrote: > If you're casting to ints here for performance, might as well go all the way and > https://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2 instead of > a loop. Cute! I don't really care about performance here; I was just being annoying. I've changed them to floats for clarity. https://codereview.chromium.org/1884553003/diff/80001/cc/output/gl_renderer.c... cc/output/gl_renderer.cc:1045: // Expand dst_rect size to the nearest power of 2, in order to get On 2016/05/04 21:32:22, enne wrote: > Are there limits on the size that is supported here? Like, very big textures now > becoming ~2-4 times as big? If you mean, will the allocation fail due to an invalid texture dimension, I'm pretty sure all GL texture limits are a power of 2, so no. For overall size, these textures count against Skia's texture budget, so they may cause other scratch textures to be evicted or reused, but they shouldn't increase the VRAM footprint on balance. (Note that the internal textures allocated for filter processing in Skia are already rounded up the same way.)
lgtm
The CQ bit was checked by senorblanco@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from enne@chromium.org Link to the patchset: https://codereview.chromium.org/1884553003/#ps120001 (title: "New baselines for rotated filters tests")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1884553003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1884553003/120001
The CQ bit was checked by senorblanco@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from enne@chromium.org Link to the patchset: https://codereview.chromium.org/1884553003/#ps140001 (title: "win fix: futz with the fuzz")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1884553003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1884553003/140001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by senorblanco@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1884553003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1884553003/140001
Message was sent while issue was closed.
Description was changed from ========== cc: optimize filter backing store texture allocation. The backing store used for filters in cc is determined by the primitive bounds, and the filter outsets. This means that we may end up allocating many textures of different sizes, defeating Skia's texture cache. Texture allocation can be slow, so we can ameliorate the allocation pressure by rounding width and height up to the nearest power of 2. (This is what Skia does internally for scratch textures). BUG=602785 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel ========== to ========== cc: optimize filter backing store texture allocation. The backing store used for filters in cc is determined by the primitive bounds, and the filter outsets. This means that we may end up allocating many textures of different sizes, defeating Skia's texture cache. Texture allocation can be slow, so we can ameliorate the allocation pressure by rounding width and height up to the nearest power of 2. (This is what Skia does internally for scratch textures). BUG=602785 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel ==========
Message was sent while issue was closed.
Committed patchset #8 (id:140001)
Message was sent while issue was closed.
Description was changed from ========== cc: optimize filter backing store texture allocation. The backing store used for filters in cc is determined by the primitive bounds, and the filter outsets. This means that we may end up allocating many textures of different sizes, defeating Skia's texture cache. Texture allocation can be slow, so we can ameliorate the allocation pressure by rounding width and height up to the nearest power of 2. (This is what Skia does internally for scratch textures). BUG=602785 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel ========== to ========== cc: optimize filter backing store texture allocation. The backing store used for filters in cc is determined by the primitive bounds, and the filter outsets. This means that we may end up allocating many textures of different sizes, defeating Skia's texture cache. Texture allocation can be slow, so we can ameliorate the allocation pressure by rounding width and height up to the nearest power of 2. (This is what Skia does internally for scratch textures). BUG=602785 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/d47a9ef38a0c81f0250e575f08fb47fb56fe1d66 Cr-Commit-Position: refs/heads/master@{#391753} ==========
Message was sent while issue was closed.
Patchset 8 (id:??) landed as https://crrev.com/d47a9ef38a0c81f0250e575f08fb47fb56fe1d66 Cr-Commit-Position: refs/heads/master@{#391753} |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
