optimize the disable-caching case for SkImage::readPixels
authorreed <reed@google.com>
Tue, 24 Nov 2015 19:44:47 +0000 (11:44 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 24 Nov 2015 19:44:47 +0000 (11:44 -0800)
commit6868c3fccf65d297a64919a7cb74f09780c845c3
treec5b0a600040d811c6e7f149d883d03529c73304f
parentca3e2400af91b94bcb3663c0b18c6a95db7c6829
optimize the disable-caching case for SkImage::readPixels

If the client wants no caching, and we haven't already cached it, pass the
caller's dst-buffer directly down to the generator, avoiding the (previous)
extra memcpy.

BUG=skia:4594

Review URL: https://codereview.chromium.org/1473373002
gm/image.cpp
src/core/SkImageCacherator.cpp
src/core/SkImageCacherator.h
src/image/SkImage.cpp
src/image/SkImage_Generator.cpp