diff options
author | 2016-01-05 09:16:19 -0800 | |
---|---|---|
committer | 2016-01-05 09:16:19 -0800 | |
commit | 05dd251e5e135626d170b9e77eb64729bd482169 (patch) | |
tree | ff63aec98f170d46fd53ae03ac77803aba0ed73a /src/images/SkDecodingImageGenerator.cpp | |
parent | 20ccd40de96ca781dccf5690d215f3369e2a8182 (diff) |
take gr-context parameter to refEncoded, indicating a desire for only 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
Diffstat (limited to 'src/images/SkDecodingImageGenerator.cpp')
-rw-r--r-- | src/images/SkDecodingImageGenerator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/images/SkDecodingImageGenerator.cpp b/src/images/SkDecodingImageGenerator.cpp index 8cfacc3fba..8d55bd36c7 100644 --- a/src/images/SkDecodingImageGenerator.cpp +++ b/src/images/SkDecodingImageGenerator.cpp @@ -37,7 +37,7 @@ public: bool ditherImage); protected: - SkData* onRefEncodedData() override; + SkData* onRefEncodedData(SK_REFENCODEDDATA_CTXPARAM) override; bool onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes, SkPMColor ctable[], int* ctableCount) override; bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3], @@ -126,7 +126,7 @@ DecodingImageGenerator::~DecodingImageGenerator() { SkSafeUnref(fData); } -SkData* DecodingImageGenerator::onRefEncodedData() { +SkData* DecodingImageGenerator::onRefEncodedData(SK_REFENCODEDDATA_CTXPARAM) { // This functionality is used in `gm --serialize` // Does not encode options. if (nullptr == fData) { |