Ejemplo n.º 1
0
DEF_TEST(ImageGenerator, reporter) {
    SkImageGenerator ig;
    SkISize sizes[3];
    sizes[0] = SkISize::Make(200, 200);
    sizes[1] = SkISize::Make(100, 100);
    sizes[2] = SkISize::Make( 50,  50);
    void*   planes[3] = { NULL };
    size_t  rowBytes[3] = { 0 };

    // Check that the YUV decoding API does not cause any crashes
    ig.getYUV8Planes(sizes, NULL, NULL);
    ig.getYUV8Planes(sizes, planes, NULL);
    ig.getYUV8Planes(sizes, NULL, rowBytes);
    ig.getYUV8Planes(sizes, planes, rowBytes);

    int dummy;
    planes[0] = planes[1] = planes[2] = &dummy;
    rowBytes[0] = rowBytes[1] = rowBytes[2] = 250;

    ig.getYUV8Planes(sizes, planes, rowBytes);
}
Ejemplo n.º 2
0
 bool onGetYUVSizes(SkISize sizes[3]) override {
     return fGen->getYUV8Planes(sizes, nullptr, nullptr, nullptr);
 }
Ejemplo n.º 3
0
 bool onGetYUVPlanes(SkISize sizes[3], void* planes[3], size_t rowBytes[3],
                     SkYUVColorSpace* space) override {
     return fGen->getYUV8Planes(sizes, planes, rowBytes, space);
 }
Ejemplo n.º 4
0
 bool onGetYUV8Planes(const SkYUVSizeInfo& sizeInfo, void* planes[3]) override {
     return fGen->getYUV8Planes(sizeInfo, planes);
 }