aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports/SkImageGenerator_skia.cpp
Commit message (Collapse)AuthorAge
* return and take SkImageGenerator as unique_ptrGravatar Mike Reed2017-02-15
| | | | | | | | | | BUG=skia: Change-Id: I4bc11042dd1dbf1eabd40af206027bc65acc3186 Reviewed-on: https://skia-review.googlesource.com/8444 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Make SkPicture/SkImageGenerator default to SkCodecGravatar msarett2016-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove reference to SkImageDecoder from SkPicture. Make the default InstallPixelRefProc passed to CreateFromStream use SkImageGenerator::NewFromEncoded instead. Make SkImageGenerator::NewFromEncoded create an SkCodecImageGenerator. Remove the old version that used SkImageDecoder. Remove all versions of lazy_decode_bitmap/LazyDecodeBitmap. The default now behaves lazily. Update all clients to use the default. Move SkImageDecoderGenerator into KtxTest.cpp, and use it directly. This is a rebased version of: https://codereview.chromium.org/1671193002/ TBR=reed@google.com BUG=skia:4691 BUG=skia:4290 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1699183004 Review URL: https://codereview.chromium.org/1699183004
* Revert of Make SkPicture/SkImageGenerator default to SkCodec (patchset #7 ↵Gravatar kjlubick2016-02-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:120001 of https://codereview.chromium.org/1671193002/ ) Reason for revert: Breaks Ubuntu and Mac CMAKE Original issue's description: > Make SkPicture/SkImageGenerator default to SkCodec > > Remove reference to SkImageDecoder from SkPicture. Make the default > InstallPixelRefProc passed to CreateFromStream use > SkImageGenerator::NewFromEncoded instead. > > Make SkImageGenerator::NewFromEncoded create an SkCodecImageGenerator. > Remove the old version that used SkImageDecoder. > > Remove all versions of lazy_decode_bitmap/LazyDecodeBitmap. The default > now behaves lazily. > > Update all clients to use the default. > > Move SkImageDecoderGenerator into KtxTest.cpp, and use it directly. > > BUG=skia:4691 > BUG=skia:4290 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1671193002 > > Committed: https://skia.googlesource.com/skia/+/026388a01864c74208ad57d1ba4f711602d101c6 TBR=msarett@google.com,reed@google.com,scroggo@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4691 Review URL: https://codereview.chromium.org/1685963004
* Make SkPicture/SkImageGenerator default to SkCodecGravatar scroggo2016-02-10
| | | | | | | | | | | | | | | | | | | | | | Remove reference to SkImageDecoder from SkPicture. Make the default InstallPixelRefProc passed to CreateFromStream use SkImageGenerator::NewFromEncoded instead. Make SkImageGenerator::NewFromEncoded create an SkCodecImageGenerator. Remove the old version that used SkImageDecoder. Remove all versions of lazy_decode_bitmap/LazyDecodeBitmap. The default now behaves lazily. Update all clients to use the default. Move SkImageDecoderGenerator into KtxTest.cpp, and use it directly. BUG=skia:4691 BUG=skia:4290 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1671193002 Review URL: https://codereview.chromium.org/1671193002
* take gr-context parameter to refEncoded, indicating a desire for only ↵Gravatar reed2016-01-05
| | | | | | | | | | | | | | | gpu-specific formats Prime motivator: - we always call refEncoded on the generator when trying to upload - we call it *before* we ask for raster or YUV - for blink, this call can be very slow, as they have to cons-up their SkData the first time (and grab a mutex to do it) - this parameter will indicate to them that we're only interested in gpu formats, which they will know if they have. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1556333004 Review URL: https://codereview.chromium.org/1556333004
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Style Change: SkNEW->new; SkDELETE->deleteGravatar halcanary2015-08-26
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316123003 Review URL: https://codereview.chromium.org/1316123003
* Remove SK_LEGACY_IMAGE_GENERATOR_ENUMS_AND_OPTIONSGravatar scroggo2015-07-30
| | | | | | Now that Chrome no longer depends on it, remove dead code. Review URL: https://codereview.chromium.org/1263013002
* add runtime option to provide data->imagegenerator factoryGravatar reed2015-07-09
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1229933003
* Remove SkImageGenerator pieces only for SkCodec.Gravatar scroggo2015-07-09
| | | | | | | | | | | Follow up to the split between SkImageGenerator and SkCodec. Now that SkCodec does not inherit from SkImageGenerator, SkImageGenerator no longer needs Options or Result, which were added for SkCodec. Remove them, but keep them behind a flag, since Chromium has its own subclasses of SkImageGenerator which assume the old signature for onGetPixels. Review URL: https://codereview.chromium.org/1226023003
* remove dead code behind BOOL_ONGETINFOGravatar reed2015-05-05
| | | | | | | | | need this to land in chrome first https://codereview.chromium.org/1125573002 BUG=skia: TBR= Review URL: https://codereview.chromium.org/1123473004
* C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}Gravatar mtklein2015-03-25
| | | | | | | | | NOPRESUBMIT=true BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=1037793002 Review URL: https://codereview.chromium.org/1037793002
* guarded change to SkImageGenerator to make getInfo() constGravatar reed2015-03-19
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1017293002
* Option for SkCodec to treat dst as all zeroes.Gravatar scroggo2015-03-17
| | | | | | | This recreates SkImageDecoder's feature to skip writing zeroes for SkCodec. Review URL: https://codereview.chromium.org/980903002
* Rename onGetPixelsEnum back to onGetPixels.Gravatar scroggo2015-02-19
| | | | | | | | | | | | | | | | Replace the old signature of onGetPixels (return bool) to return an enum (Result). Remove onGetPixelsEnum. Add a define for onGetPixelsEnum to onGetPixels. This is for staging in Chromium, where some implementations override onGetPixelsEnum. Add the define in skia_for_chromium_defines. Remove SK_SUPPORT_LEGACY_IMAGE_GENERATOR_RETURN, which is no longer needed by Chromium. BUG=skia:3257 Review URL: https://codereview.chromium.org/939113002
* Make SkImageGenerator::getPixels() return an enum.Gravatar scroggo2015-02-13
| | | | | | | | | | | | | | | | | | | | | | The new enum describes the nature of the failure. This is in preparation for writing a replacement for SkImageDecoder, which will use this interface. Update the comments for getPixels() to specify what it means to pass an SkImageInfo with a different size. Make SkImageGenerator Noncopyable. Leave onGetYUV8Planes alone, since we have separate discussions regarding modifying that API. Make callers of SkImageDecoder consistently handle kPartialSuccess. Previously, some callers considered it a failure, and others considered it a success. BUG=skia:3257 Review URL: https://codereview.chromium.org/919693002
* Add missing SK_OVERRIDEGravatar rmistry2015-02-02
| | | | | | | | | | Tested by running on clang head + ubuntu 14.04: GYP_DEFINES=”skia_gpu=0 skia_warnings_as_errors=1" tools/xsan_build thread dm BUILDTYPE=Release out/Release/dm -v BUG=skia:3386 Review URL: https://codereview.chromium.org/894833002
* add ImageGenerator::NewFromData to porting layerGravatar reed2015-01-07
BUG=skia:3275 Review URL: https://codereview.chromium.org/834633006