Chromium Code Reviews| Index: include/core/SkImageGenerator.h |
| diff --git a/include/core/SkImageGenerator.h b/include/core/SkImageGenerator.h |
| index 2967974c7845cb95cfb6c5b7f2e3b0815fde9f88..d8330a491f42a1991c5ce78caf40413328183be4 100644 |
| --- a/include/core/SkImageGenerator.h |
| +++ b/include/core/SkImageGenerator.h |
| @@ -122,6 +122,26 @@ public: |
| SkYUVColorSpace* colorSpace); |
| /** |
| + * If this generator supports returning planar YUV data, return true, and return |
| + * the logicalSizes (if not NULL) and the optimalAllocationSizes (if not NULL), where each |
| + * array represents [0]=Y, [1]=U, [2]=V |
| + * |
| + * The optimalAllocationSizes may be the same as the logicalSizes, but they may also be larger |
| + * if that will aid the generator (for performance). |
| + * |
| + * If this returns false, the value of the (optional) sizes parameters is undefined. |
|
sugoi1
2015/01/22 15:01:37
What if the decoder failed completely and the logi
reed1
2015/01/22 16:01:36
To get to the stage of being an imagegenerator at
scroggo
2015/01/27 18:35:49
In general, I would suggest that if it returns fal
reed1
2015/01/27 18:44:03
Agreed, will make that change.
|
| + */ |
| + bool queryYUV8(SkISize logicalSizes[3], SkISize optimalAllocationSizes[3]); |
| + |
| + /** |
| + * If this generator supports returning planar YUV data, and can fulfill the requested |
| + * sizes for each plane, return true and write the YUV data into the planes. |
| + * |
| + * If colorSpace is not NULL, return the corresponding colorSpace for the YUV data. |
| + */ |
| + bool getYUV8(const SkISize allocationSizes[3], void* planes[3], SkYUVColorSpace* colorSpace); |
| + |
| + /** |
| * If the default image decoder system can interpret the specified (encoded) data, then |
| * this returns a new ImageGenerator for it. Otherwise this returns NULL. Either way |
| * the caller is still responsible for managing their ownership of the data. |