|
|
Created:
5 years ago by Noel Gordon Modified:
5 years ago CC:
chromium-reviews, pdr+graphicswatchlist_chromium.org, drott+blinkwatch_chromium.org, Rik, blink-reviews-platform-graphics_chromium.org, dshwang, jbroman, Justin Novosad, danakj, krit, f(malita), blink-reviews, vmpstr+blinkwatch_chromium.org, Stephen Chennney, rwlbuis Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionDeferredImageDecoder: early-out onGetYUV8Planes when possible
Ganesh rendering will query onGetYUV8Planes when rendering GIF frames,
and other image formats, that do not support YUV image decoding.
Since the type of image decoded is known when a DecodingImageGenerator
is created, store that type in DecodingImageGenerator, and use that to
early-out requests for YUV decoding to avoid wasting time.
ImageFrameGenerator::getYUVComponentSizes no longer needs to check for
"jpg" since it is now done earlier in DecodingImageGenerator (it knows
if the image frame format supports YUV decoding via m_canYUVDecode).
No change in behavior, no new tests.
BUG=566885, 476531
Committed: https://crrev.com/ce2af8863f0214f7327a68f74a5d4e42d4c031c0
Cr-Commit-Position: refs/heads/master@{#363727}
Patch Set 1 #
Total comments: 1
Patch Set 2 : Fix canYUVDecode enable logic #
Total comments: 4
Patch Set 3 : Patch for landing #
Total comments: 2
Messages
Total messages: 33 (20 generated)
Description was changed from ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, or other formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since that now is done when creating a DecodingImageGenerator. No change in behaviour, no new tests. BUG=566885, 476531 ========== to ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, or other formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since that is now done when creating a DecodingImageGenerator. No change in behaviour, no new tests. BUG=566885, 476531 ==========
noel@chromium.org changed reviewers: + scroggo@chromium.org
Description was changed from ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, or other formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since that is now done when creating a DecodingImageGenerator. No change in behaviour, no new tests. BUG=566885, 476531 ========== to ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, or other formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since that is now done when creating a DecodingImageGenerator. No change in behavior, no new tests. BUG=566885, 476531 ==========
Description was changed from ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, or other formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since that is now done when creating a DecodingImageGenerator. No change in behavior, no new tests. BUG=566885, 476531 ========== to ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, or other formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it's now done when creating a DecodingImageGenerator. No change in behavior, no new tests. BUG=566885, 476531 ==========
Description was changed from ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, or other formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it's now done when creating a DecodingImageGenerator. No change in behavior, no new tests. BUG=566885, 476531 ========== to ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done when creating a DecodingImageGenerator. No change in behavior, no new tests. BUG=566885, 476531 ==========
PTAL.
https://codereview.chromium.org/1508683002/diff/1/third_party/WebKit/Source/p... File third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp (right): https://codereview.chromium.org/1508683002/diff/1/third_party/WebKit/Source/p... third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp:223: m_canYUVDecode = !RuntimeEnabledFeatures::decodeToYUVEnabled() || (m_filenameExtension == "jpg"); Clearly, need to fix that.
On 2015/12/07 13:03:52, noel gordon wrote: > Clearly, need to fix that. Fixed in patch set #2.
https://codereview.chromium.org/1508683002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h (right): https://codereview.chromium.org/1508683002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h:55: static SkImageGenerator* create(SkData*); // Highly unsual access. unusual* Is the goal of this comment to say something like "do not use unless you know what you're doing?". "Highly unusual access" just seems like a description (which may cease to be true, unless we enforce it through code review). Should we discourage using it though? Is there a problem with it? https://codereview.chromium.org/1508683002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp (right): https://codereview.chromium.org/1508683002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp:285: generator->setCanYUVDecode(m_canYUVDecode); Can we instead set this in DecodingImageGenerator's constructor? Then we can make its m_canYUVDecode const and take away the setter (it only appears to be called at creation time).
On 2015/12/07 16:40:02, scroggo_chromium wrote: > https://codereview.chromium.org/1508683002/diff/20001/third_party/WebKit/Sour... > File third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h > (right): > > https://codereview.chromium.org/1508683002/diff/20001/third_party/WebKit/Sour... > third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h:55: static > SkImageGenerator* create(SkData*); // Highly unsual access. > unusual* > > Is the goal of this comment to say something like "do not use unless you know > what you're doing?". "Highly unusual access" just seems like a description > (which may cease to be true, unless we enforce it through code review). > > Should we discourage using it though? Is there a problem with it? > > https://codereview.chromium.org/1508683002/diff/20001/third_party/WebKit/Sour... > File third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp > (right): > > https://codereview.chromium.org/1508683002/diff/20001/third_party/WebKit/Sour... > third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp:285: > generator->setCanYUVDecode(m_canYUVDecode); > Can we instead set this in DecodingImageGenerator's constructor? Then we can > make its m_canYUVDecode const and take away the setter (it only appears to be > called at creation time). lgtm - not trying to hold this up, and we work in different timezones
https://codereview.chromium.org/1508683002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h (right): https://codereview.chromium.org/1508683002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h:55: static SkImageGenerator* create(SkData*); // Highly unsual access. On 2015/12/07 16:40:02, scroggo_chromium wrote: > unusual* > > Is the goal of this comment to say something like "do not use unless you know > what you're doing?". "Highly unusual access" just seems like a description > (which may cease to be true, unless we enforce it through code review). The goal was just to point it out, to you, since it might have implications for your work. > Should we discourage using it though? Is there a problem with it? I'm not really sure why this API exists, but if you follow the code paths you might find out why, and whether it has any implications for your work. Done pointing it out, so I will remove this part of the change, to make git blame easier for later investigations about the purpose of the unusual API. https://codereview.chromium.org/1508683002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp (right): https://codereview.chromium.org/1508683002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp:285: generator->setCanYUVDecode(m_canYUVDecode); On 2015/12/07 16:40:02, scroggo_chromium wrote: > Can we instead set this in DecodingImageGenerator's constructor? Then we can > make its m_canYUVDecode const and take away the setter (it only appears to be > called at creation time). Yeah possible, though I noted the setup / construction / ownership of this generator-and-image-combo here is all a bit fraught (complicated). I settled on having a setCanYUVDecode setter here to try and make the whole thing a little clearer to me; dunno if I succeeded.
https://codereview.chromium.org/1508683002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp (left): https://codereview.chromium.org/1508683002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp:78: return false; Tried to correct this comment for what blink::ImageFrame actually does. Even given the comment, it is a confusing one: the code returns false here! I suppose the system is not broken, but I'm not really sure what this comment is trying to say.
The CQ bit was checked by noel@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from scroggo@chromium.org Link to the patchset: https://codereview.chromium.org/1508683002/#ps40001 (title: "Patch for landing")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1508683002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1508683002/40001
Description was changed from ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done when creating a DecodingImageGenerator. No change in behavior, no new tests. BUG=566885, 476531 ========== to ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done when creating a DecodingImageGenerator. No change in behavior, no new tests. BUG=566885, 476531 ==========
Description was changed from ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done when creating a DecodingImageGenerator. No change in behavior, no new tests. BUG=566885, 476531 ========== to ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator. No change in behavior, no new tests. BUG=566885, 476531 ==========
Message was sent while issue was closed.
Description was changed from ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator. No change in behavior, no new tests. BUG=566885, 476531 ========== to ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator. No change in behavior, no new tests. BUG=566885, 476531 ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator. No change in behavior, no new tests. BUG=566885, 476531 ========== to ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator. No change in behavior, no new tests. BUG=566885, 476531 Committed: https://crrev.com/ce2af8863f0214f7327a68f74a5d4e42d4c031c0 Cr-Commit-Position: refs/heads/master@{#363727} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/ce2af8863f0214f7327a68f74a5d4e42d4c031c0 Cr-Commit-Position: refs/heads/master@{#363727}
Message was sent while issue was closed.
Description was changed from ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator. No change in behavior, no new tests. BUG=566885, 476531 Committed: https://crrev.com/ce2af8863f0214f7327a68f74a5d4e42d4c031c0 Cr-Commit-Position: refs/heads/master@{#363727} ========== to ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator, allowing and early-out if YUV decoding of an unsupported format is requested. No change in behavior, no new tests. BUG=566885, 476531 Committed: https://crrev.com/ce2af8863f0214f7327a68f74a5d4e42d4c031c0 Cr-Commit-Position: refs/heads/master@{#363727} ==========
Message was sent while issue was closed.
Description was changed from ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator, allowing and early-out if YUV decoding of an unsupported format is requested. No change in behavior, no new tests. BUG=566885, 476531 Committed: https://crrev.com/ce2af8863f0214f7327a68f74a5d4e42d4c031c0 Cr-Commit-Position: refs/heads/master@{#363727} ========== to ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator, allowing an early-out if YUV decoding of an unsupported format is requested. No change in behavior, no new tests. BUG=566885, 476531 Committed: https://crrev.com/ce2af8863f0214f7327a68f74a5d4e42d4c031c0 Cr-Commit-Position: refs/heads/master@{#363727} ==========
Message was sent while issue was closed.
Description was changed from ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator, allowing an early-out if YUV decoding of an unsupported format is requested. No change in behavior, no new tests. BUG=566885, 476531 Committed: https://crrev.com/ce2af8863f0214f7327a68f74a5d4e42d4c031c0 Cr-Commit-Position: refs/heads/master@{#363727} ========== to ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator, allowing the early-out of YUV decoding requests on unsupported formats. No change in behavior, no new tests. BUG=566885, 476531 Committed: https://crrev.com/ce2af8863f0214f7327a68f74a5d4e42d4c031c0 Cr-Commit-Position: refs/heads/master@{#363727} ==========
Message was sent while issue was closed.
Description was changed from ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator, allowing the early-out of YUV decoding requests on unsupported formats. No change in behavior, no new tests. BUG=566885, 476531 Committed: https://crrev.com/ce2af8863f0214f7327a68f74a5d4e42d4c031c0 Cr-Commit-Position: refs/heads/master@{#363727} ========== to ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator. No change in behavior, no new tests. BUG=566885, 476531 Committed: https://crrev.com/ce2af8863f0214f7327a68f74a5d4e42d4c031c0 Cr-Commit-Position: refs/heads/master@{#363727} ==========
Message was sent while issue was closed.
Description was changed from ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator. No change in behavior, no new tests. BUG=566885, 476531 Committed: https://crrev.com/ce2af8863f0214f7327a68f74a5d4e42d4c031c0 Cr-Commit-Position: refs/heads/master@{#363727} ========== to ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator: it knows if the format supports YUV decoding or not and can early-out. No change in behavior, no new tests. BUG=566885, 476531 Committed: https://crrev.com/ce2af8863f0214f7327a68f74a5d4e42d4c031c0 Cr-Commit-Position: refs/heads/master@{#363727} ==========
Message was sent while issue was closed.
Description was changed from ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator: it knows if the format supports YUV decoding or not and can early-out. No change in behavior, no new tests. BUG=566885, 476531 Committed: https://crrev.com/ce2af8863f0214f7327a68f74a5d4e42d4c031c0 Cr-Commit-Position: refs/heads/master@{#363727} ========== to ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator: it knows if the image format supports YUV decoding or not and can early-out. No change in behavior, no new tests. BUG=566885, 476531 Committed: https://crrev.com/ce2af8863f0214f7327a68f74a5d4e42d4c031c0 Cr-Commit-Position: refs/heads/master@{#363727} ==========
Message was sent while issue was closed.
Description was changed from ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator: it knows if the image format supports YUV decoding or not and can early-out. No change in behavior, no new tests. BUG=566885, 476531 Committed: https://crrev.com/ce2af8863f0214f7327a68f74a5d4e42d4c031c0 Cr-Commit-Position: refs/heads/master@{#363727} ========== to ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator (it knows if the image frame format supports YUV decoding). No change in behavior, no new tests. BUG=566885, 476531 Committed: https://crrev.com/ce2af8863f0214f7327a68f74a5d4e42d4c031c0 Cr-Commit-Position: refs/heads/master@{#363727} ==========
Message was sent while issue was closed.
Description was changed from ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator (it knows if the image frame format supports YUV decoding). No change in behavior, no new tests. BUG=566885, 476531 Committed: https://crrev.com/ce2af8863f0214f7327a68f74a5d4e42d4c031c0 Cr-Commit-Position: refs/heads/master@{#363727} ========== to ========== DeferredImageDecoder: early-out onGetYUV8Planes when possible Ganesh rendering will query onGetYUV8Planes when rendering GIF frames, and other image formats, that do not support YUV image decoding. Since the type of image decoded is known when a DecodingImageGenerator is created, store that type in DecodingImageGenerator, and use that to early-out requests for YUV decoding to avoid wasting time. ImageFrameGenerator::getYUVComponentSizes no longer needs to check for "jpg" since it is now done earlier in DecodingImageGenerator (it knows if the image frame format supports YUV decoding via m_canYUVDecode). No change in behavior, no new tests. BUG=566885, 476531 Committed: https://crrev.com/ce2af8863f0214f7327a68f74a5d4e42d4c031c0 Cr-Commit-Position: refs/heads/master@{#363727} ==========
Message was sent while issue was closed.
scroggo@google.com changed reviewers: + scroggo@google.com
Message was sent while issue was closed.
https://codereview.chromium.org/1508683002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp (left): https://codereview.chromium.org/1508683002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp:78: return false; On 2015/12/08 01:48:10, noel gordon wrote: > Tried to correct this comment for what blink::ImageFrame actually does. > > Even given the comment, it is a confusing one: the code returns false here! I > suppose the system is not broken, but I'm not really sure what this comment is > trying to say. It's trying to explain why we check that the color type matches (and return false if it does not), but we do not check for the alpha type (so the alpha type may not match).
Message was sent while issue was closed.
Ah right. I looked-up SkImageInfo and now see that color- & alpha-type are different things. Makes sense.
Message was sent while issue was closed.
I think the issue for me was the comment placement. Code compares color-type, comment talks about alpha-type! |