| <!DOCTYPE html> |
| |
| <html lang="en" xmlns="https://www.w3.org/1999/xhtml"> |
| <head> |
| <meta charset="utf-8" /> |
| <title></title> |
| |
| <script type="text/javascript"> |
| var text = { |
| "Path_Conic_Weight": { |
| "code": "void draw(SkCanvas* canvas) {\n const char* verbNames[] = { \"move\", \"line\", \"quad\", \"conic\", \"cubic\", \"close\", \"done\" };\n const int pointCount[] = { 1 , 2 , 3 , 3 , 4 , 1 , 0 };\n SkPath path;\n path.conicTo(20, 30, 50, 60, 1);\n SkPath::Iter iter(path, false);\n SkPath::Verb verb;\n do {\n SkPoint points[4];\n verb = iter.next(points);\n SkDebugf(\"%s \", verbNames[(int) verb]);\n for (int i = 0; i < pointCount[(int) verb]; ++i) {\n SkDebugf(\"{%g, %g}, \", points[i].fX, points[i].fY);\n }\n if (SkPath::kConic_Verb == verb) {\n SkDebugf(\"weight = %g\", iter.conicWeight());\n }\n SkDebugf(\"\\n\");\n } while (SkPath::kDone_Verb != verb);\n}\n", |
| "hash": "2aadded3d20dfef34d1c8abe28c7bc8d", |
| "file": "SkPath_Reference", |
| "name": "Conic_Weight", |
| "stdout": "move {0, 0}, \\nquad {0, 0}, {20, 30}, {50, 60}, \\ndone \\n" |
| }, |
| "Path_Conic_Weight_a": { |
| "code": "void draw(SkCanvas* canvas) {\n const char* verbNames[] = { \"move\", \"line\", \"quad\", \"conic\", \"cubic\", \"close\", \"done\" };\n const int pointCount[] = { 1 , 2 , 3 , 3 , 4 , 1 , 0 };\n SkPath path;\n path.arcTo(20, 0, 20, 20, 20);\n SkPath::Iter iter(path, false);\n SkPath::Verb verb;\n do {\n SkPoint points[4];\n verb = iter.next(points);\n SkDebugf(\"%s \", verbNames[(int) verb]);\n for (int i = 0; i < pointCount[(int) verb]; ++i) {\n SkDebugf(\"{%g, %g}, \", points[i].fX, points[i].fY);\n }\n if (SkPath::kConic_Verb == verb) {\n SkDebugf(\"weight = %g\", iter.conicWeight());\n }\n SkDebugf(\"\\n\");\n } while (SkPath::kDone_Verb != verb);\n}\n", |
| "hash": "e88f554efacfa9f75f270fb1c0add5b4", |
| "file": "SkPath_Reference", |
| "name": "Conic_Weight_2", |
| "stdout": "move {0, 0}, \\nconic {0, 0}, {20, 0}, {20, 20}, weight = 0.707107\\ndone \\n" |
| }, |
| "Path_Conic_Weight_b": { |
| "code": "void draw(SkCanvas* canvas) {\n const char* verbNames[] = { \"move\", \"line\", \"quad\", \"conic\", \"cubic\", \"close\", \"done\" };\n const int pointCount[] = { 1 , 2 , 3 , 3 , 4 , 1 , 0 };\n SkPath path;\n path.conicTo(20, 0, 20, 20, SK_ScalarInfinity);\n SkPath::Iter iter(path, false);\n SkPath::Verb verb;\n do {\n SkPoint points[4];\n verb = iter.next(points);\n SkDebugf(\"%s \", verbNames[(int) verb]);\n for (int i = 0; i < pointCount[(int) verb]; ++i) {\n SkDebugf(\"{%g, %g}, \", points[i].fX, points[i].fY);\n }\n if (SkPath::kConic_Verb == verb) {\n SkDebugf(\"weight = %g\", iter.conicWeight());\n }\n SkDebugf(\"\\n\");\n } while (SkPath::kDone_Verb != verb);\n}\n", |
| "hash": "6fb11419e99297fe2fe666c296117fb9", |
| "file": "SkPath_Reference", |
| "name": "Conic_Weight_3", |
| "stdout": "move {0, 0}, \\nline {0, 0}, {20, 0}, \\nline {20, 0}, {20, 20}, \\ndone \\n" |
| }, |
| "SkAutoCanvasRestore_restore": { |
| "code": "void draw(SkCanvas* canvas) {\n for (bool callRestore : { false, true } ) {\n for (bool saveCanvas : {false, true} ) {\n SkAutoCanvasRestore autoRestore(canvas, saveCanvas);\n if (!saveCanvas) {\n canvas->save();\n }\n SkDebugf(\"saveCanvas: %s before restore: %d\\n\",\n saveCanvas ? \"true\" : \"false\", canvas->getSaveCount());\n if (callRestore) autoRestore.restore();\n SkDebugf(\"saveCanvas: %s after restore: %d\\n\",\n saveCanvas ? \"true\" : \"false\", canvas->getSaveCount());\n }\n }\n SkDebugf(\"final count: %d\\n\", canvas->getSaveCount());\n}", |
| "hash": "9f459b218ec079c1ada23f4412968f9a", |
| "file": "SkAutoCanvasRestore_Reference", |
| "name": "SkAutoCanvasRestore::restore()", |
| "stdout": "saveCanvas: false before restore: 2\\nsaveCanvas: false after restore: 2\\nsaveCanvas: true before restore: 2\\nsaveCanvas: true after restore: 2\\nsaveCanvas: false before restore: 2\\nsaveCanvas: false after restore: 1\\nsaveCanvas: true before restore: 2\\nsaveCanvas: true after restore: 1\\nfinal count: 1\\n" |
| }, |
| "SkBitmap_ComputeIsOpaque": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap;\n bitmap.setInfo(SkImageInfo::Make(2, 2, kN32_SkColorType, kPremul_SkAlphaType));\n for (int index = 0; index < 2; ++index) {\n bitmap.allocPixels();\n bitmap.eraseColor(0x00000000);\n SkDebugf(\"computeIsOpaque: %s\\n\", SkBitmap::ComputeIsOpaque(bitmap) ? \"true\" : \"false\");\n bitmap.eraseColor(0xFFFFFFFF);\n SkDebugf(\"computeIsOpaque: %s\\n\", SkBitmap::ComputeIsOpaque(bitmap) ? \"true\" : \"false\");\n bitmap.setInfo(bitmap.info().makeAlphaType(kOpaque_SkAlphaType));\n }\n}", |
| "hash": "9df1baa17658fbd0c419780f26fd854f", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::ComputeIsOpaque", |
| "stdout": "computeIsOpaque: false\\ncomputeIsOpaque: true\\ncomputeIsOpaque: false\\ncomputeIsOpaque: true\\n" |
| }, |
| "SkBitmap_HeapAllocator_allocPixelRef": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap;\n bitmap.setInfo(SkImageInfo::MakeN32(16, 16, kPremul_SkAlphaType));\n SkDebugf(\"pixel address = %p\\n\", bitmap.getPixels());\n SkBitmap::HeapAllocator stdalloc;\n if (!stdalloc.allocPixelRef(&bitmap)) {\n SkDebugf(\"pixel allocation failed\\n\");\n } else {\n SkDebugf(\"pixel address = %p\\n\", bitmap.getPixels());\n }\n}", |
| "hash": "fe79a9c1ec350264eb9c7b2509dd3638", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::HeapAllocator::allocPixelRef", |
| "stdout": "pixel address = (nil)\\npixel address = 0x560ddd0ac670\\n\\n" |
| }, |
| "SkBitmap_alphaType": { |
| "code": "void draw(SkCanvas* canvas) {\n const char* alphas[] = {\"Unknown\", \"Opaque\", \"Premul\", \"Unpremul\"};\n SkPixmap pixmap(SkImageInfo::MakeA8(16, 32), nullptr, 64);\n SkDebugf(\"alpha type: k\" \"%s\" \"_SkAlphaType\\n\", alphas[pixmap.alphaType()]);\n}", |
| "hash": "070b1a60232be499eb10c6ea62371804", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::alphaType", |
| "stdout": "alpha type: kPremul_SkAlphaType\\n" |
| }, |
| "SkBitmap_bytesPerPixel": { |
| "code": "void draw(SkCanvas* canvas) {\n const char* colors[] = {\"Unknown\", \"Alpha_8\", \"RGB_565\", \"ARGB_4444\", \"RGBA_8888\", \"RGB_888x\",\n \"BGRA_8888\", \"RGBA_1010102\", \"RGB_101010x\", \"Gray_8\", \"RGBA_F16\"};\n SkImageInfo info = SkImageInfo::MakeA8(1, 1);\n SkBitmap bitmap;\n for (SkColorType colorType : {\n kUnknown_SkColorType, kAlpha_8_SkColorType, kRGB_565_SkColorType,\n kARGB_4444_SkColorType, kRGBA_8888_SkColorType, kRGB_888x_SkColorType,\n kBGRA_8888_SkColorType, kRGBA_1010102_SkColorType, kRGB_101010x_SkColorType,\n kGray_8_SkColorType, kRGBA_F16_SkColorType\n } ) {\n bitmap.setInfo(info.makeColorType(colorType));\n SkDebugf(\"color: k\" \"%s\" \"_SkColorType\" \"%*s\" \"bytesPerPixel: %d\\n\",\n colors[colorType], 13 - strlen(colors[colorType]), \" \",\n bitmap.bytesPerPixel());\n }\n}", |
| "hash": "2a688e6f0a516c0d44a826381e9d637f", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::bytesPerPixel", |
| "stdout": "color: kUnknown_SkColorType bytesPerPixel: 0\\ncolor: kAlpha_8_SkColorType bytesPerPixel: 1\\ncolor: kRGB_565_SkColorType bytesPerPixel: 2\\ncolor: kARGB_4444_SkColorType bytesPerPixel: 2\\ncolor: kRGBA_8888_SkColorType bytesPerPixel: 4\\ncolor: kRGB_888x_SkColorType bytesPerPixel: 4\\ncolor: kBGRA_8888_SkColorType bytesPerPixel: 4\\ncolor: kRGBA_1010102_SkColorType bytesPerPixel: 4\\ncolor: kRGB_101010x_SkColorType bytesPerPixel: 4\\ncolor: kGray_8_SkColorType bytesPerPixel: 1\\ncolor: kRGBA_F16_SkColorType bytesPerPixel: 8\\n" |
| }, |
| "SkBitmap_colorSpace": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap;\n bitmap.setInfo(SkImageInfo::MakeN32(16, 32, kPremul_SkAlphaType,\n SkColorSpace::MakeSRGBLinear()));\n SkColorSpace* colorSpace = bitmap.colorSpace();\n SkDebugf(\"gammaCloseToSRGB: %s gammaIsLinear: %s isSRGB: %s\\n\",\n colorSpace->gammaCloseToSRGB() ? \"true\" : \"false\",\n colorSpace->gammaIsLinear() ? \"true\" : \"false\",\n colorSpace->isSRGB() ? \"true\" : \"false\");\n}", |
| "hash": "817f95879fadba44baf87ea60e9b595a", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::colorSpace", |
| "stdout": "gammaCloseToSRGB: false gammaIsLinear: true isSRGB: false\\n" |
| }, |
| "SkBitmap_colorType": { |
| "code": "void draw(SkCanvas* canvas) {\n const char* colors[] = {\"Unknown\", \"Alpha_8\", \"RGB_565\", \"ARGB_4444\", \"RGBA_8888\", \"RGB_888x\",\n \"BGRA_8888\", \"RGBA_1010102\", \"RGB_101010x\", \"Gray_8\", \"RGBA_F16\"};\n SkBitmap bitmap;\n bitmap.setInfo(SkImageInfo::MakeA8(16, 32));\n SkDebugf(\"color type: k\" \"%s\" \"_SkColorType\\n\", colors[bitmap.colorType()]);\n}", |
| "hash": "ceb77fab7326b57822a147b04aa0960e", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::colorType", |
| "stdout": "color type: kAlpha_8_SkColorType\\n" |
| }, |
| "SkBitmap_computeByteSize": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap;\n for (int width : { 1, 1000, 1000000 } ) {\n for (int height: { 1, 1000, 1000000 } ) {\n SkImageInfo imageInfo = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);\n bitmap.setInfo(imageInfo, width * 5);\n SkDebugf(\"width: %7d height: %7d computeByteSize: %13lld\\n\", width, height,\n bitmap.computeByteSize());\n }\n }\n}", |
| "hash": "165c8f208829fc0908e8a50da60c0076", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::computeByteSize", |
| "stdout": "width: 1 height: 1 computeByteSize: 4\\nwidth: 1 height: 1000 computeByteSize: 4999\\nwidth: 1 height: 1000000 computeByteSize: 4999999\\nwidth: 1000 height: 1 computeByteSize: 4000\\nwidth: 1000 height: 1000 computeByteSize: 4999000\\nwidth: 1000 height: 1000000 computeByteSize: 4999999000\\nwidth: 1000000 height: 1 computeByteSize: 4000000\\nwidth: 1000000 height: 1000 computeByteSize: 4999000000\\nwidth: 1000000 height: 1000000 computeByteSize: 4999999000000\\n" |
| }, |
| "SkBitmap_copy_const_SkBitmap": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap original;\n if (original.tryAllocPixels(\n SkImageInfo::Make(25, 35, kRGBA_8888_SkColorType, kOpaque_SkAlphaType))) {\n SkDebugf(\"original has pixels before copy: %s\\n\", original.getPixels() ? \"true\" : \"false\");\n SkBitmap copy(original);\n SkDebugf(\"original has pixels after copy: %s\\n\", original.getPixels() ? \"true\" : \"false\");\n SkDebugf(\"copy has pixels: %s\\n\", copy.getPixels() ? \"true\" : \"false\");\n }\n}\n", |
| "hash": "bbbae7a181bfd128a4484e8e9f454db1", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::SkBitmap(const SkBitmap& src)", |
| "stdout": "original has pixels before copy: true\\noriginal has pixels after copy: true\\ncopy has pixels: true\\n" |
| }, |
| "SkBitmap_copy_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap original;\n if (original.tryAllocPixels(\n SkImageInfo::Make(25, 35, kRGBA_8888_SkColorType, kOpaque_SkAlphaType))) {\n SkDebugf(\"original has pixels before copy: %s\\n\", original.getPixels() ? \"true\" : \"false\");\n SkBitmap copy = original;\n SkDebugf(\"original has pixels after copy: %s\\n\", original.getPixels() ? \"true\" : \"false\");\n SkDebugf(\"copy has pixels: %s\\n\", copy.getPixels() ? \"true\" : \"false\");\n }\n}\n", |
| "hash": "45279c519ae808f78bd30e9d84bdfdde", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::operator=(const SkBitmap& src)", |
| "stdout": "original has pixels before copy: true\\noriginal has pixels after copy: true\\ncopy has pixels: true\\n" |
| }, |
| "SkBitmap_dimensions": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap;\n bitmap.setInfo(SkImageInfo::MakeN32(33, 55, kOpaque_SkAlphaType));\n SkISize dimensions = bitmap.dimensions();\n SkRect bounds;\n bitmap.getBounds(&bounds);\n SkRect dimensionsAsBounds = SkRect::Make(dimensions);\n SkDebugf(\"dimensionsAsBounds %c= bounds\\n\", dimensionsAsBounds == bounds ? '=' : '!');\n}", |
| "hash": "647056bcc12c27fb4413f212f33a2898", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::dimensions()", |
| "stdout": "dimensionsAsBounds == bounds\\n" |
| }, |
| "SkBitmap_drawsNothing": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap;\n for (int w : { 0, 8 } ) {\n for (bool allocate : { false, true} ) {\n bitmap.setInfo(SkImageInfo::MakeA8(w, 8));\n allocate ? bitmap.allocPixels() : (void) 0 ;\n SkDebugf(\"empty:%s isNull:%s drawsNothing:%s\\n\", bitmap.empty() ? \"true \" : \"false\",\n bitmap.isNull() ? \"true \" : \"false\", bitmap.drawsNothing() ? \"true\" : \"false\");\n }\n }\n}", |
| "hash": "daacf43394ce4045a362a48b5774deed", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::drawsNothing", |
| "stdout": "empty:true isNull:true drawsNothing:true\\nempty:true isNull:false drawsNothing:true\\nempty:false isNull:true drawsNothing:true\\nempty:false isNull:false drawsNothing:false\\n" |
| }, |
| "SkBitmap_empty": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap;\n for (int width : { 0, 2 } ) {\n for (int height : { 0, 2 } ) {\n bitmap.setInfo(SkImageInfo::MakeA8(width, height));\n SkDebugf(\"width: %d height: %d empty: %s\\n\", width, height,\n bitmap.empty() ? \"true\" : \"false\");\n }\n }\n}", |
| "hash": "a3762c2722b56ba55e42689c527f146c", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::empty()", |
| "stdout": "width: 0 height: 0 empty: true\\nwidth: 0 height: 2 empty: true\\nwidth: 2 height: 0 empty: true\\nwidth: 2 height: 2 empty: false\\n" |
| }, |
| "SkBitmap_empty_constructor": { |
| "code": "void draw(SkCanvas* canvas) {\n const char* alphas[] = {\"Unknown\", \"Opaque\", \"Premul\", \"Unpremul\"};\n const char* colors[] = {\"Unknown\", \"Alpha_8\", \"RGB_565\", \"ARGB_4444\", \"RGBA_8888\", \"RGB_888x\",\n \"BGRA_8888\", \"RGBA_1010102\", \"RGB_101010x\", \"Gray_8\", \"RGBA_F16\"};\n SkBitmap bitmap;\n for (int i = 0; i < 2; ++i) {\n SkDebugf(\"width: %2d height: %2d\", bitmap.width(), bitmap.height());\n SkDebugf(\" color: k%s_SkColorType\", colors[bitmap.colorType()]);\n SkDebugf(\" alpha: k%s_SkAlphaType\\n\", alphas[bitmap.alphaType()]);\n bitmap.setInfo(SkImageInfo::Make(25, 35, kRGBA_8888_SkColorType, kOpaque_SkAlphaType),\n 0);\n }\n}\n", |
| "hash": "6739d14ec0d6a373f2fcadc6b3077fd4", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::SkBitmap()", |
| "stdout": "width: 0 height: 0 color: kUnknown_SkColorType alpha: kUnknown_SkAlphaType\\nwidth: 25 height: 35 color: kRGBA_8888_SkColorType alpha: kOpaque_SkAlphaType\\n" |
| }, |
| "SkBitmap_extractSubset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect bounds, s;\n source.getBounds(&bounds);\n SkDebugf(\"bounds: %d, %d, %d, %d\\n\", bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);\n SkBitmap subset;\n for (int left: { -100, 0, 100, 1000 } ) {\n for (int right: { 0, 100, 1000 } ) {\n SkIRect b = SkIRect::MakeLTRB(left, 100, right, 200);\n bool success = source.extractSubset(&subset, b);\n SkDebugf(\"subset: %4d, %4d, %4d, %4d \", b.fLeft, b.fTop, b.fRight, b.fBottom);\n SkDebugf(\"success; %s\", success ? \"true\" : \"false\");\n if (success) {\n subset.getBounds(&s);\n SkDebugf(\" subset: %d, %d, %d, %d\", s.fLeft, s.fTop, s.fRight, s.fBottom);\n }\n SkDebugf(\"\\n\");\n }\n }\n}", |
| "hash": "304148c50c91490bfd58e9222342419c", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::extractSubset", |
| "stdout": "bounds: 0, 0, 512, 512\\nsubset: -100, 100, 0, 200 success; false\\nsubset: -100, 100, 100, 200 success; true subset: 0, 0, 100, 100\\nsubset: -100, 100, 1000, 200 success; true subset: 0, 0, 512, 100\\nsubset: 0, 100, 0, 200 success; false\\nsubset: 0, 100, 100, 200 success; true subset: 0, 0, 100, 100\\nsubset: 0, 100, 1000, 200 success; true subset: 0, 0, 512, 100\\nsubset: 100, 100, 0, 200 success; false\\nsubset: 100, 100, 100, 200 success; false\\nsubset: 100, 100, 1000, 200 success; true subset: 0, 0, 412, 100\\nsubset: 1000, 100, 0, 200 success; false\\nsubset: 1000, 100, 100, 200 success; false\\nsubset: 1000, 100, 1000, 200 success; false\\n" |
| }, |
| "SkBitmap_getAddr": { |
| "code": "void draw(SkCanvas* canvas) {\n char* row0 = (char* ) source.getAddr(0, 0);\n char* row1 = (char* ) source.getAddr(0, 1);\n SkDebugf(\"addr interval %c= rowBytes\\n\",\n (size_t) (row1 - row0) == source.rowBytes() ? '=' : '!');\n}", |
| "hash": "ffcefb2344cd38c3b99f69cfe6d64a17", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::getAddr", |
| "stdout": "addr interval == rowBytes\\n" |
| }, |
| "SkBitmap_getAddr16": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap16;\n SkImageInfo dstInfo = SkImageInfo::Make(source.width(), source.height(), kARGB_4444_SkColorType,\n kPremul_SkAlphaType);\n bitmap16.allocPixels(dstInfo);\n if (source.readPixels(dstInfo, bitmap16.getPixels(), bitmap16.rowBytes(), 0, 0)) {\n uint16_t* row0 = bitmap16.getAddr16(0, 0);\n uint16_t* row1 = bitmap16.getAddr16(0, 1);\n size_t interval = (row1 - row0) * bitmap16.bytesPerPixel();\n SkDebugf(\"addr interval %c= rowBytes\\n\", interval == bitmap16.rowBytes() ? '=' : '!');\n }\n}", |
| "hash": "53e00899ef2e00e2096daf7a07d9b059", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::getAddr16", |
| "stdout": "addr interval == rowBytes\\n" |
| }, |
| "SkBitmap_getAddr32": { |
| "code": "void draw(SkCanvas* canvas) {\n uint32_t* row0 = source.getAddr32(0, 0);\n uint32_t* row1 = source.getAddr32(0, 1);\n size_t interval = (row1 - row0) * source.bytesPerPixel();\n SkDebugf(\"addr interval %c= rowBytes\\n\", interval == source.rowBytes() ? '=' : '!');\n}", |
| "hash": "837a2bcc9fb9ce617a3420956cefc64a", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::getAddr32", |
| "stdout": "addr interval == rowBytes\\n" |
| }, |
| "SkBitmap_getAddr8": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap;\n const int width = 8;\n const int height = 8;\n uint8_t pixels[height][width];\n SkImageInfo info = SkImageInfo::Make(width, height, kGray_8_SkColorType, kOpaque_SkAlphaType);\n if (bitmap.installPixels(info, pixels, info.minRowBytes())) {\n SkDebugf(\"&pixels[4][2] %c= bitmap.getAddr8(2, 4)\\n\",\n &pixels[4][2] == bitmap.getAddr8(2, 4) ? '=' : '!');\n }\n}", |
| "hash": "cb9a08e8ff779b6a1cf8bb54f3883aaf", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::getAddr8", |
| "stdout": "&pixels[4][2] == bitmap.getAddr8(2, 4)\\n" |
| }, |
| "SkBitmap_getColor": { |
| "code": "void draw(SkCanvas* canvas) {\n const int w = 4;\n const int h = 4;\n SkColor colors[][w] = {\n { 0x00000000, 0x2a0e002a, 0x55380055, 0x7f7f007f },\n { 0x2a000e2a, 0x551c1c55, 0x7f542a7f, 0xaaaa38aa },\n { 0x55003855, 0x7f2a547f, 0xaa7171aa, 0xd4d48dd4 },\n { 0x7f007f7f, 0xaa38aaaa, 0xd48dd4d4, 0xffffffff }\n };\n SkDebugf(\"Premultiplied:\\n\");\n for (int y = 0; y < h; ++y) {\n SkDebugf(\"(0, %d) \", y);\n for (int x = 0; x < w; ++x) {\n SkDebugf(\"0x%08x%c\", colors[y][x], x == w - 1 ? '\\n' : ' ');\n }\n }\n SkPixmap pixmap(SkImageInfo::MakeN32(w, h, kPremul_SkAlphaType), colors, w * 4);\n SkBitmap bitmap;\n bitmap.installPixels(pixmap);\n SkDebugf(\"Unpremultiplied:\\n\");\n for (int y = 0; y < h; ++y) {\n SkDebugf(\"(0, %d) \", y);\n for (int x = 0; x < w; ++x) {\n SkDebugf(\"0x%08x%c\", bitmap.getColor(x, y), x == w - 1 ? '\\n' : ' ');\n }\n }\n}", |
| "hash": "193d1f6d8a43b7a8e9f27ba21de38617", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::getColor", |
| "stdout": "Premultiplied:\\n(0, 0) 0x00000000 0x2a0e002a 0x55380055 0x7f7f007f\\n(0, 1) 0x2a000e2a 0x551c1c55 0x7f542a7f 0xaaaa38aa\\n(0, 2) 0x55003855 0x7f2a547f 0xaa7171aa 0xd4d48dd4\\n(0, 3) 0x7f007f7f 0xaa38aaaa 0xd48dd4d4 0xffffffff\\nUnpremultiplied:\\n(0, 0) 0x00000000 0x2a5500ff 0x55a800ff 0x7fff00ff\\n(0, 1) 0x2a0055ff 0x555454ff 0x7fa954ff 0xaaff54ff\\n(0, 2) 0x5500a8ff 0x7f54a9ff 0xaaaaaaff 0xd4ffaaff\\n(0, 3) 0x7f00ffff 0xaa54ffff 0xd4aaffff 0xffffffff\\n" |
| }, |
| "SkBitmap_getGenerationID": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap;\n SkDebugf(\"empty id %u\\n\", bitmap.getGenerationID());\n bitmap.allocPixels(SkImageInfo::MakeN32(64, 64, kOpaque_SkAlphaType));\n SkDebugf(\"alloc id %u\\n\", bitmap.getGenerationID());\n bitmap.eraseColor(SK_ColorRED);\n SkDebugf(\"erase id %u\\n\", bitmap.getGenerationID());\n}", |
| "hash": "db9dd91e0207c3941c09538555817b4b", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::getGenerationID", |
| "stdout": "empty id 0\\nalloc id 4\\nerase id 6\\n\\n" |
| }, |
| "SkBitmap_getPixels": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap;\n bitmap.setInfo(SkImageInfo::MakeN32(4, 4, kPremul_SkAlphaType));\n bitmap.allocPixels();\n bitmap.eraseColor(0x00000000);\n void* baseAddr = bitmap.getPixels();\n *(SkPMColor*)baseAddr = 0xFFFFFFFF;\n SkDebugf(\"bitmap.getColor(0, 1) %c= 0x00000000\\n\",\n bitmap.getColor(0, 1) == 0x00000000 ? '=' : '!');\n SkDebugf(\"bitmap.getColor(0, 0) %c= 0xFFFFFFFF\\n\",\n bitmap.getColor(0, 0) == 0xFFFFFFFF ? '=' : '!');\n}", |
| "hash": "e006bb05cf74ec8d2b3d6adeb5dba11b", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::getPixels", |
| "stdout": "bitmap.getColor(0, 1) == 0x00000000\\nbitmap.getColor(0, 0) == 0xFFFFFFFF\\n" |
| }, |
| "SkBitmap_getSubset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect bounds;\n source.getBounds(&bounds);\n bounds.inset(100, 100);\n SkBitmap subset;\n source.extractSubset(&subset, bounds);\n SkIRect r = source.getSubset();\n SkDebugf(\"source: %d, %d, %d, %d\\n\", r.fLeft, r.fTop, r.fRight, r.fBottom);\n r = subset.getSubset();\n SkDebugf(\"subset: %d, %d, %d, %d\\n\", r.fLeft, r.fTop, r.fRight, r.fBottom);\n}", |
| "hash": "d6dd0b425aa550f21b938a18c2e1a981", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::getSubset", |
| "stdout": "source: 0, 0, 512, 512\\nsubset: 100, 100, 412, 412\\n" |
| }, |
| "SkBitmap_height": { |
| "code": "void draw(SkCanvas* canvas) {\n SkImageInfo info = SkImageInfo::MakeA8(16, 32);\n SkBitmap bitmap;\n bitmap.setInfo(info);\n SkDebugf(\"bitmap height: %d info height: %d\\n\", bitmap.height(), info.height());\n}", |
| "hash": "c79a196278c58b34cd5f551b0124ecc9", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::height()", |
| "stdout": "bitmap height: 32 info height: 32\\n" |
| }, |
| "SkBitmap_info": { |
| "code": "void draw(SkCanvas* canvas) {\n // SkBitmap source; // pre-populated with soccer ball by fiddle.skia.org\n const SkImageInfo& info = source.info();\n const char* alphas[] = {\"Unknown\", \"Opaque\", \"Premul\", \"Unpremul\"};\n const char* colors[] = {\"Unknown\", \"Alpha_8\", \"RGB_565\", \"ARGB_4444\", \"RGBA_8888\", \"RGB_888x\",\n \"BGRA_8888\", \"RGBA_1010102\", \"RGB_101010x\", \"Gray_8\", \"RGBA_F16\"};\n SkDebugf(\"width: %d height: %d color: %s alpha: %s\\n\", info.width(), info.height(),\n colors[info.colorType()], alphas[info.alphaType()]);\n}\n", |
| "hash": "ec47c4dc23e2925ad565eaba55a91553", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::info()", |
| "stdout": "width: 56 height: 56 color: BGRA_8888 alpha: Opaque\\n" |
| }, |
| "SkBitmap_installPixels": { |
| "code": "static void releaseProc(void* addr, void* ) {\n SkDebugf(\"releaseProc called\\n\");\n delete[] (uint32_t*) addr;\n}\n\nvoid draw(SkCanvas* canvas) {\n SkBitmap bitmap;\n void* pixels = new uint32_t[8 * 8];\n SkImageInfo info = SkImageInfo::MakeN32(8, 8, kOpaque_SkAlphaType);\n SkDebugf(\"before installPixels\\n\");\n bool installed = bitmap.installPixels(info, pixels, 16, releaseProc, nullptr);\n SkDebugf(\"install \" \"%s\" \"successful\\n\", installed ? \"\" : \"not \");\n}\n", |
| "hash": "8c4f7bf73fffa1a812ee8e88e44e639c", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::installPixels", |
| "stdout": "before installPixels\\nreleaseProc called\\ninstall not successful\\n" |
| }, |
| "SkBitmap_isImmutable": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap original;\n SkImageInfo info = SkImageInfo::Make(25, 35, kRGBA_8888_SkColorType, kOpaque_SkAlphaType);\n if (original.tryAllocPixels(info)) {\n original.setImmutable();\n SkBitmap copy;\n original.extractSubset(©, {5, 10, 15, 20});\n SkDebugf(\"original is \" \"%s\" \"immutable\\n\", original.isImmutable() ? \"\" : \"not \");\n SkDebugf(\"copy is \" \"%s\" \"immutable\\n\", copy.isImmutable() ? \"\" : \"not \");\n }\n}", |
| "hash": "db61fdcd382342ee88ea1b4f27c27b95", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::isImmutable", |
| "stdout": "original is immutable\\ncopy is immutable\\n" |
| }, |
| "SkBitmap_isNull": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap;\n SkDebugf(\"empty bitmap does %shave pixels\\n\", bitmap.isNull() ? \"not \" : \"\");\n bitmap.setInfo(SkImageInfo::MakeA8(8, 8));\n SkDebugf(\"bitmap with dimensions does %shave pixels\\n\", bitmap.isNull() ? \"not \" : \"\");\n bitmap.allocPixels();\n SkDebugf(\"allocated bitmap does %shave pixels\\n\", bitmap.isNull() ? \"not \" : \"\");\n}", |
| "hash": "211ec89418011aa6e54aa2cc9567e003", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::isNull", |
| "stdout": "empty bitmap does not have pixels\\nbitmap with dimensions does not have pixels\\nallocated bitmap does have pixels\\n" |
| }, |
| "SkBitmap_isOpaque": { |
| "code": "void draw(SkCanvas* canvas) {\n const int height = 2;\n const int width = 2;\n SkBitmap bitmap;\n bitmap.setInfo(SkImageInfo::Make(width, height, kN32_SkColorType, kPremul_SkAlphaType));\n for (int index = 0; index < 2; ++index) {\n bitmap.allocPixels();\n bitmap.eraseColor(0x00000000);\n SkDebugf(\"isOpaque: %s\\n\", bitmap.isOpaque() ? \"true\" : \"false\");\n bitmap.eraseColor(0xFFFFFFFF);\n SkDebugf(\"isOpaque: %s\\n\", bitmap.isOpaque() ? \"true\" : \"false\");\n bitmap.setInfo(bitmap.info().makeAlphaType(kOpaque_SkAlphaType));\n }\n}", |
| "hash": "5e76b68bb46d54315eb0c12d83bd6949", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::isOpaque", |
| "stdout": "isOpaque: false\\nisOpaque: false\\nisOpaque: true\\nisOpaque: true\\n" |
| }, |
| "SkBitmap_isVolatile": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap original;\n SkImageInfo info = SkImageInfo::Make(25, 35, kRGBA_8888_SkColorType, kOpaque_SkAlphaType);\n if (original.tryAllocPixels(info)) {\n original.setIsVolatile(true);\n SkBitmap copy;\n original.extractSubset(©, {5, 10, 15, 20});\n SkDebugf(\"original is \" \"%s\" \"volatile\\n\", original.isVolatile() ? \"\" : \"not \");\n SkDebugf(\"copy is \" \"%s\" \"volatile\\n\", copy.isImmutable() ? \"\" : \"not \");\n }\n}", |
| "hash": "23c4543ac6cdd0e8fe762816a0dc2e03", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::isVolatile", |
| "stdout": "original is volatile\\ncopy is not volatile\\n" |
| }, |
| "SkBitmap_move_SkBitmap": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap original;\n if (original.tryAllocPixels(\n SkImageInfo::Make(25, 35, kRGBA_8888_SkColorType, kOpaque_SkAlphaType))) {\n SkDebugf(\"original has pixels before move: %s\\n\", original.getPixels() ? \"true\" : \"false\");\n SkBitmap copy(std::move(original));\n SkDebugf(\"original has pixels after move: %s\\n\", original.getPixels() ? \"true\" : \"false\");\n SkDebugf(\"copy has pixels: %s\\n\", copy.getPixels() ? \"true\" : \"false\");\n }\n}\n", |
| "hash": "40afd4f1fa69e02d69d92b38252088ef", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::SkBitmap(SkBitmap&& src)", |
| "stdout": "original has pixels before move: true\\noriginal has pixels after move: false\\ncopy has pixels: true\\n" |
| }, |
| "SkBitmap_move_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap original;\n if (original.tryAllocPixels(\n SkImageInfo::Make(25, 35, kRGBA_8888_SkColorType, kOpaque_SkAlphaType))) {\n SkDebugf(\"original has pixels before move: %s\\n\", original.getPixels() ? \"true\" : \"false\");\n SkBitmap copy = std::move(original);\n SkDebugf(\"original has pixels after move: %s\\n\", original.getPixels() ? \"true\" : \"false\");\n SkDebugf(\"copy has pixels: %s\\n\", copy.getPixels() ? \"true\" : \"false\");\n }\n}\n", |
| "hash": "35ea3fed27d8db22dc00f48670de64de", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::operator=(SkBitmap&& src)", |
| "stdout": "original has pixels before move: true\\noriginal has pixels after move: false\\ncopy has pixels: true\\n" |
| }, |
| "SkBitmap_peekPixels": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap;\n bitmap.allocPixels(SkImageInfo::MakeN32Premul(6, 11));\n SkCanvas offscreen(bitmap);\n offscreen.clear(SK_ColorWHITE);\n SkPaint paint;\n offscreen.drawString(\"?\", 0, 10, paint);\n SkPixmap pixmap;\n if (bitmap.peekPixels(&pixmap)) {\n const SkPMColor* pixels = pixmap.addr32();\n SkPMColor pmWhite = pixels[0];\n for (int y = 0; y < bitmap.height(); ++y) {\n for (int x = 0; x < bitmap.width(); ++x) {\n SkDebugf(\"%c\", *pixels++ == pmWhite ? '-' : 'x');\n }\n SkDebugf(\"\\n\");\n }\n }\n}", |
| "hash": "0cc2c6a0dffa61a88711534bd3d43b40", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::peekPixels", |
| "stdout": "------\\n-xxx--\\nx---x-\\n----x-\\n---x--\\n--x---\\n--x---\\n------\\n--x---\\n--x---\\n------\\n" |
| }, |
| "SkBitmap_pixelRef": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap subset;\n source.extractSubset(&subset, SkIRect::MakeXYWH(32, 64, 128, 256));\n SkDebugf(\"src ref %c= sub ref\\n\", source.pixelRef() == subset.pixelRef() ? '=' : '!');\n SkDebugf(\"src pixels %c= sub pixels\\n\", source.getPixels() == subset.getPixels() ? '=' : '!');\n SkDebugf(\"src addr %c= sub addr\\n\", source.getAddr(32, 64) == subset.getAddr(0, 0) ? '=' : '!');\n}", |
| "hash": "5db2d30870a7cc45f28e22578d1880c3", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::pixelRef", |
| "stdout": "src ref == sub ref\\nsrc pixels != sub pixels\\nsrc addr == sub addr\\n" |
| }, |
| "SkBitmap_pixelRefOrigin": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap subset;\n source.extractSubset(&subset, SkIRect::MakeXYWH(32, 64, 128, 256));\n SkIPoint sourceOrigin = source.pixelRefOrigin();\n SkIPoint subsetOrigin = subset.pixelRefOrigin();\n SkDebugf(\"source origin: %d, %d\\n\", sourceOrigin.fX, sourceOrigin.fY);\n SkDebugf(\"subset origin: %d, %d\\n\", subsetOrigin.fX, subsetOrigin.fY);\n}", |
| "hash": "6d31686c6c0829c70f284ae716526d6a", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::pixelRefOrigin", |
| "stdout": "source origin: 0, 0\\nsubset origin: 32, 64\\n" |
| }, |
| "SkBitmap_pixmap": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap;\n bitmap.allocPixels(SkImageInfo::MakeN32Premul(10, 11));\n SkCanvas offscreen(bitmap);\n offscreen.clear(SK_ColorWHITE);\n SkPaint paint;\n offscreen.drawString(\"&\", 0, 10, paint);\n const SkPixmap& pixmap = bitmap.pixmap();\n if (pixmap.addr()) {\n SkPMColor pmWhite = *pixmap.addr32(0, 0);\n for (int y = 0; y < pixmap.height(); ++y) {\n for (int x = 0; x < pixmap.width(); ++x) {\n SkDebugf(\"%c\", *pixmap.addr32(x, y) == pmWhite ? '-' : 'x');\n }\n SkDebugf(\"\\n\");\n }\n }\n}", |
| "hash": "7f972d742dd78d2500034d8867e9ef2f", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::pixmap()", |
| "stdout": "----------\\n---xx-----\\n--x--x----\\n--x-------\\n--xx------\\n--x-x---x-\\n-x---x--x-\\n-x----xx--\\n-xx---x---\\n--xxxx-xx-\\n----------\\n" |
| }, |
| "SkBitmap_refColorSpace": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap1, bitmap2;\n bitmap1.setInfo(SkImageInfo::MakeN32(16, 32, kPremul_SkAlphaType,\n SkColorSpace::MakeSRGBLinear()));\n bitmap2.setInfo(SkImageInfo::MakeN32(16, 32, kPremul_SkAlphaType,\n bitmap1.refColorSpace()));\n SkColorSpace* colorSpace = bitmap2.colorSpace();\n SkDebugf(\"gammaCloseToSRGB: %s gammaIsLinear: %s isSRGB: %s\\n\",\n colorSpace->gammaCloseToSRGB() ? \"true\" : \"false\",\n colorSpace->gammaIsLinear() ? \"true\" : \"false\",\n colorSpace->isSRGB() ? \"true\" : \"false\");\n}", |
| "hash": "cb028b7931da85b949ad0953b9711f9f", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::refColorSpace", |
| "stdout": "gammaCloseToSRGB: false gammaIsLinear: true isSRGB: false\\n" |
| }, |
| "SkBitmap_reset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap;\n bitmap.setInfo(SkImageInfo::Make(1, 1, kRGBA_8888_SkColorType, kOpaque_SkAlphaType));\n bitmap.allocPixels();\n SkDebugf(\"width:%d height:%d isNull:%s\\n\", bitmap.width(), bitmap.height(),\n bitmap.isNull() ? \"true\" : \"false\");\n bitmap.reset();\n SkDebugf(\"width:%d height:%d isNull:%s\\n\", bitmap.width(), bitmap.height(),\n bitmap.isNull() ? \"true\" : \"false\");\n}", |
| "hash": "52ccaeda67924373c5b55a2b89fe314d", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::reset()", |
| "stdout": "width:1 height:1 isNull:false\\nwidth:0 height:0 isNull:true\\n" |
| }, |
| "SkBitmap_rowBytes": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap;\n for (int rowBytes : { 2, 8 } ) {\n bool result = bitmap.setInfo(SkImageInfo::MakeA8(4, 4), rowBytes);\n SkDebugf(\"setInfo returned:%s rowBytes:%d\\n\", result ? \"true \" : \"false\", bitmap.rowBytes());\n }\n}", |
| "hash": "a654fd0b73f424859ae6c95e03f55099", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::rowBytes", |
| "stdout": "setInfo returned:false rowBytes:0\\nsetInfo returned:true rowBytes:8\\n" |
| }, |
| "SkBitmap_rowBytesAsPixels": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap;\n for (int rowBytes : { 4, 5, 6, 7, 8} ) {\n bitmap.setInfo(SkImageInfo::MakeN32(1, 1, kPremul_SkAlphaType), rowBytes);\n SkDebugf(\"rowBytes: %d rowBytesAsPixels: %d\\n\", rowBytes, bitmap.rowBytesAsPixels());\n }\n}", |
| "hash": "03a9e08082a23a98de17c3e24871d61a", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::rowBytesAsPixels", |
| "stdout": "rowBytes: 4 rowBytesAsPixels: 1\\nrowBytes: 5 rowBytesAsPixels: 1\\nrowBytes: 6 rowBytesAsPixels: 1\\nrowBytes: 7 rowBytesAsPixels: 1\\nrowBytes: 8 rowBytesAsPixels: 2\\n" |
| }, |
| "SkBitmap_setAlphaType": { |
| "code": "void draw(SkCanvas* canvas) {\n const char* colors[] = { \"Unknown\", \"Alpha_8\", \"RGB_565\", \"ARGB_4444\", \"RGBA_8888\", \"RGB_888x\",\n \"BGRA_8888\", \"RGBA_1010102\", \"RGB_101010x\", \"Gray_8\", \"RGBA_F16\" };\n const char* alphas[] = {\"Unknown \", \"Opaque \", \"Premul \", \"Unpremul\"};\n SkBitmap bitmap;\n SkAlphaType alphaTypes[] = { kUnknown_SkAlphaType, kOpaque_SkAlphaType, kPremul_SkAlphaType,\n kUnpremul_SkAlphaType\n };\n SkDebugf(\"%18s%15s%17s%18s%19s\\n\", \"Canonical\", \"Unknown\", \"Opaque\", \"Premul\", \"Unpremul\");\n for (SkColorType colorType : {\n kUnknown_SkColorType, kAlpha_8_SkColorType, kRGB_565_SkColorType,\n kARGB_4444_SkColorType, kRGBA_8888_SkColorType, kRGB_888x_SkColorType,\n kBGRA_8888_SkColorType, kRGBA_1010102_SkColorType, kRGB_101010x_SkColorType,\n kGray_8_SkColorType, kRGBA_F16_SkColorType\n } ) {\n for (SkAlphaType canonicalAlphaType : alphaTypes) {\n SkColorTypeValidateAlphaType(colorType, kUnknown_SkAlphaType, &canonicalAlphaType );\n SkDebugf(\"%12s %9s \", colors[(int) colorType], alphas[(int) canonicalAlphaType ]);\n for (SkAlphaType alphaType : alphaTypes) {\n bitmap.setInfo(SkImageInfo::Make(4, 4, colorType, canonicalAlphaType));\n bool result = bitmap.setAlphaType(alphaType);\n SkDebugf(\"%s %s \", result ? \"true \" : \"false\", alphas[(int) bitmap.alphaType()]);\n }\n SkDebugf(\"\\n\");\n }\n }\n}\n", |
| "hash": "af3adcbea7b58bf90298ca5e0ea93030", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::setAlphaType", |
| "stdout": "Canonical Unknown Opaque Premul Unpremul\\n Unknown Unknown true Unknown true Unknown true Unknown true Unknown \\n Unknown Unknown true Unknown true Unknown true Unknown true Unknown \\n Unknown Unknown true Unknown true Unknown true Unknown true Unknown \\n Unknown Unknown true Unknown true Unknown true Unknown true Unknown \\n Alpha_8 Unknown true Unknown true Unknown true Unknown true Unknown \\n Alpha_8 Opaque false Opaque true Opaque true Premul true Premul \\n Alpha_8 Premul false Premul true Opaque true Premul true Premul \\n Alpha_8 Unpremul false Premul true Opaque true Premul true Premul \\n RGB_565 Opaque true Opaque true Opaque true Opaque true Opaque \\n RGB_565 Opaque true Opaque true Opaque true Opaque true Opaque \\n RGB_565 Opaque true Opaque true Opaque true Opaque true Opaque \\n RGB_565 Opaque true Opaque true Opaque true Opaque true Opaque \\n ARGB_4444 Unknown true Unknown true Unknown true Unknown true Unknown \\n ARGB_4444 Opaque false Opaque true Opaque true Premul true Unpremul \\n ARGB_4444 Premul false Premul true Opaque true Premul true Unpremul \\n ARGB_4444 Unpremul false Unpremul true Opaque true Premul true Unpremul \\n RGBA_8888 Unknown true Unknown true Unknown true Unknown true Unknown \\n RGBA_8888 Opaque false Opaque true Opaque true Premul true Unpremul \\n RGBA_8888 Premul false Premul true Opaque true Premul true Unpremul \\n RGBA_8888 Unpremul false Unpremul true Opaque true Premul true Unpremul \\n RGB_888x Opaque true Opaque true Opaque true Opaque true Opaque \\n RGB_888x Opaque true Opaque true Opaque true Opaque true Opaque \\n RGB_888x Opaque true Opaque true Opaque true Opaque true Opaque \\n RGB_888x Opaque true Opaque true Opaque true Opaque true Opaque \\n BGRA_8888 Unknown true Unknown true Unknown true Unknown true Unknown \\n BGRA_8888 Opaque false Opaque true Opaque true Premul true Unpremul \\n BGRA_8888 Premul false Premul true Opaque true Premul true Unpremul \\n BGRA_8888 Unpremul false Unpremul true Opaque true Premul true Unpremul \\nRGBA_1010102 Unknown true Unknown true Unknown true Unknown true Unknown \\nRGBA_1010102 Opaque false Opaque true Opaque true Premul true Unpremul \\nRGBA_1010102 Premul false Premul true Opaque true Premul true Unpremul \\nRGBA_1010102 Unpremul false Unpremul true Opaque true Premul true Unpremul \\n RGB_101010x Opaque true Opaque true Opaque true Opaque true Opaque \\n RGB_101010x Opaque true Opaque true Opaque true Opaque true Opaque \\n RGB_101010x Opaque true Opaque true Opaque true Opaque true Opaque \\n RGB_101010x Opaque true Opaque true Opaque true Opaque true Opaque \\n Gray_8 Opaque true Opaque true Opaque true Opaque true Opaque \\n Gray_8 Opaque true Opaque true Opaque true Opaque true Opaque \\n Gray_8 Opaque true Opaque true Opaque true Opaque true Opaque \\n Gray_8 Opaque true Opaque true Opaque true Opaque true Opaque \\n RGBA_F16 Unknown true Unknown true Unknown true Unknown true Unknown \\n RGBA_F16 Opaque false Opaque true Opaque true Premul true Unpremul \\n RGBA_F16 Premul false Premul true Opaque true Premul true Unpremul \\n RGBA_F16 Unpremul false Unpremul true Opaque true Premul true Unpremul \\n" |
| }, |
| "SkBitmap_setImmutable": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap;\n bitmap.setInfo(SkImageInfo::MakeN32(4, 4, kPremul_SkAlphaType));\n bitmap.allocPixels();\n SkCanvas offscreen(bitmap);\n SkDebugf(\"draw white\\n\");\n offscreen.clear(SK_ColorWHITE);\n bitmap.setImmutable();\n SkDebugf(\"draw black\\n\");\n offscreen.clear(SK_ColorBLACK);\n}", |
| "hash": "9210060d1f4ca46e1375496237902ef3", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::setImmutable", |
| "stdout": "draw white\\ndraw black\\n" |
| }, |
| "SkBitmap_shiftPerPixel": { |
| "code": "void draw(SkCanvas* canvas) {\n const char* colors[] = {\"Unknown\", \"Alpha_8\", \"RGB_565\", \"ARGB_4444\", \"RGBA_8888\", \"RGB_888x\",\n \"BGRA_8888\", \"RGBA_1010102\", \"RGB_101010x\", \"Gray_8\", \"RGBA_F16\"};\n SkImageInfo info = SkImageInfo::MakeA8(1, 1);\n SkBitmap bitmap;\n for (SkColorType colorType : {\n kUnknown_SkColorType, kAlpha_8_SkColorType, kRGB_565_SkColorType,\n kARGB_4444_SkColorType, kRGBA_8888_SkColorType, kRGB_888x_SkColorType,\n kBGRA_8888_SkColorType, kRGBA_1010102_SkColorType, kRGB_101010x_SkColorType,\n kGray_8_SkColorType, kRGBA_F16_SkColorType\n } ) {\n bitmap.setInfo(info.makeColorType(colorType));\n SkDebugf(\"color: k\" \"%s\" \"_SkColorType\" \"%*s\" \"shiftPerPixel: %d\\n\",\n colors[colorType], 14 - strlen(colors[colorType]), \" \",\n bitmap.shiftPerPixel());\n }\n}", |
| "hash": "56ede4b7d45c15d5936f81ac3d74f070", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::shiftPerPixel", |
| "stdout": "color: kUnknown_SkColorType shiftPerPixel: 0\\ncolor: kAlpha_8_SkColorType shiftPerPixel: 0\\ncolor: kRGB_565_SkColorType shiftPerPixel: 1\\ncolor: kARGB_4444_SkColorType shiftPerPixel: 1\\ncolor: kRGBA_8888_SkColorType shiftPerPixel: 2\\ncolor: kRGB_888x_SkColorType shiftPerPixel: 2\\ncolor: kBGRA_8888_SkColorType shiftPerPixel: 2\\ncolor: kRGBA_1010102_SkColorType shiftPerPixel: 2\\ncolor: kRGB_101010x_SkColorType shiftPerPixel: 2\\ncolor: kGray_8_SkColorType shiftPerPixel: 0\\ncolor: kRGBA_F16_SkColorType shiftPerPixel: 3\\n" |
| }, |
| "SkBitmap_swap": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkBitmap& b) -> void {\n const char* alphas[] = {\"Unknown\", \"Opaque\", \"Premul\", \"Unpremul\"};\n const char* colors[] = {\"Unknown\", \"Alpha_8\", \"RGB_565\", \"ARGB_4444\", \"RGBA_8888\", \"RGB_888x\",\n \"BGRA_8888\", \"RGBA_1010102\", \"RGB_101010x\", \"Gray_8\", \"RGBA_F16\"};\n SkDebugf(\"%s width:%d height:%d colorType:k%s_SkColorType alphaType:k%s_SkAlphaType\\n\",\n prefix, b.width(), b.height(), colors[b.colorType()], alphas[b.alphaType()]);\n };\n SkBitmap one, two;\n if (!one.tryAllocPixels(\n SkImageInfo::Make(1, 1, kRGBA_8888_SkColorType, kOpaque_SkAlphaType))) {\n return;\n }\n if (!two.tryAllocPixels(\n SkImageInfo::Make(2, 2, kBGRA_8888_SkColorType, kPremul_SkAlphaType))) {\n return;\n }\n for (int index = 0; index < 2; ++index) {\n debugster(\"one\", one);\n debugster(\"two\", two);\n one.swap(two);\n }\n}\n", |
| "hash": "de9be45255e48fae445c916a41063abc", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::swap()", |
| "stdout": "one width:1 height:1 colorType:kRGBA_8888_SkColorType alphaType:kOpaque_SkAlphaType\\ntwo width:2 height:2 colorType:kBGRA_8888_SkColorType alphaType:kPremul_SkAlphaType\\none width:2 height:2 colorType:kBGRA_8888_SkColorType alphaType:kPremul_SkAlphaType\\ntwo width:1 height:1 colorType:kRGBA_8888_SkColorType alphaType:kOpaque_SkAlphaType\\n" |
| }, |
| "SkBitmap_tryAllocPixelsFlags": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap;\n if (!bitmap.tryAllocPixelsFlags(SkImageInfo::MakeN32(10000, 10000, kOpaque_SkAlphaType),\n SkBitmap::kZeroPixels_AllocFlag)) {\n SkDebugf(\"bitmap allocation failed!\\n\");\n } else {\n SkDebugf(\"bitmap allocation succeeded!\\n\");\n }\n}", |
| "hash": "f1d1880d38e0aea4cefd3e11745e8a09", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::tryAllocPixelsFlags", |
| "stdout": "bitmap allocation succeeded!\\n" |
| }, |
| "SkBitmap_width": { |
| "code": "void draw(SkCanvas* canvas) {\n SkImageInfo info = SkImageInfo::MakeA8(16, 32);\n SkBitmap bitmap;\n bitmap.setInfo(info);\n SkDebugf(\"bitmap width: %d info width: %d\\n\", bitmap.width(), info.width());\n}", |
| "hash": "d06880c42f8bb3b4c3b67bd988046049", |
| "file": "SkBitmap_Reference", |
| "name": "SkBitmap::width()", |
| "stdout": "bitmap width: 16 info width: 16\\n" |
| }, |
| "SkBlendMode_Name": { |
| "code": "void draw(SkCanvas* canvas) {\n SkDebugf(\"default blend: SkBlendMode::k%s\\n\", SkBlendMode_Name(SkPaint().getBlendMode()));\n}", |
| "hash": "3996f4994bf4e90b4cd86524c1f9f1a6", |
| "file": "SkBlendMode_Reference", |
| "name": "SkBlendMode_Name", |
| "stdout": "default blend: SkBlendMode::kSrcOver\\n" |
| }, |
| "SkCanvas_MakeRasterDirect": { |
| "code": "void draw(SkCanvas* ) {\n SkImageInfo info = SkImageInfo::MakeN32Premul(3, 3); // device aligned, 32 bpp, Premultiplied\n const size_t minRowBytes = info.minRowBytes(); // bytes used by one bitmap row\n const size_t size = info.computeMinByteSize(); // bytes used by all rows\n SkAutoTMalloc<SkPMColor> storage(size); // allocate storage for pixels\n SkPMColor* pixels = storage.get(); // get pointer to allocated storage\n // create a SkCanvas backed by a raster device, and delete it when the\n // function goes out of scope.\n std::unique_ptr<SkCanvas> canvas = SkCanvas::MakeRasterDirect(info, pixels, minRowBytes);\n canvas->clear(SK_ColorWHITE); // white is Unpremultiplied, in ARGB order\n canvas->flush(); // ensure that pixels are cleared\n SkPMColor pmWhite = pixels[0]; // the Premultiplied format may vary\n SkPaint paint; // by default, draws black\n canvas->drawPoint(1, 1, paint); // draw in the center\n canvas->flush(); // ensure that point was drawn\n for (int y = 0; y < info.height(); ++y) {\n for (int x = 0; x < info.width(); ++x) {\n SkDebugf(\"%c\", *pixels++ == pmWhite ? '-' : 'x');\n }\n SkDebugf(\"\\n\");\n }\n}\n", |
| "hash": "525285073aae7e53eb8f454a398f880c", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::MakeRasterDirect", |
| "stdout": "---\\n-x-\\n---\\n" |
| }, |
| "SkCanvas_MakeRasterDirectN32": { |
| "code": "void draw(SkCanvas* ) {\n const int width = 3;\n const int height = 3;\n SkPMColor pixels[height][width]; // allocate a 3 by 3 Premultiplied bitmap on the stack\n // create a SkCanvas backed by a raster device, and delete it when the\n // function goes out of scope.\n std::unique_ptr<SkCanvas> canvas = SkCanvas::MakeRasterDirectN32(\n width,\n height,\n pixels[0], // top-left of the bitmap\n sizeof(pixels[0])); // byte width of the each row\n // write a Premultiplied value for white into all pixels in the bitmap\n canvas->clear(SK_ColorWHITE);\n SkPMColor pmWhite = pixels[0][0]; // the Premultiplied format may vary\n SkPaint paint; // by default, draws black\n canvas->drawPoint(1, 1, paint); // draw in the center\n canvas->flush(); // ensure that pixels is ready to be read\n for (int y = 0; y < height; ++y) {\n for (int x = 0; x < width; ++x) {\n SkDebugf(\"%c\", pixels[y][x] == pmWhite ? '-' : 'x');\n }\n SkDebugf(\"\\n\");\n }\n}\n", |
| "hash": "87f55e62ec4c3535e1a5d0f1415b20c6", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::MakeRasterDirectN32", |
| "stdout": "---\\n-x-\\n---\\n" |
| }, |
| "SkCanvas_SaveLayerRec_SaveLayerRec": { |
| "code": "void draw(SkCanvas* canvas) {\n SkCanvas::SaveLayerRec rec1;\n rec1.fSaveLayerFlags = SkCanvas::kPreserveLCDText_SaveLayerFlag;\n SkCanvas::SaveLayerRec rec2(nullptr, nullptr, SkCanvas::kPreserveLCDText_SaveLayerFlag);\n SkDebugf(\"rec1 %c= rec2\\n\", rec1.fBounds == rec2.fBounds\n && rec1.fPaint == rec2.fPaint\n && rec1.fBackdrop == rec2.fBackdrop\n && rec1.fSaveLayerFlags == rec2.fSaveLayerFlags ? '=' : '!');\n}", |
| "hash": "b5cea1eed80a0eb04ddbab3f36dff73f", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::SaveLayerRec::SaveLayerRec()", |
| "stdout": "rec1 == rec2\\n" |
| }, |
| "SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star": { |
| "code": "void draw(SkCanvas* canvas) {\n SkCanvas::SaveLayerRec rec1;\n SkCanvas::SaveLayerRec rec2(nullptr, nullptr);\n SkDebugf(\"rec1 %c= rec2\\n\", rec1.fBounds == rec2.fBounds\n && rec1.fPaint == rec2.fPaint\n && rec1.fBackdrop == rec2.fBackdrop\n && rec1.fSaveLayerFlags == rec2.fSaveLayerFlags ? '=' : '!');\n}", |
| "hash": "027f920259888fc19591ea9a90d92873", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::SaveLayerRec::SaveLayerRec(const SkRect* bounds, const SkPaint* paint, SaveLayerFlags saveLayerFlags = 0)", |
| "stdout": "rec1 == rec2\\n" |
| }, |
| "SkCanvas_SaveLayerRec_const_SkRect_star_const_SkPaint_star_const_SkImageFilter_star": { |
| "code": "void draw(SkCanvas* canvas) {\n SkCanvas::SaveLayerRec rec1;\n SkCanvas::SaveLayerRec rec2(nullptr, nullptr, nullptr, 0);\n SkDebugf(\"rec1 %c= rec2\\n\", rec1.fBounds == rec2.fBounds\n && rec1.fPaint == rec2.fPaint\n && rec1.fBackdrop == rec2.fBackdrop\n && rec1.fSaveLayerFlags == rec2.fSaveLayerFlags ? '=' : '!');\n}", |
| "hash": "9b7fa2fe855642ffff6538829db15328", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::SaveLayerRec::SaveLayerRec(const SkRect* bounds, const SkPaint* paint, const SkImageFilter* backdrop, SaveLayerFlags saveLayerFlags)", |
| "stdout": "rec1 == rec2\\n" |
| }, |
| "SkCanvas_accessTopRasterHandle": { |
| "code": "static void DeleteCallback(void*, void* context) {\n delete (char*) context;\n}\nclass CustomAllocator : public SkRasterHandleAllocator {\npublic:\n bool allocHandle(const SkImageInfo& info, Rec* rec) override {\n char* context = new char[4]{'s', 'k', 'i', 'a'};\n rec->fReleaseProc = DeleteCallback;\n rec->fReleaseCtx = context;\n rec->fHandle = context;\n rec->fPixels = context;\n rec->fRowBytes = 4;\n return true;\n }\n void updateHandle(Handle handle, const SkMatrix& ctm, const SkIRect& clip_bounds) override {\n // apply canvas matrix and clip to custom environment\n }\n};\n\nvoid draw(SkCanvas* canvas) {\n const SkImageInfo info = SkImageInfo::MakeN32Premul(1, 1);\n std::unique_ptr<SkCanvas> c2 =\n SkRasterHandleAllocator::MakeCanvas(std::unique_ptr<CustomAllocator>(\n new CustomAllocator()), info);\n char* context = (char*) c2->accessTopRasterHandle();\n SkDebugf(\"context = %.4s\\n\", context);\n}\n", |
| "hash": "4486d0c0b22ad2931db130f42da4c80c", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::accessTopRasterHandle", |
| "stdout": "context = skia\\n" |
| }, |
| "SkCanvas_const_SkBitmap_const_SkSurfaceProps": { |
| "code": "void draw(SkCanvas* ) {\n SkBitmap bitmap;\n // create a bitmap 5 wide and 11 high\n bitmap.allocPixels(SkImageInfo::MakeN32Premul(5, 11));\n SkCanvas canvas(bitmap, SkSurfaceProps(0, kUnknown_SkPixelGeometry));\n canvas.clear(SK_ColorWHITE); // white is Unpremultiplied, in ARGB order\n SkPixmap pixmap; // provides guaranteed access to the drawn pixels\n if (!canvas.peekPixels(&pixmap)) {\n SkDebugf(\"peekPixels should never fail.\\n\");\n }\n const SkPMColor* pixels = pixmap.addr32(); // points to top-left of bitmap\n SkPMColor pmWhite = pixels[0]; // the Premultiplied format may vary\n SkPaint paint; // by default, draws black, 12 point text\n canvas.drawString(\"!\", 1, 10, paint); // 1 char at baseline (1, 10)\n for (int y = 0; y < bitmap.height(); ++y) {\n for (int x = 0; x < bitmap.width(); ++x) {\n SkDebugf(\"%c\", *pixels++ == pmWhite ? '-' : 'x');\n }\n SkDebugf(\"\\n\");\n }\n}", |
| "hash": "c26cfae4c42cb445240335cc12a50235", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::SkCanvas(const SkBitmap& bitmap, const SkSurfaceProps& props)", |
| "stdout": "-----\\n---x-\\n---x-\\n---x-\\n---x-\\n---x-\\n---x-\\n-----\\n---x-\\n---x-\\n-----\\n" |
| }, |
| "SkCanvas_copy_const_SkBitmap": { |
| "code": "void draw(SkCanvas* ) {\n SkBitmap bitmap;\n // create a bitmap 5 wide and 11 high\n bitmap.allocPixels(SkImageInfo::MakeN32Premul(5, 11));\n SkCanvas canvas(bitmap);\n canvas.clear(SK_ColorWHITE); // white is Unpremultiplied, in ARGB order\n SkPixmap pixmap; // provides guaranteed access to the drawn pixels\n if (!canvas.peekPixels(&pixmap)) {\n SkDebugf(\"peekPixels should never fail.\\n\");\n }\n const SkPMColor* pixels = pixmap.addr32(); // points to top-left of bitmap\n SkPMColor pmWhite = pixels[0]; // the Premultiplied format may vary\n SkPaint paint; // by default, draws black, 12 point text\n canvas.drawString(\"!\", 1, 10, paint); // 1 char at baseline (1, 10)\n for (int y = 0; y < bitmap.height(); ++y) {\n for (int x = 0; x < bitmap.width(); ++x) {\n SkDebugf(\"%c\", *pixels++ == pmWhite ? '-' : 'x');\n }\n SkDebugf(\"\\n\");\n }\n}", |
| "hash": "dd92db963af190e849894038f39b598a", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::SkCanvas(const SkBitmap& bitmap)", |
| "stdout": "-----\\n---x-\\n---x-\\n---x-\\n---x-\\n---x-\\n---x-\\n-----\\n---x-\\n---x-\\n-----\\n" |
| }, |
| "SkCanvas_empty_constructor": { |
| "code": "static void check_for_rotated_ctm(const SkCanvas* canvas) {\n const SkMatrix& matrix = canvas->getTotalMatrix();\n SkDebugf(\"rect stays rect is %s\\n\", matrix.rectStaysRect() ? \"true\" : \"false\");\n}\n\nvoid draw(SkCanvas* canvas) {\n check_for_rotated_ctm(canvas);\n canvas->rotate(30);\n check_for_rotated_ctm(canvas);\n SkCanvas defaultCanvas;\n check_for_rotated_ctm(&defaultCanvas);\n}\n", |
| "hash": "4a00e6589e862fde5be532f4b6e316ce", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::SkCanvas()", |
| "stdout": "rect stays rect is true\\nrect stays rect is false\\nrect stays rect is true\\n" |
| }, |
| "SkCanvas_getBaseLayerSize": { |
| "code": "void draw(SkCanvas* ) {\n SkBitmap bitmap;\n bitmap.allocPixels(SkImageInfo::MakeN32Premul(20, 30));\n SkCanvas canvas(bitmap, SkSurfaceProps(0, kUnknown_SkPixelGeometry));\n canvas.clipRect(SkRect::MakeWH(10, 40));\n SkIRect clipDeviceBounds = canvas.getDeviceClipBounds();\n if (clipDeviceBounds.isEmpty()) {\n SkDebugf(\"Empty clip bounds is unexpected!\\n\");\n }\n SkDebugf(\"clip=%d,%d\\n\", clipDeviceBounds.width(), clipDeviceBounds.height());\n SkISize baseLayerSize = canvas.getBaseLayerSize();\n SkDebugf(\"size=%d,%d\\n\", baseLayerSize.width(), baseLayerSize.height());\n}", |
| "hash": "374e245d91cd729eca48fd20e631fdf3", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::getBaseLayerSize", |
| "stdout": "clip=10,30\\nsize=20,30\\n" |
| }, |
| "SkCanvas_getDeviceClipBounds": { |
| "code": "void draw(SkCanvas* canvas) {\n SkCanvas device(256, 256);\n canvas = &device;\n SkIRect bounds = canvas->getDeviceClipBounds();\n SkDebugf(\"left:%d top:%d right:%d bottom:%d\\n\",\n bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);\n SkPoint clipPoints[] = {{30, 130}, {120, 130}, {120, 230} };\n SkPath clipPath;\n clipPath.addPoly(clipPoints, SK_ARRAY_COUNT(clipPoints), true);\n canvas->save();\n canvas->clipPath(clipPath);\n bounds = canvas->getDeviceClipBounds();\n SkDebugf(\"left:%d top:%d right:%d bottom:%d\\n\",\n bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);\n canvas->restore();\n canvas->scale(1.f/2, 1.f/2);\n canvas->clipPath(clipPath);\n bounds = canvas->getDeviceClipBounds();\n SkDebugf(\"left:%d top:%d right:%d bottom:%d\\n\",\n bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);\n}\n", |
| "hash": "556832ac5711af662a98c21c547185e9", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::getDeviceClipBounds", |
| "stdout": "left:0 top:0 right:256 bottom:256\\nleft:30 top:130 right:120 bottom:230\\nleft:15 top:65 right:60 bottom:115\\n" |
| }, |
| "SkCanvas_getDeviceClipBounds_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect bounds;\n SkDebugf(\"device bounds empty = %s\\n\", canvas->getDeviceClipBounds(&bounds)\n ? \"false\" : \"true\");\n SkPath path;\n canvas->clipPath(path);\n SkDebugf(\"device bounds empty = %s\\n\", canvas->getDeviceClipBounds(&bounds)\n ? \"false\" : \"true\");\n}\n", |
| "hash": "6abb99f849a1f0e33e1dedc00d1c4f7a", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::getDeviceClipBounds_2", |
| "stdout": "device bounds empty = false\\ndevice bounds empty = true\\n" |
| }, |
| "SkCanvas_getLocalClipBounds": { |
| "code": "void draw(SkCanvas* canvas) {\n SkCanvas local(256, 256);\n canvas = &local;\n SkRect bounds = canvas->getLocalClipBounds();\n SkDebugf(\"left:%g top:%g right:%g bottom:%g\\n\",\n bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);\n SkPoint clipPoints[] = {{30, 130}, {120, 130}, {120, 230} };\n SkPath clipPath;\n clipPath.addPoly(clipPoints, SK_ARRAY_COUNT(clipPoints), true);\n canvas->clipPath(clipPath);\n bounds = canvas->getLocalClipBounds();\n SkDebugf(\"left:%g top:%g right:%g bottom:%g\\n\",\n bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);\n canvas->scale(2, 2);\n bounds = canvas->getLocalClipBounds();\n SkDebugf(\"left:%g top:%g right:%g bottom:%g\\n\",\n bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);\n}", |
| "hash": "7f60cb030d3f9b2473adbe3e34b19d91", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::getLocalClipBounds", |
| "stdout": "left:-1 top:-1 right:257 bottom:257\\nleft:29 top:129 right:121 bottom:231\\nleft:14.5 top:64.5 right:60.5 bottom:115.5\\n" |
| }, |
| "SkCanvas_getLocalClipBounds_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkCanvas local(256, 256);\n canvas = &local;\n SkRect bounds;\n SkDebugf(\"local bounds empty = %s\\n\", canvas->getLocalClipBounds(&bounds)\n ? \"false\" : \"true\");\n SkPath path;\n canvas->clipPath(path);\n SkDebugf(\"local bounds empty = %s\\n\", canvas->getLocalClipBounds(&bounds)\n ? \"false\" : \"true\");\n}\n", |
| "hash": "85496614e90c66b020f8a70db8d06f4a", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::getLocalClipBounds_2", |
| "stdout": "local bounds empty = false\\nlocal bounds empty = true\\n" |
| }, |
| "SkCanvas_getMetaData": { |
| "code": "void draw(SkCanvas* ) {\n const char* kHelloMetaData = \"HelloMetaData\";\n SkCanvas canvas;\n SkMetaData& metaData = canvas.getMetaData();\n SkDebugf(\"before: %s\\n\", metaData.findString(kHelloMetaData));\n metaData.setString(kHelloMetaData, \"Hello!\");\n SkDebugf(\"during: %s\\n\", metaData.findString(kHelloMetaData));\n metaData.removeString(kHelloMetaData);\n SkDebugf(\"after: %s\\n\", metaData.findString(kHelloMetaData));\n}", |
| "hash": "1598396056045e8d0c583b748293d652", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::getMetaData", |
| "stdout": "before: (null)\\nduring: Hello!\\nafter: (null)\\n" |
| }, |
| "SkCanvas_getProps": { |
| "code": "void draw(SkCanvas* ) {\n SkBitmap bitmap;\n SkCanvas canvas(bitmap, SkSurfaceProps(0, kRGB_V_SkPixelGeometry));\n SkSurfaceProps surfaceProps(0, kUnknown_SkPixelGeometry);\n SkDebugf(\"isRGB:%d\\n\", SkPixelGeometryIsRGB(surfaceProps.pixelGeometry()));\n if (!canvas.getProps(&surfaceProps)) {\n SkDebugf(\"getProps failed unexpectedly.\\n\");\n }\n SkDebugf(\"isRGB:%d\\n\", SkPixelGeometryIsRGB(surfaceProps.pixelGeometry()));\n}", |
| "hash": "0fbf2dedc2619bbfbf173c9e3bc1a508", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::getProps", |
| "stdout": "isRGB:0\\nisRGB:1\\n" |
| }, |
| "SkCanvas_getSaveCount": { |
| "code": "void draw(SkCanvas* canvas) {\n SkCanvas simple;\n SkDebugf(\"depth = %d\\n\", simple.getSaveCount());\n simple.save();\n SkDebugf(\"depth = %d\\n\", simple.getSaveCount());\n simple.restore();\n SkDebugf(\"depth = %d\\n\", simple.getSaveCount());\n}\n", |
| "hash": "005f2b207e078baac596681924fe591e", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::getSaveCount", |
| "stdout": "depth = 1\\ndepth = 2\\ndepth = 1\\n" |
| }, |
| "SkCanvas_getTotalMatrix": { |
| "code": "void draw(SkCanvas* canvas) {\n SkDebugf(\"isIdentity %s\\n\", canvas->getTotalMatrix().isIdentity() ? \"true\" : \"false\");\n}", |
| "hash": "c0d5fa544759704768f47cac91ae3832", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::getTotalMatrix", |
| "stdout": "isIdentity true\\n" |
| }, |
| "SkCanvas_imageInfo": { |
| "code": "void draw(SkCanvas* canvas) {\n SkCanvas emptyCanvas;\n SkImageInfo canvasInfo = emptyCanvas.imageInfo();\n SkImageInfo emptyInfo;\n SkDebugf(\"emptyInfo %c= canvasInfo\\n\", emptyInfo == canvasInfo ? '=' : '!');\n}", |
| "hash": "d93389d971f8084c4ccc7a66e4e157ee", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::imageInfo", |
| "stdout": "emptyInfo == canvasInfo\\n" |
| }, |
| "SkCanvas_int_int_const_SkSurfaceProps_star": { |
| "code": "void draw(SkCanvas* ) {\n SkCanvas canvas(10, 20); // 10 units wide, 20 units high\n canvas.clipRect(SkRect::MakeXYWH(30, 40, 5, 10)); // clip is outside canvas' device\n SkDebugf(\"canvas %s empty\\n\", canvas.getDeviceClipBounds().isEmpty() ? \"is\" : \"is not\");\n}", |
| "hash": "ce6a5ef2df447970b4453489d9d67930", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::SkCanvas(int width, int height, const SkSurfaceProps* props = nullptr)", |
| "stdout": "canvas is empty\\n" |
| }, |
| "SkCanvas_isClipEmpty": { |
| "code": "void draw(SkCanvas* canvas) {\n SkDebugf(\"clip is%s empty\\n\", canvas->isClipEmpty() ? \"\" : \" not\");\n SkPath path;\n canvas->clipPath(path);\n SkDebugf(\"clip is%s empty\\n\", canvas->isClipEmpty() ? \"\" : \" not\");\n}\n", |
| "hash": "f106f146a58c8604308d4d8d7086d2f5", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::isClipEmpty", |
| "stdout": "clip is not empty\\nclip is empty\\n" |
| }, |
| "SkCanvas_isClipRect": { |
| "code": "void draw(SkCanvas* canvas) {\n SkDebugf(\"clip is%s rect\\n\", canvas->isClipRect() ? \"\" : \" not\");\n canvas->clipRect({0, 0, 0, 0});\n SkDebugf(\"clip is%s rect\\n\", canvas->isClipRect() ? \"\" : \" not\");\n}\n", |
| "hash": "9894bfb476c78a8f6c8f49fbbca3d50d", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::isClipRect", |
| "stdout": "clip is rect\\nclip is not rect\\n" |
| }, |
| "SkCanvas_makeSurface": { |
| "code": "void draw(SkCanvas* canvas) {\n sk_sp<SkSurface> surface = SkSurface::MakeRasterN32Premul(5, 6);\n SkCanvas* smallCanvas = surface->getCanvas();\n SkImageInfo imageInfo = SkImageInfo::MakeN32Premul(3, 4);\n sk_sp<SkSurface> compatible = smallCanvas->makeSurface(imageInfo);\n SkDebugf(\"compatible %c= nullptr\\n\", compatible == nullptr ? '=' : '!');\n SkDebugf(\"size = %d, %d\\n\", compatible->width(), compatible->height());\n}", |
| "hash": "1ce28351444b41ab2b8e3128a4b9b9c2", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::makeSurface", |
| "stdout": "compatible != nullptr\\nsize = 3, 4\\n" |
| }, |
| "SkCanvas_peekPixels": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPixmap pixmap;\n if (canvas->peekPixels(&pixmap)) {\n SkDebugf(\"width=%d height=%d\\n\", pixmap.bounds().width(), pixmap.bounds().height());\n }\n}", |
| "hash": "e9411d676d1fa13b46331abe9e14ad3e", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::peekPixels", |
| "stdout": "width=256 height=256\\n" |
| }, |
| "SkCanvas_quickReject": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect testRect = {30, 30, 120, 129 };\n SkRect clipRect = {30, 130, 120, 230 };\n canvas->save();\n canvas->clipRect(clipRect);\n SkDebugf(\"quickReject %s\\n\", canvas->quickReject(testRect) ? \"true\" : \"false\");\n canvas->restore();\n canvas->rotate(10);\n canvas->clipRect(clipRect);\n SkDebugf(\"quickReject %s\\n\", canvas->quickReject(testRect) ? \"true\" : \"false\");\n}\n", |
| "hash": "cfe4016241074477809dd45435be9cf4", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::quickReject", |
| "stdout": "quickReject true\\nquickReject false\\n" |
| }, |
| "SkCanvas_quickReject_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPoint testPoints[] = {{30, 30}, {120, 30}, {120, 129} };\n SkPoint clipPoints[] = {{30, 130}, {120, 130}, {120, 230} };\n SkPath testPath, clipPath;\n testPath.addPoly(testPoints, SK_ARRAY_COUNT(testPoints), true);\n clipPath.addPoly(clipPoints, SK_ARRAY_COUNT(clipPoints), true);\n canvas->save();\n canvas->clipPath(clipPath);\n SkDebugf(\"quickReject %s\\n\", canvas->quickReject(testPath) ? \"true\" : \"false\");\n canvas->restore();\n canvas->rotate(10);\n canvas->clipPath(clipPath);\n SkDebugf(\"quickReject %s\\n\", canvas->quickReject(testPath) ? \"true\" : \"false\");\n}\n", |
| "hash": "56dcd14f943aea6f7d7aafe0de7e6c25", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::quickReject_2", |
| "stdout": "quickReject true\\nquickReject false\\n" |
| }, |
| "SkCanvas_readPixels_2": { |
| "code": "void draw(SkCanvas* canvas) {\n canvas->clear(0x8055aaff);\n uint32_t pixels[1] = { 0 };\n SkPixmap pixmap(SkImageInfo::MakeN32Premul(1, 1), pixels, 4);\n canvas->readPixels(pixmap, 0, 0);\n SkDebugf(\"pixel = %08x\\n\", pixels[0]);\n}\n", |
| "hash": "85f199032943b6483722c34a91c4e20f", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::readPixels_2", |
| "stdout": "pixel = 802b5580\\n" |
| }, |
| "SkCanvas_readPixels_3": { |
| "code": "void draw(SkCanvas* canvas) {\n canvas->clear(0x8055aaff);\n SkBitmap bitmap;\n bitmap.allocPixels(SkImageInfo::MakeN32Premul(1, 1));\n canvas->readPixels(bitmap, 0, 0);\n SkDebugf(\"pixel = %08x\\n\", bitmap.getAddr32(0, 0)[0]);\n}\n", |
| "hash": "af6dec8ef974aa67bf102f29915bcd6a", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::readPixels_3", |
| "stdout": "pixel = 802b5580\\n" |
| }, |
| "SkCanvas_readPixels_a": { |
| "code": "void draw(SkCanvas* canvas) {\n canvas->clear(0x8055aaff);\n for (SkAlphaType alphaType : { kPremul_SkAlphaType, kUnpremul_SkAlphaType } ) {\n uint32_t pixel = 0;\n SkImageInfo info = SkImageInfo::Make(1, 1, kBGRA_8888_SkColorType, alphaType);\n if (canvas->readPixels(info, &pixel, 4, 0, 0)) {\n SkDebugf(\"pixel = %08x\\n\", pixel);\n }\n }\n}", |
| "hash": "481e990e923a0ed34654f4361b94f096", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::readPixels_2", |
| "stdout": "pixel = 802b5580\\npixel = 8056a9ff\\n" |
| }, |
| "SkCanvas_restore": { |
| "code": "void draw(SkCanvas* canvas) {\n SkCanvas simple;\n SkDebugf(\"depth = %d\\n\", simple.getSaveCount());\n simple.restore();\n SkDebugf(\"depth = %d\\n\", simple.getSaveCount());\n}\n", |
| "hash": "e78471212a67f2f4fd39496e17a30d17", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::restore()", |
| "stdout": "depth = 1\\ndepth = 1\\n" |
| }, |
| "SkCanvas_restoreToCount": { |
| "code": "void draw(SkCanvas* canvas) {\n SkDebugf(\"depth = %d\\n\", canvas->getSaveCount());\n canvas->save();\n canvas->save();\n SkDebugf(\"depth = %d\\n\", canvas->getSaveCount());\n canvas->restoreToCount(0);\n SkDebugf(\"depth = %d\\n\", canvas->getSaveCount());\n}\n", |
| "hash": "9ed0d56436e114c7097fd49eed1aea47", |
| "file": "SkCanvas_Reference", |
| "name": "SkCanvas::restoreToCount", |
| "stdout": "depth = 1\\ndepth = 3\\ndepth = 1\\n" |
| }, |
| "SkIPoint_Make": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIPoint pt1 = {45, 66};\n SkIPoint pt2 = SkIPoint::Make(45, 66);\n SkDebugf(\"pt1 %c= pt2\\n\", pt1 == pt2 ? '=' : '!');\n}", |
| "hash": "e5cf5159525bd3140f288a95fe641fae", |
| "file": "SkIPoint_Reference", |
| "name": "SkIPoint::Make", |
| "stdout": "pt1 == pt2\\n" |
| }, |
| "SkIPoint_equal_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIPoint test[] = { {0, -0}, {-1, -2}, {SK_MaxS32, -1}, {SK_NaN32, -1} };\n for (const SkIPoint& pt : test) {\n SkDebugf(\"pt: %d, %d %c= pt\\n\", pt.fX, pt.fY, pt == pt ? '=' : '!');\n }\n}", |
| "hash": "37ffe2817d720f99e6c252332ce70460", |
| "file": "SkIPoint_Reference", |
| "name": "SkIPoint::operator==(const SkIPoint& a, const SkIPoint& b)", |
| "stdout": "pt: 0, 0 == pt\\npt: -1, -2 == pt\\npt: 2147483647, -1 == pt\\npt: -2147483648, -1 == pt\\n" |
| }, |
| "SkIPoint_equals": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIPoint test[] = { {0, -0}, {-1, -2}, {SK_MaxS32, -1}, {SK_NaN32, -1} };\n for (const SkIPoint& pt : test) {\n SkDebugf(\"pt: %d, %d %c= pt\\n\", pt.fX, pt.fY, pt.equals(pt.fX, pt.fY) ? '=' : '!');\n }\n}", |
| "hash": "64f575d36439d5b69aaed14ffeff1cc4", |
| "file": "SkIPoint_Reference", |
| "name": "SkIPoint::equals()", |
| "stdout": "pt: 0, 0 == pt\\npt: -1, -2 == pt\\npt: 2147483647, -1 == pt\\npt: -2147483648, -1 == pt\\n" |
| }, |
| "SkIPoint_isZero": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIPoint pt = { 0, -0};\n SkDebugf(\"pt.isZero() == %s\\n\", pt.isZero() ? \"true\" : \"false\");\n}", |
| "hash": "658c1df611b4577cc7e0bb384e95737e", |
| "file": "SkIPoint_Reference", |
| "name": "SkIPoint::isZero", |
| "stdout": "pt.isZero() == true\\n" |
| }, |
| "SkIPoint_minus_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIPoint test[] = { {0, -0}, {-1, -2},\n { SK_MaxS32, SK_MinS32 },\n { SK_NaN32, SK_NaN32 } };\n for (const SkIPoint& pt : test) {\n SkIPoint negPt = -pt;\n SkDebugf(\"pt: %d, %d negate: %d, %d\\n\", pt.fX, pt.fY, negPt.fX, negPt.fY);\n }\n}", |
| "hash": "b30d4780475d113a7fed3637af7f0db1", |
| "file": "SkIPoint_Reference", |
| "name": "SkIPoint::operator-() const", |
| "stdout": "pt: 0, 0 negate: 0, 0\\npt: -1, -2 negate: 1, 2\\npt: 2147483647, -2147483647 negate: -2147483647, 2147483647\\npt: -2147483648, -2147483648 negate: -2147483648, -2147483648\\n" |
| }, |
| "SkIPoint_notequal_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIPoint test[] = { {0, -0}, {-1, -2}, {SK_MaxS32, -1}, {SK_NaN32, -1} };\n for (const SkIPoint& pt : test) {\n SkDebugf(\"pt: %d, %d %c= pt\\n\", pt.fX, pt.fY, pt != pt ? '!' : '=');\n }\n}", |
| "hash": "dd89dc48dff69b53d99530b120f204bc", |
| "file": "SkIPoint_Reference", |
| "name": "SkIPoint::operator!=(const SkIPoint& a, const SkIPoint& b)", |
| "stdout": "pt: 0, 0 == pt\\npt: -1, -2 == pt\\npt: 2147483647, -1 == pt\\npt: -2147483648, -1 == pt\\n" |
| }, |
| "SkIPoint_set": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIPoint pt1, pt2 = { SK_MinS32, SK_MaxS32 };\n pt1.set(SK_MinS32, SK_MaxS32);\n SkDebugf(\"pt1 %c= pt2\\n\", pt1 == pt2 ? '=' : '!');\n}", |
| "hash": "165418b5718d79d8f1682a8a0ee32ba0", |
| "file": "SkIPoint_Reference", |
| "name": "SkIPoint::set()", |
| "stdout": "pt1 == pt2\\n" |
| }, |
| "SkIPoint_x": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIPoint pt1 = {45, 66};\n SkDebugf(\"pt1.fX %c= pt1.x()\\n\", pt1.fX == pt1.x() ? '=' : '!');\n}", |
| "hash": "eed4185294f8a8216fc354e6ee6b2e3a", |
| "file": "SkIPoint_Reference", |
| "name": "SkIPoint::x()", |
| "stdout": "pt1.fX == pt1.x()\\n" |
| }, |
| "SkIPoint_y": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIPoint pt1 = {45, 66};\n SkDebugf(\"pt1.fY %c= pt1.y()\\n\", pt1.fY == pt1.y() ? '=' : '!');\n}", |
| "hash": "35c41b8ba7cebf8c9a7a8494e610e14d", |
| "file": "SkIPoint_Reference", |
| "name": "SkIPoint::y()", |
| "stdout": "pt1.fY == pt1.y()\\n" |
| }, |
| "SkIRect_EmptyIRect": { |
| "code": "void draw(SkCanvas* canvas) {\n const SkIRect& rect = SkIRect::EmptyIRect();\n SkDebugf(\"rect: %d, %d, %d, %d\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n}", |
| "hash": "65e0b9b52e907902630577941fb3ed6d", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::EmptyIRect", |
| "stdout": "rect: 0, 0, 0, 0\\n" |
| }, |
| "SkIRect_Intersects": { |
| "code": "void draw(SkCanvas* canvas) {\n SkDebugf(\"%s intersection\", SkIRect::Intersects({10, 40, 50, 80}, {30, 60, 70, 90}) ? \"\" : \"no \");\n}", |
| "hash": "0c67cf8981389efc7108369fb9b7976b", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::Intersects", |
| "stdout": "intersection" |
| }, |
| "SkIRect_IntersectsNoEmptyCheck": { |
| "code": "void draw(SkCanvas* canvas) {\n SkDebugf(\"%s intersection\", SkIRect::IntersectsNoEmptyCheck(\n {10, 40, 50, 80}, {30, 60, 70, 90}) ? \"\" : \"no \");\n}", |
| "hash": "dba234d15162fb5b26e1a96529ca6a2a", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::IntersectsNoEmptyCheck", |
| "stdout": "intersection" |
| }, |
| "SkIRect_MakeEmpty": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = SkIRect::MakeEmpty();\n SkDebugf(\"MakeEmpty isEmpty: %s\\n\", rect.isEmpty() ? \"true\" : \"false\");\n rect.offset(10, 10);\n SkDebugf(\"offset rect isEmpty: %s\\n\", rect.isEmpty() ? \"true\" : \"false\");\n rect.inset(10, 10);\n SkDebugf(\"inset rect isEmpty: %s\\n\", rect.isEmpty() ? \"true\" : \"false\");\n rect.outset(20, 20);\n SkDebugf(\"outset rect isEmpty: %s\\n\", rect.isEmpty() ? \"true\" : \"false\");\n}", |
| "hash": "0ade3971c1d2616564992e286966ec8a", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::MakeEmpty", |
| "stdout": "MakeEmpty isEmpty: true\\noffset rect isEmpty: true\\ninset rect isEmpty: true\\noutset rect isEmpty: false\\n" |
| }, |
| "SkIRect_MakeLTRB": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = SkIRect::MakeLTRB(5, 35, 15, 25);\n SkDebugf(\"rect: %d, %d, %d, %d isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n rect.sort();\n SkDebugf(\"rect: %d, %d, %d, %d isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n}", |
| "hash": "ec1473b700c594f2df9749a12a06b89b", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::MakeLTRB", |
| "stdout": "rect: 5, 35, 15, 25 isEmpty: true\\nrect: 5, 25, 15, 35 isEmpty: false\\n" |
| }, |
| "SkIRect_MakeSize": { |
| "code": "void draw(SkCanvas* canvas) {\n SkSize size = {25.5f, 35.5f};\n SkIRect rect = SkIRect::MakeSize(size.toRound());\n SkDebugf(\"round width: %d height: %d\\n\", rect.width(), rect.height());\n rect = SkIRect::MakeSize(size.toFloor());\n SkDebugf(\"floor width: %d height: %d\\n\", rect.width(), rect.height());\n}", |
| "hash": "c6586ff8d24869c780169b0d19c75df6", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::MakeSize", |
| "stdout": "round width: 26 height: 36\\nfloor width: 25 height: 35\\n" |
| }, |
| "SkIRect_MakeWH": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect1 = SkIRect::MakeWH(25, 35);\n SkIRect rect2 = SkIRect::MakeSize({25, 35});\n SkIRect rect3 = SkIRect::MakeXYWH(0, 0, 25, 35);\n SkIRect rect4 = SkIRect::MakeLTRB(0, 0, 25, 35);\n SkDebugf(\"all %s\" \"equal\\n\", rect1 == rect2 && rect2 == rect3 && rect3 == rect4 ?\n \"\" : \"not \");\n}", |
| "hash": "e36827a1a6ae2b1c26e7a8a08f325a07", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::MakeWH", |
| "stdout": "all equal\\n" |
| }, |
| "SkIRect_MakeXYWH": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = SkIRect::MakeXYWH(5, 35, -15, 25);\n SkDebugf(\"rect: %d, %d, %d, %d isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n rect.sort();\n SkDebugf(\"rect: %d, %d, %d, %d isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n}", |
| "hash": "598ee14350bd1d961cae6b36fa3df17e", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::MakeXYWH", |
| "stdout": "rect: 5, 35, -10, 60 isEmpty: true\\nrect: -10, 35, 5, 60 isEmpty: false\\n" |
| }, |
| "SkIRect_adjust": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = { 8, 11, 19, 22 };\n rect.adjust(2, -1, 1, -2);\n SkDebugf(\"rect: %d, %d, %d, %d\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n}", |
| "hash": "8dc91284493dd012cca3d0ce4c66bda4", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::adjust()", |
| "stdout": "rect: 10, 10, 20, 20\\n" |
| }, |
| "SkIRect_bottom": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect unsorted = { 15, 25, 10, 5 };\n SkDebugf(\"unsorted.fBottom: %d unsorted.bottom(): %d\\n\", unsorted.fBottom, unsorted.bottom());\n SkIRect sorted = unsorted.makeSorted();\n SkDebugf(\"sorted.fBottom: %d sorted.bottom(): %d\\n\", sorted.fBottom, sorted.bottom());\n}", |
| "hash": "c32afebc296054a181621648a184b8e3", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::bottom()", |
| "stdout": "unsorted.fBottom: 5 unsorted.bottom(): 5\\nsorted.fBottom: 25 sorted.bottom(): 25\\n" |
| }, |
| "SkIRect_contains": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = { 30, 50, 40, 60 };\n SkIPoint pts[] = { { 30, 50}, { 40, 50}, { 30, 60} };\n for (auto pt : pts) {\n SkDebugf(\"rect: (%d, %d, %d, %d) %s (%d, %d)\\n\",\n rect.left(), rect.top(), rect.right(), rect.bottom(),\n rect.contains(pt.x(), pt.y()) ? \"contains\" : \"does not contain\", pt.x(), pt.y());\n }\n}", |
| "hash": "a7958a4e0668f5cf805a8e78eb57f51d", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::contains()", |
| "stdout": "rect: (30, 50, 40, 60) contains (30, 50)\\nrect: (30, 50, 40, 60) does not contain (40, 50)\\nrect: (30, 50, 40, 60) does not contain (30, 60)\\n" |
| }, |
| "SkIRect_containsNoEmptyCheck": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = { 30, 50, 40, 60 };\n SkIRect tests[] = { { 30, 50, 31, 51}, { 39, 49, 40, 50}, { 29, 59, 30, 60} };\n for (auto contained : tests) {\n bool success = rect.containsNoEmptyCheck(\n contained.left(), contained.top(), contained.right(), contained.bottom());\n SkDebugf(\"rect: (%d, %d, %d, %d) %s (%d, %d, %d, %d)\\n\",\n rect.left(), rect.top(), rect.right(), rect.bottom(),\n success ? \"contains\" : \"does not contain\",\n contained.left(), contained.top(), contained.right(), contained.bottom());\n }\n}", |
| "hash": "fef2a36bee224e92500199fa9d3cbb8b", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::containsNoEmptyCheck", |
| "stdout": "rect: (30, 50, 40, 60) contains (30, 50, 31, 51)\\nrect: (30, 50, 40, 60) does not contain (39, 49, 40, 50)\\nrect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)\\n" |
| }, |
| "SkIRect_containsNoEmptyCheck_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = { 30, 50, 40, 60 };\n SkIRect tests[] = { { 30, 50, 31, 51}, { 39, 49, 40, 50}, { 29, 59, 30, 60} };\n for (auto contained : tests) {\n SkDebugf(\"rect: (%d, %d, %d, %d) %s (%d, %d, %d, %d)\\n\",\n rect.left(), rect.top(), rect.right(), rect.bottom(),\n rect.containsNoEmptyCheck(contained) ? \"contains\" : \"does not contain\",\n contained.left(), contained.top(), contained.right(), contained.bottom());\n }\n}", |
| "hash": "8f91f58001d9c10420eb146fbc169af4", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::containsNoEmptyCheck_2", |
| "stdout": "rect: (30, 50, 40, 60) contains (30, 50, 31, 51)\\nrect: (30, 50, 40, 60) does not contain (39, 49, 40, 50)\\nrect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)\\n" |
| }, |
| "SkIRect_contains_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = { 30, 50, 40, 60 };\n SkIRect tests[] = { { 30, 50, 31, 51}, { 39, 49, 40, 50}, { 29, 59, 30, 60} };\n for (auto contained : tests) {\n bool success = rect.contains(\n contained.left(), contained.top(), contained.right(), contained.bottom());\n SkDebugf(\"rect: (%d, %d, %d, %d) %s (%d, %d, %d, %d)\\n\",\n rect.left(), rect.top(), rect.right(), rect.bottom(),\n success ? \"contains\" : \"does not contain\",\n contained.left(), contained.top(), contained.right(), contained.bottom());\n }\n}", |
| "hash": "eae55f284818d9965ec5834747d14a48", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::contains_2", |
| "stdout": "rect: (30, 50, 40, 60) contains (30, 50, 31, 51)\\nrect: (30, 50, 40, 60) does not contain (39, 49, 40, 50)\\nrect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)\\n" |
| }, |
| "SkIRect_contains_3": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = { 30, 50, 40, 60 };\n SkIRect tests[] = { { 30, 50, 31, 51}, { 39, 49, 40, 50}, { 29, 59, 30, 60} };\n for (auto contained : tests) {\n SkDebugf(\"rect: (%d, %d, %d, %d) %s (%d, %d, %d, %d)\\n\",\n rect.left(), rect.top(), rect.right(), rect.bottom(),\n rect.contains(contained) ? \"contains\" : \"does not contain\",\n contained.left(), contained.top(), contained.right(), contained.bottom());\n }\n}", |
| "hash": "ee0185db622602b4eb19583c2f42c734", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::contains_3", |
| "stdout": "rect: (30, 50, 40, 60) contains (30, 50, 31, 51)\\nrect: (30, 50, 40, 60) does not contain (39, 49, 40, 50)\\nrect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)\\n" |
| }, |
| "SkIRect_contains_4": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = { 30, 50, 40, 60 };\n SkRect tests[] = { { 30, 50, 31, 51}, { 39, 49, 40, 50}, { 29, 59, 30, 60} };\n for (auto contained : tests) {\n SkDebugf(\"rect: (%d, %d, %d, %d) %s (%g, %g, %g, %g)\\n\",\n rect.left(), rect.top(), rect.right(), rect.bottom(),\n rect.contains(contained) ? \"contains\" : \"does not contain\",\n contained.left(), contained.top(), contained.right(), contained.bottom());\n }\n}", |
| "hash": "acbd79ffb304f332e4b38ef18e19663e", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::contains_4", |
| "stdout": "rect: (30, 50, 40, 60) contains (30, 50, 31, 51)\\nrect: (30, 50, 40, 60) does not contain (39, 49, 40, 50)\\nrect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)\\n" |
| }, |
| "SkIRect_equal_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect test = {0, 0, 2, 2};\n SkIRect sorted = test.makeSorted();\n SkDebugf(\"test %c= sorted\\n\", test == sorted ? '=' : '!');\n}", |
| "hash": "bd8f028d9051062816c9116fea4237b2", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::operator==(const SkIRect& a, const SkIRect& b)", |
| "stdout": "test == sorted\\n" |
| }, |
| "SkIRect_height": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect unsorted = { 15, 25, 10, 20 };\n SkDebugf(\"unsorted height: %d\\n\", unsorted.height());\n SkIRect large = { 1, -2147483647, 2, 2147483644 };\n SkDebugf(\"large height: %d\\n\", large.height());\n}", |
| "hash": "0175bae87fafcd9433ae661574695586", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::height()", |
| "stdout": "unsorted height: -5\\nlarge height: -5\\n" |
| }, |
| "SkIRect_height64": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect large = { 1, -2147483647, 2, 2147483644 };\n SkDebugf(\"height: %d height64: %lld\\n\", large.height(), large.height64());\n}", |
| "hash": "02dd98716e54bbd8c2f0ff23b7ef98cf", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::height64", |
| "stdout": "height: -5 height64: 4294967291\\n" |
| }, |
| "SkIRect_inset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = { 10, 14, 50, 73 };\n rect.inset(5, 13);\n SkDebugf(\"rect: %d, %d, %d, %d\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n}", |
| "hash": "9debaded1aa8bdf5077a4de0b3015b8f", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::inset()", |
| "stdout": "rect: 15, 27, 45, 60\\n" |
| }, |
| "SkIRect_intersect": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect leftRect = { 10, 40, 50, 80 };\n SkIRect rightRect = { 30, 60, 70, 90 };\n SkDebugf(\"%s intersection: \", leftRect.intersect(rightRect) ? \"\" : \"no \");\n SkDebugf(\"%d, %d, %d, %d\\n\", leftRect.left(), leftRect.top(),\n leftRect.right(), leftRect.bottom());\n}", |
| "hash": "ea233f5d5d1ae0e76fc6f2eb371c927a", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::intersect()", |
| "stdout": "intersection: 30, 60, 50, 80\\n" |
| }, |
| "SkIRect_intersectNoEmptyCheck": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect result;\n if (result.intersectNoEmptyCheck({ 10, 40, 50, 80 }, { 30, 60, 70, 90 })) {\n SkDebugf(\"intersection: %d, %d, %d, %d\\n\",\n result.left(), result.top(), result.right(), result.bottom());\n }\n}", |
| "hash": "d35fbc9fdea71df8b8a12fd3da50d11c", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::intersectNoEmptyCheck", |
| "stdout": "intersection: 30, 60, 50, 80\\n" |
| }, |
| "SkIRect_intersect_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect result;\n bool intersected = result.intersect({ 10, 40, 50, 80 }, { 30, 60, 70, 90 });\n SkDebugf(\"%s intersection: %d, %d, %d, %d\\n\", intersected ? \"\" : \"no \",\n result.left(), result.top(), result.right(), result.bottom());\n}", |
| "hash": "b2db0573aacf99ca52776c5522459d02", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::intersect_2", |
| "stdout": "intersection: 30, 60, 50, 80\\n" |
| }, |
| "SkIRect_intersect_3": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect leftRect = { 10, 40, 50, 80 };\n SkDebugf(\"%s intersection: \", leftRect.intersect(30, 60, 70, 90) ? \"\" : \"no \");\n SkDebugf(\"%d, %d, %d, %d\\n\", leftRect.left(), leftRect.top(),\n leftRect.right(), leftRect.bottom());\n}", |
| "hash": "200422990eded2f754ab9893118f2645", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::intersect_3", |
| "stdout": "intersection: 30, 60, 50, 80\\n" |
| }, |
| "SkIRect_isEmpty": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect tests[] = {{20, 40, 10, 50}, {20, 40, 20, 50}};\n for (auto rect : tests) {\n SkDebugf(\"rect: {%d, %d, %d, %d} is\" \"%s empty\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"\" : \" not\");\n rect.sort();\n SkDebugf(\"sorted: {%d, %d, %d, %d} is\" \"%s empty\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"\" : \" not\");\n }\n}", |
| "hash": "edaad064b6de249b7a7c768dfa000adc", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::isEmpty", |
| "stdout": "rect: {20, 40, 10, 50} is empty\\nsorted: {10, 40, 20, 50} is not empty\\nrect: {20, 40, 20, 50} is empty\\nsorted: {20, 40, 20, 50} is empty\\n" |
| }, |
| "SkIRect_isEmpty64": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect tests[] = {{20, 40, 10, 50}, {20, 40, 20, 50}};\n for (auto rect : tests) {\n SkDebugf(\"rect: {%d, %d, %d, %d} is\" \"%s empty\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty64() ? \"\" : \" not\");\n rect.sort();\n SkDebugf(\"sorted: {%d, %d, %d, %d} is\" \"%s empty\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty64() ? \"\" : \" not\");\n }\n}", |
| "hash": "eb905faa1084ccab3ad0605df4c27ea4", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::isEmpty64", |
| "stdout": "rect: {20, 40, 10, 50} is empty\\nsorted: {10, 40, 20, 50} is not empty\\nrect: {20, 40, 20, 50} is empty\\nsorted: {20, 40, 20, 50} is empty\\n" |
| }, |
| "SkIRect_join": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = { 10, 20, 15, 25};\n rect.join(50, 60, 55, 65);\n SkDebugf(\"join: %d, %d, %d, %d\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n}", |
| "hash": "c00ef06289d21db70340e465690e0e08", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::join()", |
| "stdout": "join: 10, 20, 55, 65\\n" |
| }, |
| "SkIRect_join_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = { 10, 20, 15, 25};\n rect.join({50, 60, 55, 65});\n SkDebugf(\"join: %d, %d, %d, %d\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n}", |
| "hash": "75fd81c1d3512e63890d085593018876", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::join_2", |
| "stdout": "join: 10, 20, 55, 65\\n" |
| }, |
| "SkIRect_left": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect unsorted = { 15, 5, 10, 25 };\n SkDebugf(\"unsorted.fLeft: %d unsorted.left(): %d\\n\", unsorted.fLeft, unsorted.left());\n SkIRect sorted = unsorted.makeSorted();\n SkDebugf(\"sorted.fLeft: %d sorted.left(): %d\\n\", sorted.fLeft, sorted.left());\n}", |
| "hash": "caf38ea4431bc246ba198f6a8c2b0f01", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::left()", |
| "stdout": "unsorted.fLeft: 15 unsorted.left(): 15\\nsorted.fLeft: 10 sorted.left(): 10\\n" |
| }, |
| "SkIRect_makeInset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = { 10, 50, 20, 60 };\n SkDebugf(\"rect: %d, %d, %d, %d isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n rect = rect.makeInset(15, 32);\n SkDebugf(\"rect: %d, %d, %d, %d isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n}", |
| "hash": "1db94b2c76e0a7a71856532335fa56b6", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::makeInset", |
| "stdout": "rect: 10, 50, 20, 60 isEmpty: false\\nrect: 25, 82, 5, 28 isEmpty: true\\n" |
| }, |
| "SkIRect_makeOffset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = { 10, 50, 20, 60 };\n SkDebugf(\"rect: %d, %d, %d, %d isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n rect = rect.makeOffset(15, 32);\n SkDebugf(\"rect: %d, %d, %d, %d isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n}", |
| "hash": "737c747df07ddf392c05970440de0927", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::makeOffset", |
| "stdout": "rect: 10, 50, 20, 60 isEmpty: false\\nrect: 25, 82, 35, 92 isEmpty: false\\n" |
| }, |
| "SkIRect_makeOutset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = { 10, 50, 20, 60 };\n SkDebugf(\"rect: %d, %d, %d, %d isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n rect = rect.makeOutset(15, 32);\n SkDebugf(\"rect: %d, %d, %d, %d isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n}", |
| "hash": "240e2953e3455c08f6d89255feff8416", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::makeOutset", |
| "stdout": "rect: 10, 50, 20, 60 isEmpty: false\\nrect: -5, 18, 35, 92 isEmpty: false\\n" |
| }, |
| "SkIRect_makeSorted": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = { 30, 50, 20, 10 };\n SkDebugf(\"rect: %d, %d, %d, %d\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n SkIRect sort = rect.makeSorted();\n SkDebugf(\"sorted: %d, %d, %d, %d\\n\", sort.fLeft, sort.fTop, sort.fRight, sort.fBottom);\n}", |
| "hash": "de89926c374aa16427916900b89a3441", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::makeSorted", |
| "stdout": "rect: 30, 50, 20, 10\\nsorted: 20, 10, 30, 50\\n" |
| }, |
| "SkIRect_notequal_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect test = {2, 2, 0, 0};\n SkIRect sorted = test.makeSorted();\n SkDebugf(\"test %c= sorted\\n\", test != sorted ? '!' : '=');\n}", |
| "hash": "6c4acd8aa203f632b7d85cae672abf4d", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::operator!=(const SkIRect& a, const SkIRect& b)", |
| "stdout": "test != sorted\\n" |
| }, |
| "SkIRect_offset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = { 10, 14, 50, 73 };\n rect.offset(5, 13);\n SkDebugf(\"rect: %d, %d, %d, %d\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n}", |
| "hash": "77e633b2174ffae923c038b303418b50", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::offset()", |
| "stdout": "rect: 15, 27, 55, 86\\n" |
| }, |
| "SkIRect_offsetTo": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = { 10, 14, 50, 73 };\n rect.offsetTo(15, 27);\n SkDebugf(\"rect: %d, %d, %d, %d\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n}", |
| "hash": "a2734ff23b35653956a3002e5c29ff91", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::offsetTo", |
| "stdout": "rect: 15, 27, 55, 86\\n" |
| }, |
| "SkIRect_offset_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = { 10, 14, 50, 73 };\n rect.offset({5, 13});\n SkDebugf(\"rect: %d, %d, %d, %d\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n}", |
| "hash": "31a4c575499e76def651eb65994876f0", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::offset_2", |
| "stdout": "rect: 15, 27, 55, 86\\n" |
| }, |
| "SkIRect_outset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = { 10, 14, 50, 73 };\n rect.outset(5, 13);\n SkDebugf(\"rect: %d, %d, %d, %d\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n}", |
| "hash": "3fc62ca29428195f33a3a02b3eb74e4f", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::outset()", |
| "stdout": "rect: 5, 1, 55, 86\\n" |
| }, |
| "SkIRect_right": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect unsorted = { 15, 25, 10, 5 };\n SkDebugf(\"unsorted.fRight: %d unsorted.right(): %d\\n\", unsorted.fRight, unsorted.right());\n SkIRect sorted = unsorted.makeSorted();\n SkDebugf(\"sorted.fRight: %d sorted.right(): %d\\n\", sorted.fRight, sorted.right());\n}", |
| "hash": "97e210976f1ee0387b30c70635cf114f", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::right()", |
| "stdout": "unsorted.fRight: 10 unsorted.right(): 10\\nsorted.fRight: 15 sorted.right(): 15\\n" |
| }, |
| "SkIRect_set": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect1 = {3, 4, 1, 2};\n SkDebugf(\"rect1: {%d, %d, %d, %d}\\n\", rect1.fLeft, rect1.fTop, rect1.fRight, rect1.fBottom);\n SkIRect rect2;\n rect2.set(3, 4, 1, 2);\n SkDebugf(\"rect2: {%d, %d, %d, %d}\\n\", rect2.fLeft, rect2.fTop, rect2.fRight, rect2.fBottom);\n}", |
| "hash": "1912c37076b7f3bf6aebfa167e971bec", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::set()", |
| "stdout": "rect1: {3, 4, 1, 2}\\nrect2: {3, 4, 1, 2}\\n" |
| }, |
| "SkIRect_setEmpty": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = {3, 4, 1, 2};\n for (int i = 0; i < 2; ++i) {\n SkDebugf(\"rect: {%d, %d, %d, %d} is %s\" \"empty\\n\", rect.fLeft, rect.fTop,\n rect.fRight, rect.fBottom, rect.isEmpty() ? \"\" : \"not \");\n rect.setEmpty();\n }\n}", |
| "hash": "94039c3cc9e911c8ab2993d56fd06210", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::setEmpty", |
| "stdout": "rect: {3, 4, 1, 2} is empty\\nrect: {0, 0, 0, 0} is empty\\n" |
| }, |
| "SkIRect_setLTRB": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect1 = {3, 4, 1, 2};\n SkDebugf(\"rect1: {%d, %d, %d, %d}\\n\", rect1.fLeft, rect1.fTop, rect1.fRight, rect1.fBottom);\n SkIRect rect2;\n rect2.setLTRB(3, 4, 1, 2);\n SkDebugf(\"rect2: {%d, %d, %d, %d}\\n\", rect2.fLeft, rect2.fTop, rect2.fRight, rect2.fBottom);\n}", |
| "hash": "ead6bdcf2ae77ec19a1c5a96f5b31af8", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::setLTRB", |
| "stdout": "rect1: {3, 4, 1, 2}\\nrect2: {3, 4, 1, 2}\\n" |
| }, |
| "SkIRect_setXYWH": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect;\n rect.setXYWH(5, 35, -15, 25);\n SkDebugf(\"rect: %d, %d, %d, %d isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n rect.sort();\n SkDebugf(\"rect: %d, %d, %d, %d isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n}", |
| "hash": "0e1db8c86678c004e504f47641b44b17", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::setXYWH", |
| "stdout": "rect: 5, 35, -10, 60 isEmpty: true\\nrect: -10, 35, 5, 60 isEmpty: false\\n" |
| }, |
| "SkIRect_size": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkIRect& rect) -> void {\n SkISize size = rect.size();\n SkDebugf(\"%s \", prefix);\n SkDebugf(\"rect: %d, %d, %d, %d \", rect.left(), rect.top(), rect.right(), rect.bottom());\n SkDebugf(\"size: %d, %d\\n\", size.width(), size.height());\n };\n SkIRect rect = {20, 30, 40, 50};\n debugster(\"original\", rect);\n rect.offset(20, 20);\n debugster(\" offset\", rect);\n rect.outset(20, 20);\n debugster(\" outset\", rect);\n}", |
| "hash": "8b3224641cb3053a7b8a5798b6cd1cf6", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::size()", |
| "stdout": "original rect: 20, 30, 40, 50 size: 20, 20\\n offset rect: 40, 50, 60, 70 size: 20, 20\\n outset rect: 20, 30, 80, 90 size: 60, 60\\n" |
| }, |
| "SkIRect_sort": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect rect = { 30, 50, 20, 10 };\n SkDebugf(\"rect: %d, %d, %d, %d\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n rect.sort();\n SkDebugf(\"sorted: %d, %d, %d, %d\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n}", |
| "hash": "fa12547fcfd4c1aef3db1a1f6aae0fe4", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::sort()", |
| "stdout": "rect: 30, 50, 20, 10\\nsorted: 20, 10, 30, 50\\n" |
| }, |
| "SkIRect_top": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect unsorted = { 15, 25, 10, 5 };\n SkDebugf(\"unsorted.fTop: %d unsorted.top(): %d\\n\", unsorted.fTop, unsorted.top());\n SkIRect sorted = unsorted.makeSorted();\n SkDebugf(\"sorted.fTop: %d sorted.top(): %d\\n\", sorted.fTop, sorted.top());\n}", |
| "hash": "cbec1ae6530e95943775450b1d11f19e", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::top()", |
| "stdout": "unsorted.fTop: 25 unsorted.top(): 25\\nsorted.fTop: 5 sorted.top(): 5\\n" |
| }, |
| "SkIRect_width": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect unsorted = { 15, 25, 10, 5 };\n SkDebugf(\"unsorted width: %d\\n\", unsorted.width());\n SkIRect large = { -2147483647, 1, 2147483644, 2 };\n SkDebugf(\"large width: %d\\n\", large.width());\n}", |
| "hash": "4acfbe051805940210c8916a94794142", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::width()", |
| "stdout": "unsorted width: -5\\nlarge width: -5\\n" |
| }, |
| "SkIRect_width64": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect large = { -2147483647, 1, 2147483644, 2 };\n SkDebugf(\"width: %d width64: %lld\\n\", large.width(), large.width64());\n}", |
| "hash": "63977f97999bbd6eecfdcc7575d75492", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::width64", |
| "stdout": "width: -5 width64: 4294967291\\n" |
| }, |
| "SkIRect_x": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect unsorted = { 15, 5, 10, 25 };\n SkDebugf(\"unsorted.fLeft: %d unsorted.x(): %d\\n\", unsorted.fLeft, unsorted.x());\n SkIRect sorted = unsorted.makeSorted();\n SkDebugf(\"sorted.fLeft: %d sorted.x(): %d\\n\", sorted.fLeft, sorted.x());\n}", |
| "hash": "2a59cbfd1330a0db520d6ebb2b7c68c7", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::x()", |
| "stdout": "unsorted.fLeft: 15 unsorted.x(): 15\\nsorted.fLeft: 10 sorted.x(): 10\\n" |
| }, |
| "SkIRect_y": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect unsorted = { 15, 25, 10, 5 };\n SkDebugf(\"unsorted.fTop: %d unsorted.y(): %d\\n\", unsorted.fTop, unsorted.y());\n SkIRect sorted = unsorted.makeSorted();\n SkDebugf(\"sorted.fTop: %d sorted.y(): %d\\n\", sorted.fTop, sorted.y());\n}", |
| "hash": "6ea461e71f7fc80605818fbf493caa63", |
| "file": "SkIRect_Reference", |
| "name": "SkIRect::y()", |
| "stdout": "unsorted.fTop: 25 unsorted.y(): 25\\nsorted.fTop: 5 sorted.y(): 5\\n" |
| }, |
| "SkImageInfo_ByteSizeOverflowed": { |
| "code": "void draw(SkCanvas* canvas) {\n SkImageInfo info = SkImageInfo::MakeN32Premul(2, 1000000000);\n for (size_t rowBytes = 100000000; rowBytes < 10000000000000LL; rowBytes *= 10) {\n const size_t size = info.computeByteSize(rowBytes);\n SkDebugf(\"rowBytes:%llu size:%llu overflowed:%s\\n\", rowBytes, size,\n SkImageInfo::ByteSizeOverflowed(size) ? \"true\" : \"false\");\n }\n}", |
| "hash": "6a63dfdd62ab77ff57783af8c33d7b78", |
| "file": "SkImageInfo_Reference", |
| "name": "SkImageInfo::ByteSizeOverflowed", |
| "stdout": "rowBytes:100000000 size:99999999900000008 overflowed:false\\nrowBytes:1000000000 size:999999999000000008 overflowed:false\\nrowBytes:10000000000 size:9999999990000000008 overflowed:false\\nrowBytes:100000000000 size:18446744073709551615 overflowed:true\\nrowBytes:1000000000000 size:18446744073709551615 overflowed:true\\n" |
| }, |
| "SkImageInfo_alphaType": { |
| "code": "void draw(SkCanvas* canvas) {\n const char* alphas[] = {\"Unknown\", \"Opaque\", \"Premul\", \"Unpremul\"};\n SkImageInfo info = SkImageInfo::MakeA8(16, 32);\n SkDebugf(\"alpha type: k\" \"%s\" \"_SkAlphaType\\n\", alphas[info.alphaType()]);\n}", |
| "hash": "5c1d2499a4056b6cff38c1cf924158a1", |
| "file": "SkImageInfo_Reference", |
| "name": "SkImageInfo::alphaType", |
| "stdout": "alpha type: kPremul_SkAlphaType\\n" |
| }, |
| "SkImageInfo_bytesPerPixel": { |
| "code": "void draw(SkCanvas* canvas) {\n const char* colors[] = {\"Unknown\", \"Alpha_8\", \"RGB_565\", \"ARGB_4444\", \"RGBA_8888\", \"RGB_888x\",\n \"BGRA_8888\", \"RGBA_1010102\", \"RGB_101010x\", \"Gray_8\", \"RGBA_F16\"};\n for (SkColorType colorType : {\n kUnknown_SkColorType, kAlpha_8_SkColorType, kRGB_565_SkColorType,\n kARGB_4444_SkColorType, kRGBA_8888_SkColorType, kRGB_888x_SkColorType,\n kBGRA_8888_SkColorType, kRGBA_1010102_SkColorType, kRGB_101010x_SkColorType,\n kGray_8_SkColorType, kRGBA_F16_SkColorType\n } ) {\n SkImageInfo info = SkImageInfo::Make(1, 1, colorType, kOpaque_SkAlphaType);\n SkDebugf(\"color: k\" \"%s\" \"_SkColorType\" \"%*s\" \"bytesPerPixel: %d\\n\",\n colors[colorType], 13 - strlen(colors[colorType]), \" \",\n info.bytesPerPixel());\n }\n}", |
| "hash": "9b6de4a07b2316228e9340e5a3b82134", |
| "file": "SkImageInfo_Reference", |
| "name": "SkImageInfo::bytesPerPixel", |
| "stdout": "color: kUnknown_SkColorType bytesPerPixel: 0\\ncolor: kAlpha_8_SkColorType bytesPerPixel: 1\\ncolor: kRGB_565_SkColorType bytesPerPixel: 2\\ncolor: kARGB_4444_SkColorType bytesPerPixel: 2\\ncolor: kRGBA_8888_SkColorType bytesPerPixel: 4\\ncolor: kRGB_888x_SkColorType bytesPerPixel: 4\\ncolor: kBGRA_8888_SkColorType bytesPerPixel: 4\\ncolor: kRGBA_1010102_SkColorType bytesPerPixel: 4\\ncolor: kRGB_101010x_SkColorType bytesPerPixel: 4\\ncolor: kGray_8_SkColorType bytesPerPixel: 1\\ncolor: kRGBA_F16_SkColorType bytesPerPixel: 8\\n" |
| }, |
| "SkImageInfo_colorSpace": { |
| "code": "void draw(SkCanvas* canvas) {\n SkImageInfo info = SkImageInfo::MakeN32(16, 32, kPremul_SkAlphaType,\n SkColorSpace::MakeSRGBLinear());\n SkColorSpace* colorSpace = info.colorSpace();\n SkDebugf(\"gammaCloseToSRGB: %s gammaIsLinear: %s isSRGB: %s\\n\",\n colorSpace->gammaCloseToSRGB() ? \"true\" : \"false\",\n colorSpace->gammaIsLinear() ? \"true\" : \"false\",\n colorSpace->isSRGB() ? \"true\" : \"false\");\n}", |
| "hash": "5602b816d7cf75e3851274ef36a4c10f", |
| "file": "SkImageInfo_Reference", |
| "name": "SkImageInfo::colorSpace", |
| "stdout": "gammaCloseToSRGB: false gammaIsLinear: true isSRGB: false\\n" |
| }, |
| "SkImageInfo_colorType": { |
| "code": "void draw(SkCanvas* canvas) {\n const char* colors[] = {\"Unknown\", \"Alpha_8\", \"RGB_565\", \"ARGB_4444\", \"RGBA_8888\", \"RGB_888x\",\n \"BGRA_8888\", \"RGBA_1010102\", \"RGB_101010x\", \"Gray_8\", \"RGBA_F16\"};\n SkImageInfo info = SkImageInfo::MakeA8(16, 32);\n SkDebugf(\"color type: k\" \"%s\" \"_SkColorType\\n\", colors[info.colorType()]);\n}", |
| "hash": "06ecc3ce7f35cc7f930cbc2a662e3105", |
| "file": "SkImageInfo_Reference", |
| "name": "SkImageInfo::colorType", |
| "stdout": "color type: kAlpha_8_SkColorType\\n" |
| }, |
| "SkImageInfo_dimensions": { |
| "code": "void draw(SkCanvas* canvas) {\n const int height = 2;\n const int width = 2;\n SkImageInfo imageInfo = SkImageInfo::Make(width, height, kN32_SkColorType, kPremul_SkAlphaType);\n SkISize dimensions = imageInfo.dimensions();\n SkIRect bounds = imageInfo.bounds();\n SkIRect dimensionsAsBounds = SkIRect::MakeSize(dimensions);\n SkDebugf(\"dimensionsAsBounds %c= bounds\\n\", dimensionsAsBounds == bounds ? '=' : '!');\n}", |
| "hash": "d5547cd2b302822aa85b7b0ae3f48458", |
| "file": "SkImageInfo_Reference", |
| "name": "SkImageInfo::dimensions()", |
| "stdout": "dimensionsAsBounds == bounds\\n" |
| }, |
| "SkImageInfo_equal1_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkImageInfo info1 = SkImageInfo::Make(10, 20, kGray_8_SkColorType, kPremul_SkAlphaType);\n SkImageInfo info2 = SkImageInfo::Make(20, 10, kAlpha_8_SkColorType, kUnpremul_SkAlphaType);\n SkDebugf(\"info1 %c= info2\\n\", info1 == info2 ? '=' : '!');\n info2 = info2.makeWH(10, 20);\n SkDebugf(\"info1 %c= info2\\n\", info1 == info2 ? '=' : '!');\n info2 = info2.makeColorType(kGray_8_SkColorType);\n SkDebugf(\"info1 %c= info2\\n\", info1 == info2 ? '=' : '!');\n info2 = info2.makeAlphaType(kPremul_SkAlphaType);\n SkDebugf(\"info1 %c= info2\\n\", info1 == info2 ? '=' : '!');\n}", |
| "hash": "53c212c4f2449df0b0eedbc6227b6ab7", |
| "file": "SkImageInfo_Reference", |
| "name": "SkImageInfo::operator==(const SkImageInfo& other) const", |
| "stdout": "info1 != info2\\ninfo1 != info2\\ninfo1 != info2\\ninfo1 == info2\\n" |
| }, |
| "SkImageInfo_isEmpty": { |
| "code": "void draw(SkCanvas* canvas) {\n for (int width : { 0, 2 } ) {\n for (int height : { 0, 2 } ) {\n SkImageInfo imageInfo= SkImageInfo::MakeA8(width, height);\n SkDebugf(\"width: %d height: %d empty: %s\\n\", width, height,\n imageInfo.isEmpty() ? \"true\" : \"false\");\n }\n }\n}", |
| "hash": "b8757200da5be0b43763cf79feb681a7", |
| "file": "SkImageInfo_Reference", |
| "name": "SkImageInfo::isEmpty", |
| "stdout": "width: 0 height: 0 empty: true\\nwidth: 0 height: 2 empty: true\\nwidth: 2 height: 0 empty: true\\nwidth: 2 height: 2 empty: false\\n" |
| }, |
| "SkImageInfo_isOpaque": { |
| "code": "void draw(SkCanvas* canvas) {\n const int height = 2;\n const int width = 2;\n SkBitmap bitmap;\n SkImageInfo imageInfo = SkImageInfo::Make(width, height, kN32_SkColorType, kPremul_SkAlphaType);\n bitmap.setInfo(imageInfo);\n for (int index = 0; index < 2; ++index) {\n bitmap.allocPixels();\n bitmap.eraseColor(0x00000000);\n SkDebugf(\"isOpaque: %s\\n\", imageInfo.isOpaque() ? \"true\" : \"false\");\n bitmap.eraseColor(0xFFFFFFFF);\n SkDebugf(\"isOpaque: %s\\n\", imageInfo.isOpaque() ? \"true\" : \"false\");\n imageInfo = imageInfo.makeAlphaType(kOpaque_SkAlphaType);\n bitmap.setInfo(imageInfo);\n }\n}", |
| "hash": "e9bd4f02b6cfb3ac864cb7fee7d7299c", |
| "file": "SkImageInfo_Reference", |
| "name": "SkImageInfo::isOpaque", |
| "stdout": "isOpaque: false\\nisOpaque: false\\nisOpaque: true\\nisOpaque: true\\n" |
| }, |
| "SkImageInfo_minRowBytes": { |
| "code": "void draw(SkCanvas* canvas) {\n for (int shift = 24; shift < 32; ++shift) {\n int width = 1 << shift;\n SkImageInfo imageInfo =\n SkImageInfo::Make(width, 1, kRGBA_F16_SkColorType, kPremul_SkAlphaType);\n size_t minRowBytes = imageInfo.minRowBytes();\n bool widthTooLarge = !minRowBytes;\n SkDebugf(\"RGBA_F16 width %d (0x%08x) %s\\n\",\n width, width, widthTooLarge ? \"too large\" : \"OK\");\n }\n}", |
| "hash": "897230ecfb36095486beca324fd369f9", |
| "file": "SkImageInfo_Reference", |
| "name": "SkImageInfo::minRowBytes", |
| "stdout": "RGBA_F16 width 16777216 (0x01000000) OK\\nRGBA_F16 width 33554432 (0x02000000) OK\\nRGBA_F16 width 67108864 (0x04000000) OK\\nRGBA_F16 width 134217728 (0x08000000) OK\\nRGBA_F16 width 268435456 (0x10000000) too large\\nRGBA_F16 width 536870912 (0x20000000) too large\\nRGBA_F16 width 1073741824 (0x40000000) too large\\nRGBA_F16 width -2147483648 (0x80000000) too large\\n" |
| }, |
| "SkImageInfo_minRowBytes64": { |
| "code": "void draw(SkCanvas* canvas) {\n for (int shift = 24; shift < 32; ++shift) {\n int width = 1 << shift;\n SkImageInfo imageInfo =\n SkImageInfo::Make(width, 1, kRGBA_F16_SkColorType, kPremul_SkAlphaType);\n uint64_t minRowBytes = imageInfo.minRowBytes64();\n bool widthTooLarge = (uint64_t) (int32_t) minRowBytes != minRowBytes;\n SkDebugf(\"RGBA_F16 width %d (0x%08x) %s\\n\",\n width, width, widthTooLarge ? \"too large\" : \"OK\");\n }\n}", |
| "hash": "4b5d3904476726a39f1c3e276d6b6ba7", |
| "file": "SkImageInfo_Reference", |
| "name": "SkImageInfo::minRowBytes64", |
| "stdout": "RGBA_F16 width 16777216 (0x01000000) OK\\nRGBA_F16 width 33554432 (0x02000000) OK\\nRGBA_F16 width 67108864 (0x04000000) OK\\nRGBA_F16 width 134217728 (0x08000000) OK\\nRGBA_F16 width 268435456 (0x10000000) too large\\nRGBA_F16 width 536870912 (0x20000000) too large\\nRGBA_F16 width 1073741824 (0x40000000) too large\\nRGBA_F16 width -2147483648 (0x80000000) too large\\n" |
| }, |
| "SkImageInfo_notequal1_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkImageInfo info1 = SkImageInfo::Make(10, 20, kGray_8_SkColorType, kPremul_SkAlphaType);\n SkImageInfo info2 = SkImageInfo::Make(20, 10, kAlpha_8_SkColorType, kUnpremul_SkAlphaType);\n SkDebugf(\"info1 %c= info2\\n\", info1 != info2 ? '!' : '=');\n info2 = info2.makeWH(10, 20);\n SkDebugf(\"info1 %c= info2\\n\", info1 != info2 ? '!' : '=');\n info2 = info2.makeColorType(kGray_8_SkColorType);\n SkDebugf(\"info1 %c= info2\\n\", info1 != info2 ? '!' : '=');\n info2 = info2.makeAlphaType(kPremul_SkAlphaType);\n SkDebugf(\"info1 %c= info2\\n\", info1 != info2 ? '!' : '=');\n}", |
| "hash": "8c039fde0a476ac1aa62bf9de5d61c77", |
| "file": "SkImageInfo_Reference", |
| "name": "SkImageInfo::operator!=(const SkImageInfo& other) const", |
| "stdout": "info1 != info2\\ninfo1 != info2\\ninfo1 != info2\\ninfo1 == info2\\n" |
| }, |
| "SkImageInfo_refColorSpace": { |
| "code": "void draw(SkCanvas* canvas) {\n SkImageInfo info1 = SkImageInfo::MakeN32(16, 32, kPremul_SkAlphaType,\n SkColorSpace::MakeSRGBLinear());\n SkImageInfo info2 = SkImageInfo::MakeN32(16, 32, kPremul_SkAlphaType,\n info1.refColorSpace());\n SkColorSpace* colorSpace = info2.colorSpace();\n SkDebugf(\"gammaCloseToSRGB: %s gammaIsLinear: %s isSRGB: %s\\n\",\n colorSpace->gammaCloseToSRGB() ? \"true\" : \"false\",\n colorSpace->gammaIsLinear() ? \"true\" : \"false\",\n colorSpace->isSRGB() ? \"true\" : \"false\");\n}", |
| "hash": "33f65524736736fd91802b4198ba6fa8", |
| "file": "SkImageInfo_Reference", |
| "name": "SkImageInfo::refColorSpace", |
| "stdout": "gammaCloseToSRGB: false gammaIsLinear: true isSRGB: false\\n" |
| }, |
| "SkImageInfo_reset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkImageInfo info = SkImageInfo::MakeN32Premul(16, 8);\n SkImageInfo copy = info;\n SkDebugf(\"info %c= copy\\n\", info == copy ? '=' : '!');\n copy.reset();\n SkDebugf(\"info %c= reset copy\\n\", info == copy ? '=' : '!');\n SkDebugf(\"SkImageInfo() %c= reset copy\\n\", SkImageInfo() == copy ? '=' : '!');\n}", |
| "hash": "ab7e73786805c936de386b6c1ebe1f13", |
| "file": "SkImageInfo_Reference", |
| "name": "SkImageInfo::reset()", |
| "stdout": "info == copy\\ninfo != reset copy\\nSkImageInfo() == reset copy\\n" |
| }, |
| "SkImageInfo_shiftPerPixel": { |
| "code": "void draw(SkCanvas* canvas) {\n const char* colors[] = {\"Unknown\", \"Alpha_8\", \"RGB_565\", \"ARGB_4444\", \"RGBA_8888\", \"RGB_888x\",\n \"BGRA_8888\", \"RGBA_1010102\", \"RGB_101010x\", \"Gray_8\", \"RGBA_F16\"};\n for (SkColorType colorType : {\n kUnknown_SkColorType, kAlpha_8_SkColorType, kRGB_565_SkColorType,\n kARGB_4444_SkColorType, kRGBA_8888_SkColorType, kRGB_888x_SkColorType,\n kBGRA_8888_SkColorType, kRGBA_1010102_SkColorType, kRGB_101010x_SkColorType,\n kGray_8_SkColorType, kRGBA_F16_SkColorType\n } ) {\n SkImageInfo info = SkImageInfo::Make(1, 1, colorType, kOpaque_SkAlphaType);\n SkDebugf(\"color: k\" \"%s\" \"_SkColorType\" \"%*s\" \"shiftPerPixel: %d\\n\",\n colors[colorType], 14 - strlen(colors[colorType]), \" \",\n info.shiftPerPixel());\n }\n}", |
| "hash": "e47b911f94fc629f756a829e523a2a89", |
| "file": "SkImageInfo_Reference", |
| "name": "SkImageInfo::shiftPerPixel", |
| "stdout": "color: kUnknown_SkColorType shiftPerPixel: 0\\ncolor: kAlpha_8_SkColorType shiftPerPixel: 0\\ncolor: kRGB_565_SkColorType shiftPerPixel: 1\\ncolor: kARGB_4444_SkColorType shiftPerPixel: 1\\ncolor: kRGBA_8888_SkColorType shiftPerPixel: 2\\ncolor: kRGB_888x_SkColorType shiftPerPixel: 2\\ncolor: kBGRA_8888_SkColorType shiftPerPixel: 2\\ncolor: kRGBA_1010102_SkColorType shiftPerPixel: 2\\ncolor: kRGB_101010x_SkColorType shiftPerPixel: 2\\ncolor: kGray_8_SkColorType shiftPerPixel: 0\\ncolor: kRGBA_F16_SkColorType shiftPerPixel: 3\\n" |
| }, |
| "SkImageInfo_validRowBytes": { |
| "code": "void draw(SkCanvas* canvas) {\n SkImageInfo info = SkImageInfo::MakeN32Premul(16, 8);\n for (size_t rowBytes = 60; rowBytes < 72; rowBytes += sizeof(SkPMColor)) {\n SkDebugf(\"validRowBytes(%llu): %s\\n\", rowBytes, info.validRowBytes(rowBytes) ?\n \"true\" : \"false\");\n }\n}", |
| "hash": "c6b0f6a3f493cb08d9abcdefe12de245", |
| "file": "SkImageInfo_Reference", |
| "name": "SkImageInfo::validRowBytes", |
| "stdout": "validRowBytes(60): false\\nvalidRowBytes(64): true\\nvalidRowBytes(68): true\\n" |
| }, |
| "SkImage_MakeFromRaster": { |
| "code": "static void releaseProc(const void* pixels, SkImage::ReleaseContext context) {\n int* countPtr = static_cast<int*>(context);\n *countPtr += 1;\n}\n\nvoid draw(SkCanvas* canvas) {\n SkColor color = 0;\n SkPixmap pixmap(SkImageInfo::MakeN32(1, 1, kPremul_SkAlphaType), &color, 4);\n int releaseCount = 0;\n sk_sp<SkImage> image(SkImage::MakeFromRaster(pixmap, releaseProc, &releaseCount));\n SkDebugf(\"before reset: %d\\n\", releaseCount);\n image.reset();\n SkDebugf(\"after reset: %d\\n\", releaseCount);\n}\n", |
| "hash": "275356b65d18c8868f4434137350cddc", |
| "file": "SkImage_Reference", |
| "name": "SkImage::MakeFromRaster", |
| "stdout": "before reset: 0\\nafter reset: 1\\n" |
| }, |
| "SkImage_dimensions": { |
| "code": "void draw(SkCanvas* canvas) {\n SkISize dimensions = image->dimensions();\n SkIRect bounds = image->bounds();\n SkIRect dimensionsAsBounds = SkIRect::MakeSize(dimensions);\n SkDebugf(\"dimensionsAsBounds %c= bounds\\n\", dimensionsAsBounds == bounds ? '=' : '!');\n}", |
| "hash": "96b4bc43b3667df9ba9e2dafb770d33c", |
| "file": "SkImage_Reference", |
| "name": "SkImage::dimensions()", |
| "stdout": "dimensionsAsBounds == bounds\\n" |
| }, |
| "SkImage_isAlphaOnly": { |
| "code": "void draw(SkCanvas* canvas) {\n uint8_t pmColors = 0;\n sk_sp<SkImage> image = SkImage::MakeRasterCopy({SkImageInfo::MakeA8(1, 1), &pmColors, 1});\n SkDebugf(\"alphaOnly = %s\\n\", image->isAlphaOnly() ? \"true\" : \"false\");\n}", |
| "hash": "50762c73b8ea91959c5a7b68fbf1062d", |
| "file": "SkImage_Reference", |
| "name": "SkImage::isAlphaOnly", |
| "stdout": "alphaOnly = true\\n" |
| }, |
| "SkImage_isOpaque": { |
| "code": "void draw(SkCanvas* canvas) {\n auto check_isopaque = [](const SkImageInfo& imageInfo) -> void {\n auto surface(SkSurface::MakeRaster(imageInfo));\n auto image(surface->makeImageSnapshot());\n SkDebugf(\"isOpaque = %s\\n\", image->isOpaque() ? \"true\" : \"false\");\n };\n check_isopaque(SkImageInfo::MakeN32Premul(5, 5));\n check_isopaque(SkImageInfo::MakeN32(5, 5, kOpaque_SkAlphaType));\n}", |
| "hash": "e3340460003b74ee286d625e68589d65", |
| "file": "SkImage_Reference", |
| "name": "SkImage::isOpaque", |
| "stdout": "isOpaque = false\\nisOpaque = true\\n" |
| }, |
| "SkImage_peekPixels": { |
| "code": "void draw(SkCanvas* canvas) {\n SkBitmap bitmap;\n bitmap.allocPixels(SkImageInfo::MakeN32Premul(12, 11));\n SkCanvas offscreen(bitmap);\n offscreen.clear(SK_ColorWHITE);\n SkPaint paint;\n offscreen.drawString(\"%\", 1, 10, paint);\n sk_sp<SkImage> image = SkImage::MakeFromBitmap(bitmap);\n SkPixmap pixmap;\n if (image->peekPixels(&pixmap)) {\n const SkPMColor* pixels = pixmap.addr32();\n SkPMColor pmWhite = pixels[0];\n for (int y = 0; y < image->height(); ++y) {\n for (int x = 0; x < image->width(); ++x) {\n SkDebugf(\"%c\", *pixels++ == pmWhite ? '-' : 'x');\n }\n SkDebugf(\"\\n\");\n }\n }\n}", |
| "hash": "900c0eab8dfdecd8301ed5be95887f8e", |
| "file": "SkImage_Reference", |
| "name": "SkImage::peekPixels", |
| "stdout": "------------\\n--xx----x---\\n-x--x--x----\\n-x--x--x----\\n-x--x-x-----\\n--xx-xx-xx--\\n-----x-x--x-\\n----x--x--x-\\n----x--x--x-\\n---x----xx--\\n------------\\n" |
| }, |
| "SkMatrix_I": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix m1, m2, m3;\n m1.reset();\n m2.setIdentity();\n m3 = SkMatrix::I();\n SkDebugf(\"m1 %c= m2\\n\", m1 == m2 ? '=' : '!');\n SkDebugf(\"m2 %c= m3\\n\", m1 == m2 ? '=' : '!');\n}", |
| "hash": "d961d91020f19037204a8c3fd8cb1060", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::I", |
| "stdout": "m1 == m2\\nm2 == m3\\n" |
| }, |
| "SkMatrix_InvalidMatrix": { |
| "code": "void draw(SkCanvas* canvas) {\n SkDebugf(\"scaleX %g\\n\", SkMatrix::InvalidMatrix().getScaleX());\n}", |
| "hash": "af0b72360c1c7a25b4754bfa47011dd5", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::InvalidMatrix", |
| "stdout": "scaleX 3.40282e+38\\n" |
| }, |
| "SkMatrix_MakeRectToRect": { |
| "code": "void draw(SkCanvas* canvas) {\n const SkRect srcs[] = { {0, 0, 0, 0}, {1, 2, 3, 4} };\n const SkRect dsts[] = { {0, 0, 0, 0}, {5, 6, 8, 9} };\n for (auto src : srcs) {\n for (auto dst : dsts) {\n SkMatrix matrix = SkMatrix::MakeRectToRect(src, dst, SkMatrix::kFill_ScaleToFit);\n SkDebugf(\"src: %g, %g, %g, %g dst: %g, %g, %g, %g\\n\",\n src.fLeft, src.fTop, src.fRight, src.fBottom,\n dst.fLeft, dst.fTop, dst.fRight, dst.fBottom);\n matrix.dump();\n }\n }\n}", |
| "hash": "a1d6a6721b39350f81021f71a1b93208", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::MakeRectToRect", |
| "stdout": "src: 0, 0, 0, 0 dst: 0, 0, 0, 0\\n[ 1.0000 0.0000 0.0000][ 0.0000 1.0000 0.0000][ 0.0000 0.0000 1.0000]\\nsrc: 0, 0, 0, 0 dst: 5, 6, 8, 9\\n[ 1.0000 0.0000 0.0000][ 0.0000 1.0000 0.0000][ 0.0000 0.0000 1.0000]\\nsrc: 1, 2, 3, 4 dst: 0, 0, 0, 0\\n[ 0.0000 0.0000 0.0000][ 0.0000 0.0000 0.0000][ 0.0000 0.0000 1.0000]\\nsrc: 1, 2, 3, 4 dst: 5, 6, 8, 9\\n[ 1.5000 0.0000 3.5000][ 0.0000 1.5000 3.0000][ 0.0000 0.0000 1.0000]\\n" |
| }, |
| "SkMatrix_SetAffineIdentity": { |
| "code": "void draw(SkCanvas* canvas) {\n SkScalar affine[6];\n SkMatrix::SetAffineIdentity(affine);\n const char* names[] = { \"ScaleX\", \"SkewY\", \"SkewX\", \"ScaleY\", \"TransX\", \"TransY\" };\n for (int i = 0; i < 6; ++i) {\n SkDebugf(\"%s: %g \", names[i], affine[i]);\n }\n SkDebugf(\"\\n\");\n}", |
| "hash": "e10adbd0bcc940c5d4d872db0e78e892", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::SetAffineIdentity", |
| "stdout": "ScaleX: 1 SkewY: 0 SkewX: 0 ScaleY: 1 TransX: 0 TransY: 0 \\n" |
| }, |
| "SkMatrix_TypeMask": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkMatrix& matrix) -> void {\n SkString typeMask;\n typeMask += SkMatrix::kIdentity_Mask == matrix.getType() ? \"kIdentity_Mask \" : \"\";\n typeMask += SkMatrix::kTranslate_Mask & matrix.getType() ? \"kTranslate_Mask \" : \"\";\n typeMask += SkMatrix::kScale_Mask & matrix.getType() ? \"kScale_Mask \" : \"\";\n typeMask += SkMatrix::kAffine_Mask & matrix.getType() ? \"kAffine_Mask \" : \"\";\n typeMask += SkMatrix::kPerspective_Mask & matrix.getType() ? \"kPerspective_Mask\" : \"\";\n SkDebugf(\"after %s: %s\\n\", prefix, typeMask.c_str());\n };\nSkMatrix matrix;\nmatrix.reset();\ndebugster(\"reset\", matrix);\nmatrix.postTranslate(1, 0);\ndebugster(\"postTranslate\", matrix);\nmatrix.postScale(2, 1);\ndebugster(\"postScale\", matrix);\nmatrix.postRotate(45);\ndebugster(\"postScale\", matrix);\nSkPoint polys[][4] = {{{0, 0}, {0, 1}, {1, 1}, {1, 0}}, {{0, 0}, {0, 1}, {2, 1}, {1, 0}}};\nmatrix.setPolyToPoly(polys[0], polys[1], 4);\ndebugster(\"setPolyToPoly\", matrix);\n}", |
| "hash": "ba19b36df8cd78586f3dff54e2d4c093", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::TypeMask", |
| "stdout": "after reset: kIdentity_Mask \\nafter postTranslate: kTranslate_Mask \\nafter postScale: kTranslate_Mask kScale_Mask \\nafter postScale: kTranslate_Mask kScale_Mask kAffine_Mask \\nafter setPolyToPoly: kTranslate_Mask kScale_Mask kAffine_Mask kPerspective_Mask\\n" |
| }, |
| "SkMatrix_array1_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n matrix.setIdentity();\n SkDebugf(\"with identity matrix: x = %g\\n\", matrix.mapXY(24, 42).fX);\n SkScalar& skewRef = matrix[SkMatrix::kMSkewX];\n skewRef = 0;\n SkDebugf(\"after skew x mod: x = %g\\n\", matrix.mapXY(24, 42).fX);\n skewRef = 1;\n SkDebugf(\"after 2nd skew x mod: x = %g\\n\", matrix.mapXY(24, 42).fX);\n matrix.dirtyMatrixTypeCache();\n SkDebugf(\"after dirty cache: x = %g\\n\", matrix.mapXY(24, 42).fX);\n}", |
| "hash": "f4365ef332f51f7fd25040e0771ba9a2", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::operator[](int index)", |
| "stdout": "with identity matrix: x = 24\\nafter skew x mod: x = 24\\nafter 2nd skew x mod: x = 24\\nafter dirty cache: x = 66\\n" |
| }, |
| "SkMatrix_array_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n matrix.setScale(42, 24);\n SkDebugf(\"matrix[SkMatrix::kMScaleX] %c= 42\\n\", matrix[SkMatrix::kMScaleX] == 42 ? '=' : '!');\n SkDebugf(\"matrix[SkMatrix::kMScaleY] %c= 24\\n\", matrix[SkMatrix::kMScaleY] == 24 ? '=' : '!');\n}", |
| "hash": "e8740493abdf0c6341762db9cee56b89", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::operator[](int index) const", |
| "stdout": "matrix[SkMatrix::kMScaleX] == 42\\nmatrix[SkMatrix::kMScaleY] == 24\\n" |
| }, |
| "SkMatrix_asAffine": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n matrix.setAll(2, 3, 4, 5, 6, 7, 0, 0, 1);\n SkScalar affine[6];\n if (matrix.asAffine(affine)) {\n const char* names[] = { \"ScaleX\", \"SkewY\", \"SkewX\", \"ScaleY\", \"TransX\", \"TransY\" };\n for (int i = 0; i < 6; ++i) {\n SkDebugf(\"%s: %g \", names[i], affine[i]);\n }\n SkDebugf(\"\\n\");\n }\n}", |
| "hash": "3325bdf82bd86d9fbc4199f248afa82c", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::asAffine", |
| "stdout": "ScaleX: 2 SkewY: 5 SkewX: 3 ScaleY: 6 TransX: 4 TransY: 7 \\n" |
| }, |
| "SkMatrix_cheapEqualTo": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkMatrix& a, const SkMatrix& b) -> void {\n SkDebugf(\"%s: a %c= b a.cheapEqualTo(b): %s\\n\", prefix,\n a == b ? '=' : '!', a.cheapEqualTo(b) ? \"true\" : \"false\");\n };\n SkMatrix a, b;\n a.setAll(1, 0, 0, 0, 1, 0, 0, 0, 1);\n b.setIdentity();\n debugster(\"identity\", a, b);\n a.setAll(1, -0.0f, 0, 0, 1, 0, 0, 0, 1);\n debugster(\"neg zero\", a, b);\n a.setAll(1, SK_ScalarNaN, 0, 0, 1, 0, 0, 0, 1);\n debugster(\" one NaN\", a, b);\n b.setAll(1, SK_ScalarNaN, 0, 0, 1, 0, 0, 0, 1);\n debugster(\"both NaN\", a, b);\n}", |
| "hash": "39016b3cfc6bbabb09348a53822ce508", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::cheapEqualTo", |
| "stdout": "identity: a == b a.cheapEqualTo(b): true\\nneg zero: a == b a.cheapEqualTo(b): false\\n one NaN: a != b a.cheapEqualTo(b): false\\nboth NaN: a != b a.cheapEqualTo(b): true\\n" |
| }, |
| "SkMatrix_decomposeScale": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n matrix.setRotate(90 * SK_Scalar1);\n matrix.postScale(1.f / 4, 1.f / 2);\n matrix.dump();\n SkSize scale = {SK_ScalarNaN, SK_ScalarNaN};\n SkMatrix remaining;\n remaining.reset();\n bool success = matrix.decomposeScale(&scale, &remaining);\n SkDebugf(\"success: %s \", success ? \"true\" : \"false\");\n SkDebugf(\"scale: %g, %g\\n\", scale.width(), scale.height());\n remaining.dump();\n SkMatrix scaleMatrix = SkMatrix::MakeScale(scale.width(), scale.height());\n SkMatrix combined = SkMatrix::Concat(scaleMatrix, remaining);\n combined.dump();\n}", |
| "hash": "139b874da0a3ede1f3df88119085c0aa", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::decomposeScale", |
| "stdout": "[ 0.0000 -0.2500 0.0000][ 0.5000 0.0000 0.0000][ 0.0000 0.0000 1.0000]\\nsuccess: true scale: 0.5, 0.25\\n[ 0.0000 -0.5000 0.0000][ 2.0000 0.0000 0.0000][ 0.0000 0.0000 1.0000]\\n[ 0.0000 -0.2500 0.0000][ 0.5000 0.0000 0.0000][ 0.0000 0.0000 1.0000]\\n" |
| }, |
| "SkMatrix_dirtyMatrixTypeCache": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n matrix.setIdentity();\n SkDebugf(\"with identity matrix: x = %g\\n\", matrix.mapXY(24, 42).fX);\n SkScalar& skewRef = matrix[SkMatrix::kMSkewX];\n skewRef = 0;\n SkDebugf(\"after skew x mod: x = %g\\n\", matrix.mapXY(24, 42).fX);\n skewRef = 1;\n SkDebugf(\"after 2nd skew x mod: x = %g\\n\", matrix.mapXY(24, 42).fX);\n matrix.dirtyMatrixTypeCache();\n SkDebugf(\"after dirty cache: x = %g\\n\", matrix.mapXY(24, 42).fX);\n}", |
| "hash": "f4365ef332f51f7fd25040e0771ba9a2", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::dirtyMatrixTypeCache", |
| "stdout": "with identity matrix: x = 24\\nafter skew x mod: x = 24\\nafter 2nd skew x mod: x = 24\\nafter dirty cache: x = 66\\n" |
| }, |
| "SkMatrix_dump": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n matrix.setRotate(45);\n matrix.dump();\n SkMatrix nearlyEqual;\n nearlyEqual.setAll(0.7071f, -0.7071f, 0, 0.7071f, 0.7071f, 0, 0, 0, 1);\n nearlyEqual.dump();\n SkDebugf(\"matrix %c= nearlyEqual\\n\", matrix == nearlyEqual ? '=' : '!');\n}", |
| "hash": "8d72a4818e5a9188348f6c08ab5d8a40", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::dump()", |
| "stdout": "[ 0.7071 -0.7071 0.0000][ 0.7071 0.7071 0.0000][ 0.0000 0.0000 1.0000]\\n[ 0.7071 -0.7071 0.0000][ 0.7071 0.7071 0.0000][ 0.0000 0.0000 1.0000]\\nmatrix != nearlyEqual\\n" |
| }, |
| "SkMatrix_equal_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkMatrix& a, const SkMatrix& b) -> void {\n SkDebugf(\"%s: a %c= b a.cheapEqualTo(b): %s\\n\", prefix,\n a == b ? '=' : '!', a.cheapEqualTo(b) ? \"true\" : \"false\");\n };\n SkMatrix a, b;\n a.setAll(1, 0, 0, 0, 1, 0, 0, 0, 1);\n b.setScale(2, 4);\n b.postScale(0.5f, 0.25f);\n debugster(\"identity\", a, b);\n}", |
| "hash": "3902859150b0f0c4aeb1f25d00434baa", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::operator==(const SkMatrix& a, const SkMatrix& b)", |
| "stdout": "identity: a == b a.cheapEqualTo(b): true\\n" |
| }, |
| "SkMatrix_get": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n matrix.setSkew(42, 24);\n SkDebugf(\"matrix.get(SkMatrix::kMSkewX) %c= 42\\n\",\n matrix.get(SkMatrix::kMSkewX) == 42 ? '=' : '!');\n SkDebugf(\"matrix.get(SkMatrix::kMSkewY) %c= 24\\n\",\n matrix.get(SkMatrix::kMSkewY) == 24 ? '=' : '!');\n}", |
| "hash": "f5ed382bd04fa7d50b2398cce2fca23a", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::get()", |
| "stdout": "matrix.get(SkMatrix::kMSkewX) == 42\\nmatrix.get(SkMatrix::kMSkewY) == 24\\n" |
| }, |
| "SkMatrix_get9": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix = SkMatrix::MakeRectToRect({0, 0, 1, 1}, {3, 4, 7, 9},\n SkMatrix::kFill_ScaleToFit);\n SkScalar b[9];\n matrix.get9(b);\n SkDebugf(\"{%g, %g, %g},\\n{%g, %g, %g},\\n{%g, %g, %g}\\n\", b[0], b[1], b[2],\n b[3], b[4], b[5], b[6], b[7], b[8]);\n}", |
| "hash": "379fc375e011050b54ed9df83c0996a7", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::get9", |
| "stdout": "{4, 0, 3},\\n{0, 5, 4},\\n{0, 0, 1}\\n" |
| }, |
| "SkMatrix_getMaxScale": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n matrix.setScale(42, 24);\n SkDebugf(\"matrix.getMaxScale() %g\\n\", matrix.getMaxScale());\n}", |
| "hash": "3fee4364929899649cf9efc37897e964", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::getMaxScale", |
| "stdout": "matrix.getMaxScale() 42\\n" |
| }, |
| "SkMatrix_getMinScale": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n matrix.setScale(42, 24);\n SkDebugf(\"matrix.getMinScale() %g\\n\", matrix.getMinScale());\n}", |
| "hash": "1d6f67904c88a806c3731879e9af4ae5", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::getMinScale", |
| "stdout": "matrix.getMinScale() 24\\n" |
| }, |
| "SkMatrix_getScaleX": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n matrix.setScale(42, 24);\n SkDebugf(\"matrix.getScaleX() %c= 42\\n\", matrix.getScaleX() == 42 ? '=' : '!');\n}", |
| "hash": "ab746d9be63975041ae8e50cba84dc3d", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::getScaleX", |
| "stdout": "matrix.getScaleX() == 42\\n" |
| }, |
| "SkMatrix_getScaleY": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n matrix.setScale(42, 24);\n SkDebugf(\"matrix.getScaleY() %c= 24\\n\", matrix.getScaleY() == 24 ? '=' : '!');\n}", |
| "hash": "708b1a548a2f8661b2ab570782fbc751", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::getScaleY", |
| "stdout": "matrix.getScaleY() == 24\\n" |
| }, |
| "SkMatrix_getSkewX": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n matrix.setSkew(42, 24);\n SkDebugf(\"matrix.getSkewX() %c= 42\\n\", matrix.getSkewX() == 42 ? '=' : '!');\n}", |
| "hash": "df3a5d3c688e7597eae1e4e07bf91ae6", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::getSkewX", |
| "stdout": "matrix.getSkewX() == 42\\n" |
| }, |
| "SkMatrix_getSkewY": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n matrix.setSkew(42, 24);\n SkDebugf(\"matrix.getSkewY() %c= 24\\n\", matrix.getSkewY() == 24 ? '=' : '!');\n}", |
| "hash": "6be5704506d029ffc91ba03b1d3e674b", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::getSkewY", |
| "stdout": "matrix.getSkewY() == 24\\n" |
| }, |
| "SkMatrix_getTranslateX": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n matrix.setTranslate(42, 24);\n SkDebugf(\"matrix.getTranslateX() %c= 42\\n\", matrix.getTranslateX() == 42 ? '=' : '!');\n}", |
| "hash": "6236f7f2b91aff977a66ba2ee2558ca4", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::getTranslateX", |
| "stdout": "matrix.getTranslateX() == 42\\n" |
| }, |
| "SkMatrix_getTranslateY": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n matrix.setTranslate(42, 24);\n SkDebugf(\"matrix.getTranslateY() %c= 24\\n\", matrix.getTranslateY() == 24 ? '=' : '!');\n}", |
| "hash": "08464e32d22421d2b254c71a84545ef5", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::getTranslateY", |
| "stdout": "matrix.getTranslateY() == 24\\n" |
| }, |
| "SkMatrix_getType": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n matrix.setAll(1, 0, 0, 0, 1, 0, 0, 0, 1);\n SkDebugf(\"identity flags hex: %0x decimal: %d\\n\", matrix.getType(), matrix.getType());\n matrix.setAll(1, 0, 0, 0, 1, 0, 0, 0, .5f);\n SkDebugf(\"set all flags hex: %0x decimal: %d\\n\", matrix.getType(), matrix.getType());\n}", |
| "hash": "8e45fe2dd52731bb2d4318686257e1d7", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::getType", |
| "stdout": "identity flags hex: 0 decimal: 0\\nset all flags hex: f decimal: 15\\n" |
| }, |
| "SkMatrix_isFinite": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix = SkMatrix::MakeTrans(SK_ScalarNaN, 0);\n matrix.dump();\n SkDebugf(\"matrix is finite: %s\\n\", matrix.isFinite() ? \"true\" : \"false\");\n SkDebugf(\"matrix %c= matrix\\n\", matrix == matrix ? '=' : '!');\n}", |
| "hash": "bc6c6f6a5df770287120d87f81b922eb", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::isFinite", |
| "stdout": "[ 1.0000 0.0000 nan][ 0.0000 1.0000 0.0000][ 0.0000 0.0000 1.0000]\\nmatrix is finite: false\\nmatrix != matrix\\n" |
| }, |
| "SkMatrix_isFixedStepInX": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n for (SkScalar px : { 0.0f, 0.1f } ) {\n for (SkScalar py : { 0.0f, 0.1f } ) {\n for (SkScalar sy : { 1, 2 } ) {\n matrix.setAll(1, 0, 0, 0, sy, 0, px, py, 1);\n matrix.dump();\n SkDebugf(\"isFixedStepInX: %s\\n\", matrix.isFixedStepInX() ? \"true\" : \"false\");\n }\n }\n }\n}", |
| "hash": "ab57b232acef69f26de9cb23d23c8a1a", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::isFixedStepInX", |
| "stdout": "[ 1.0000 0.0000 0.0000][ 0.0000 1.0000 0.0000][ 0.0000 0.0000 1.0000]\\nisFixedStepInX: true\\n[ 1.0000 0.0000 0.0000][ 0.0000 2.0000 0.0000][ 0.0000 0.0000 1.0000]\\nisFixedStepInX: true\\n[ 1.0000 0.0000 0.0000][ 0.0000 1.0000 0.0000][ 0.0000 0.1000 1.0000]\\nisFixedStepInX: true\\n[ 1.0000 0.0000 0.0000][ 0.0000 2.0000 0.0000][ 0.0000 0.1000 1.0000]\\nisFixedStepInX: true\\n[ 1.0000 0.0000 0.0000][ 0.0000 1.0000 0.0000][ 0.1000 0.0000 1.0000]\\nisFixedStepInX: false\\n[ 1.0000 0.0000 0.0000][ 0.0000 2.0000 0.0000][ 0.1000 0.0000 1.0000]\\nisFixedStepInX: false\\n[ 1.0000 0.0000 0.0000][ 0.0000 1.0000 0.0000][ 0.1000 0.1000 1.0000]\\nisFixedStepInX: false\\n[ 1.0000 0.0000 0.0000][ 0.0000 2.0000 0.0000][ 0.1000 0.1000 1.0000]\\nisFixedStepInX: false\\n" |
| }, |
| "SkMatrix_isIdentity": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n matrix.setAll(1, 0, 0, 0, 1, 0, 0, 0, 1);\n SkDebugf(\"is identity: %s\\n\", matrix.isIdentity() ? \"true\" : \"false\");\n matrix.setAll(1, 0, 0, 0, 1, 0, 0, 0, 2);\n SkDebugf(\"is identity: %s\\n\", matrix.isIdentity() ? \"true\" : \"false\");\n}", |
| "hash": "780ab376325b3cfa889ea26c0769ec11", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::isIdentity", |
| "stdout": "is identity: true\\nis identity: false\\n" |
| }, |
| "SkMatrix_isScaleTranslate": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n for (SkScalar scaleX : { 1, 2 } ) {\n for (SkScalar translateX : { 0, 20 } ) {\n matrix.setAll(scaleX, 0, translateX, 0, 1, 0, 0, 0, 1);\n SkDebugf(\"is scale-translate: %s\\n\", matrix.isScaleTranslate() ? \"true\" : \"false\");\n }\n }\n}", |
| "hash": "6287e29674a487eb94174992d45b9a34", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::isScaleTranslate", |
| "stdout": "is scale-translate: true\\nis scale-translate: true\\nis scale-translate: true\\nis scale-translate: true\\n" |
| }, |
| "SkMatrix_isTranslate": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n for (SkScalar scaleX : { 1, 2 } ) {\n for (SkScalar translateX : { 0, 20 } ) {\n matrix.setAll(scaleX, 0, translateX, 0, 1, 0, 0, 0, 1);\n SkDebugf(\"is translate: %s\\n\", matrix.isTranslate() ? \"true\" : \"false\");\n }\n }\n}", |
| "hash": "73ac71a8a30841873577c11c6c9b38ee", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::isTranslate", |
| "stdout": "is translate: true\\nis translate: true\\nis translate: false\\nis translate: false\\n" |
| }, |
| "SkMatrix_notequal_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkMatrix& a, const SkMatrix& b) -> void {\n SkDebugf(\"%s: a %c= b a.cheapEqualTo(b): %s\\n\", prefix,\n a != b ? '!' : '=', a.cheapEqualTo(b) ? \"true\" : \"false\");\n };\n SkMatrix a, b;\n a.setAll(1, 0, 0, 0, 1, 0, 1, 0, 1);\n if (a.invert(&b)) {\n debugster(\"identity\", a, b);\n }\n}", |
| "hash": "088ab41f877599f980a99523749b0afd", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::operator!=(const SkMatrix& a, const SkMatrix& b)", |
| "stdout": "identity: a != b a.cheapEqualTo(b): false\\n" |
| }, |
| "SkMatrix_preservesAxisAlignment": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n for (SkScalar angle: { 0, 90, 180, 270 } ) {\n matrix.setRotate(angle);\n SkDebugf(\"preservesAxisAlignment: %s\\n\", matrix.preservesAxisAlignment() ? \"true\" : \"false\");\n }\n}", |
| "hash": "7a234c96608fb7cb8135b9940b0b15f7", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::preservesAxisAlignment", |
| "stdout": "preservesAxisAlignment: true\\npreservesAxisAlignment: true\\npreservesAxisAlignment: true\\npreservesAxisAlignment: true\\n" |
| }, |
| "SkMatrix_rectStaysRect": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n for (SkScalar angle: { 0, 90, 180, 270 } ) {\n matrix.setRotate(angle);\n SkDebugf(\"rectStaysRect: %s\\n\", matrix.rectStaysRect() ? \"true\" : \"false\");\n }\n}", |
| "hash": "ce5319c036c9b5086da8a0009fe409f8", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::rectStaysRect", |
| "stdout": "rectStaysRect: true\\nrectStaysRect: true\\nrectStaysRect: true\\nrectStaysRect: true\\n" |
| }, |
| "SkMatrix_reset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix m;\n m.reset();\n SkDebugf(\"m.isIdentity(): %s\\n\", m.isIdentity() ? \"true\" : \"false\");\n}", |
| "hash": "ca94f7922bc37ef03bbc51ad70536fcf", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::reset()", |
| "stdout": "m.isIdentity(): true\\n" |
| }, |
| "SkMatrix_set": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n matrix.setIdentity();\n SkDebugf(\"with identity matrix: x = %g\\n\", matrix.mapXY(24, 42).fX);\n matrix.set(SkMatrix::kMSkewX, 0);\n SkDebugf(\"after skew x mod: x = %g\\n\", matrix.mapXY(24, 42).fX);\n matrix.set(SkMatrix::kMSkewX, 1);\n SkDebugf(\"after 2nd skew x mod: x = %g\\n\", matrix.mapXY(24, 42).fX);\n}", |
| "hash": "1d400a92ca826cc89bcb88ea051f28c8", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::set()", |
| "stdout": "with identity matrix: x = 24\\nafter skew x mod: x = 24\\nafter 2nd skew x mod: x = 66\\n" |
| }, |
| "SkMatrix_setAffine": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n matrix.setAll(2, 3, 4, 5, 6, 7, 0, 0, 1);\n SkScalar affine[6];\n if (matrix.asAffine(affine)) {\n const char* names[] = { \"ScaleX\", \"SkewY\", \"SkewX\", \"ScaleY\", \"TransX\", \"TransY\" };\n for (int i = 0; i < 6; ++i) {\n SkDebugf(\"%s: %g \", names[i], affine[i]);\n }\n SkDebugf(\"\\n\");\n matrix.reset();\n matrix.setAffine(affine);\n matrix.dump();\n }\n}", |
| "hash": "f5b6d371c4d65e5b5ac6eebdd4b237d8", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::setAffine", |
| "stdout": "ScaleX: 2 SkewY: 5 SkewX: 3 ScaleY: 6 TransX: 4 TransY: 7 \\n[ 2.0000 3.0000 4.0000][ 5.0000 6.0000 7.0000][ 0.0000 0.0000 1.0000]\\n" |
| }, |
| "SkMatrix_setIdentity": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix m;\n m.setIdentity();\n SkDebugf(\"m.isIdentity(): %s\\n\", m.isIdentity() ? \"true\" : \"false\");\n}", |
| "hash": "3979c865bb482e6ef1fafc71e56bbb91", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::setIdentity", |
| "stdout": "m.isIdentity(): true\\n" |
| }, |
| "SkMatrix_setRectToRect": { |
| "code": "void draw(SkCanvas* canvas) {\n const SkRect srcs[] = { {0, 0, 0, 0}, {1, 2, 3, 4} };\n const SkRect dsts[] = { {0, 0, 0, 0}, {5, 6, 8, 9} };\n for (auto src : srcs) {\n for (auto dst : dsts) {\n SkMatrix matrix;\n matrix.setAll(-1, -1, -1, -1, -1, -1, -1, -1, -1);\n bool success = matrix.setRectToRect(src, dst, SkMatrix::kFill_ScaleToFit);\n SkDebugf(\"src: %g, %g, %g, %g dst: %g, %g, %g, %g success: %s\\n\",\n src.fLeft, src.fTop, src.fRight, src.fBottom,\n dst.fLeft, dst.fTop, dst.fRight, dst.fBottom, success ? \"true\" : \"false\");\n matrix.dump();\n }\n }\n}", |
| "hash": "69cdea599dcaaec35efcb24403f4287b", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::setRectToRect", |
| "stdout": "src: 0, 0, 0, 0 dst: 0, 0, 0, 0 success: false\\n[ 1.0000 0.0000 0.0000][ 0.0000 1.0000 0.0000][ 0.0000 0.0000 1.0000]\\nsrc: 0, 0, 0, 0 dst: 5, 6, 8, 9 success: false\\n[ 1.0000 0.0000 0.0000][ 0.0000 1.0000 0.0000][ 0.0000 0.0000 1.0000]\\nsrc: 1, 2, 3, 4 dst: 0, 0, 0, 0 success: true\\n[ 0.0000 0.0000 0.0000][ 0.0000 0.0000 0.0000][ 0.0000 0.0000 1.0000]\\nsrc: 1, 2, 3, 4 dst: 5, 6, 8, 9 success: true\\n[ 1.5000 0.0000 3.5000][ 0.0000 1.5000 3.0000][ 0.0000 0.0000 1.0000]\\n" |
| }, |
| "SkMatrix_setScaleTranslate": { |
| "code": "void draw(SkCanvas* canvas) {\n SkMatrix matrix;\n matrix.setScaleTranslate(1, 2, 3, 4);\n matrix.dump();\n}", |
| "hash": "fed43797f13796529cb6731385d6f8f3", |
| "file": "SkMatrix_Reference", |
| "name": "SkMatrix::setScaleTranslate", |
| "stdout": "[ 1.0000 0.0000 3.0000][ 0.0000 2.0000 4.0000][ 0.0000 0.0000 1.0000]\\n" |
| }, |
| "SkPaint_containsText": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n const uint16_t goodGlyph = 511;\n const uint16_t zeroGlyph = 0;\n const uint16_t badGlyph = 65535; // larger than glyph count in font\n paint.setTextEncoding(SkTextEncoding::kGlyphID);\n SkDebugf(\"0x%04x %c= has glyph\\n\", goodGlyph,\n paint.containsText(&goodGlyph, 2) ? '=' : '!');\n SkDebugf(\"0x%04x %c= has glyph\\n\", zeroGlyph,\n paint.containsText(&zeroGlyph, 2) ? '=' : '!');\n SkDebugf(\"0x%04x %c= has glyph\\n\", badGlyph,\n paint.containsText(&badGlyph, 2) ? '=' : '!');\n}", |
| "hash": "6a68cb3c8b81a5976c81ee004f559247", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::containsText", |
| "stdout": "0x01ff == has glyph\\n0x0000 != has glyph\\n0xffff == has glyph\\n" |
| }, |
| "SkPaint_copy_const_SkPaint": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1;\n paint1.setColor(SK_ColorRED);\n SkPaint paint2(paint1);\n paint2.setColor(SK_ColorBLUE);\n SkDebugf(\"SK_ColorRED %c= paint1.getColor()\\n\", SK_ColorRED == paint1.getColor() ? '=' : '!');\n SkDebugf(\"SK_ColorBLUE %c= paint2.getColor()\\n\", SK_ColorBLUE == paint2.getColor() ? '=' : '!');\n}", |
| "hash": "b99971ad0ef243d617925289d963b62d", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::SkPaint(const SkPaint& paint)", |
| "stdout": "SK_ColorRED == paint1.getColor()\\nSK_ColorBLUE == paint2.getColor()\\n" |
| }, |
| "SkPaint_copy_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1, paint2;\n paint1.setColor(SK_ColorRED);\n paint2 = paint1;\n SkDebugf(\"SK_ColorRED %c= paint1.getColor()\\n\", SK_ColorRED == paint1.getColor() ? '=' : '!');\n SkDebugf(\"SK_ColorRED %c= paint2.getColor()\\n\", SK_ColorRED == paint2.getColor() ? '=' : '!');\n}", |
| "hash": "b476a9088f80dece176ed577807d3992", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::operator=(const SkPaint& paint)", |
| "stdout": "SK_ColorRED == paint1.getColor()\\nSK_ColorRED == paint2.getColor()\\n" |
| }, |
| "SkPaint_countText": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n const uint8_t utf8[] = { 0x24, 0xC2, 0xA2, 0xE2, 0x82, 0xAC, 0xC2, 0xA5, 0xC2, 0xA3 };\n SkDebugf(\"count = %d\\n\", paint.countText(utf8, sizeof(utf8)));\n}", |
| "hash": "85436c71aab5410767fc688ab0573e09", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::countText", |
| "stdout": "count = 5\\n" |
| }, |
| "SkPaint_equal_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1, paint2;\n paint1.setColor(SK_ColorRED);\n paint2.setColor(0xFFFF0000);\n SkDebugf(\"paint1 %c= paint2\\n\", paint1 == paint2 ? '=' : '!');\n float intervals[] = { 5, 5 };\n paint1.setPathEffect(SkDashPathEffect::Make(intervals, 2, 2.5f));\n paint2.setPathEffect(SkDashPathEffect::Make(intervals, 2, 2.5f));\n SkDebugf(\"paint1 %c= paint2\\n\", paint1 == paint2 ? '=' : '!');\n}", |
| "hash": "7481a948e34672720337a631830586dd", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::operator==(const SkPaint& a, const SkPaint& b)", |
| "stdout": "paint1 == paint2\\npaint1 != paint2\\n" |
| }, |
| "SkPaint_getAlpha": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"255 %c= paint.getAlpha()\\n\", 255 == paint.getAlpha() ? '=' : '!');\n}", |
| "hash": "9a85bb62fe3d877b18fb7f952c4fa7f7", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getAlpha", |
| "stdout": "255 == paint.getAlpha()\\n" |
| }, |
| "SkPaint_getBlendMode": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"kSrcOver %c= getBlendMode\\n\",\n SkBlendMode::kSrcOver == paint.getBlendMode() ? '=' : '!');\n paint.setBlendMode(SkBlendMode::kSrc);\n SkDebugf(\"kSrcOver %c= getBlendMode\\n\",\n SkBlendMode::kSrcOver == paint.getBlendMode() ? '=' : '!');\n}\n", |
| "hash": "a1e059c8f6740fa2044cc64152b39dda", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getBlendMode", |
| "stdout": "kSrcOver == getBlendMode\\nkSrcOver != getBlendMode\\n" |
| }, |
| "SkPaint_getColor": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setColor(SK_ColorYELLOW);\n SkColor y = paint.getColor();\n SkDebugf(\"Yellow is %d%% red, %d%% green, and %d%% blue.\\n\", (int) (SkColorGetR(y) / 2.55f),\n (int) (SkColorGetG(y) / 2.55f), (int) (SkColorGetB(y) / 2.55f));\n}", |
| "hash": "72d41f890203109a41f589a7403acae9", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getColor", |
| "stdout": "Yellow is 100% red, 100% green, and 0% blue.\\n" |
| }, |
| "SkPaint_getColor4f": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setColor(SK_ColorYELLOW);\n SkColor4f y = paint.getColor4f();\n SkDebugf(\"Yellow is %d%% red, %d%% green, and %d%% blue.\\n\", (int) (y.fR * 100),\n (int) (y.fG * 100), (int) (y.fB * 100));\n}", |
| "hash": "8512ea2176f36e8f1aeef311ff228790", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getColor4f", |
| "stdout": "Yellow is 100% red, 100% green, and 0% blue.\\n" |
| }, |
| "SkPaint_getColorFilter": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"nullptr %c= color filter\\n\", paint.getColorFilter() ? '!' : '=');\n paint.setColorFilter(SkColorFilter::MakeModeFilter(SK_ColorLTGRAY, SkBlendMode::kSrcIn));\n SkDebugf(\"nullptr %c= color filter\\n\", paint.getColorFilter() ? '!' : '=');\n}\n", |
| "hash": "093bdc627d6b59002670fd290931f6c9", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getColorFilter", |
| "stdout": "nullptr == color filter\\nnullptr != color filter\\n" |
| }, |
| "SkPaint_getDrawLooper": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"nullptr %c= draw looper\\n\", paint.getDrawLooper() ? '!' : '=');\n SkLayerDrawLooper::Builder looperBuilder;\n paint.setDrawLooper(looperBuilder.detach());\n SkDebugf(\"nullptr %c= draw looper\\n\", paint.getDrawLooper() ? '!' : '=');\n}\n", |
| "hash": "af4c5acc7a91e7f23c2af48018903ad4", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getDrawLooper", |
| "stdout": "nullptr == draw looper\\nnullptr != draw looper\\n" |
| }, |
| "SkPaint_getFilterQuality": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"kNone_SkFilterQuality %c= paint.getFilterQuality()\\n\",\n kNone_SkFilterQuality == paint.getFilterQuality() ? '=' : '!');\n}", |
| "hash": "d4ca1f23809b6835c4ba46ea98a86900", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getFilterQuality", |
| "stdout": "kNone_SkFilterQuality == paint.getFilterQuality()\\n" |
| }, |
| "SkPaint_getFlags": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setAntiAlias(true);\n SkDebugf(\"(SkPaint::kAntiAlias_Flag & paint.getFlags()) %c= 0\\n\",\n SkPaint::kAntiAlias_Flag & paint.getFlags() ? '!' : '=');\n}", |
| "hash": "8a3f8c309533388b01aa66e1267f322d", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getFlags", |
| "stdout": "(SkPaint::kAntiAlias_Flag & paint.getFlags()) != 0\\n" |
| }, |
| "SkPaint_getFontSpacing": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n for (SkScalar textSize : { 12, 18, 24, 32 } ) {\n paint.setTextSize(textSize);\n SkDebugf(\"textSize: %g fontSpacing: %g\\n\", textSize, paint.getFontSpacing());\n }\n}", |
| "hash": "424741e26e1b174e43087d67422ce14f", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getFontSpacing", |
| "stdout": "textSize: 12 fontSpacing: 13.9688\\ntextSize: 18 fontSpacing: 20.9531\\ntextSize: 24 fontSpacing: 27.9375\\ntextSize: 32 fontSpacing: 37.25\\n" |
| }, |
| "SkPaint_getHash": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1, paint2;\n paint1.setColor(SK_ColorRED);\n paint2.setColor(0xFFFF0000);\n SkDebugf(\"paint1 %c= paint2\\n\", paint1 == paint2 ? '=' : '!');\n SkDebugf(\"paint1.getHash() %c= paint2.getHash()\\n\",\n paint1.getHash() == paint2.getHash() ? '=' : '!');\n}", |
| "hash": "7f7e1b701361912b344f90ae6b530393", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getHash", |
| "stdout": "paint1 == paint2\\npaint1.getHash() == paint2.getHash()\\n" |
| }, |
| "SkPaint_getHinting": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"SkFontHinting::kNormal %c= paint.getHinting()\\n\",\n SkFontHinting::kNormal == paint.getHinting() ? '=' : ':');\n}", |
| "hash": "b56b70c7ea2453c41bfa58b626953bed", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getHinting", |
| "stdout": "SkFontHinting::kNormal == paint.getHinting()\\n" |
| }, |
| "SkPaint_getImageFilter": { |
| "code": "#include \"SkBlurImageFilter.h\"\n\nvoid draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"nullptr %c= image filter\\n\", paint.getImageFilter() ? '!' : '=');\n paint.setImageFilter(SkBlurImageFilter::Make(kOuter_SkBlurStyle, 3, nullptr, nullptr));\n SkDebugf(\"nullptr %c= image filter\\n\", paint.getImageFilter() ? '!' : '=');\n}\n", |
| "hash": "c11f8eaa1dd149bc18db21e23ce26904", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getImageFilter", |
| "stdout": "nullptr == image filter\\nnullptr != image filter\\n" |
| }, |
| "SkPaint_getMaskFilter": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"nullptr %c= mask filter\\n\", paint.getMaskFilter() ? '!' : '=');\n paint.setMaskFilter(SkMaskFilter::MakeBlur(kOuter_SkBlurStyle, 3));\n SkDebugf(\"nullptr %c= mask filter\\n\", paint.getMaskFilter() ? '!' : '=');\n}\n", |
| "hash": "5ac4b31371726da87bb7390b385e9fee", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getMaskFilter", |
| "stdout": "nullptr == mask filter\\nnullptr != mask filter\\n" |
| }, |
| "SkPaint_getPathEffect": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"nullptr %c= path effect\\n\", paint.getPathEffect() ? '!' : '=');\n paint.setPathEffect(SkCornerPathEffect::Make(10));\n SkDebugf(\"nullptr %c= path effect\\n\", paint.getPathEffect() ? '!' : '=');\n}\n", |
| "hash": "211a1b14bfa6c4332082c8eab4fbc5fd", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getPathEffect", |
| "stdout": "nullptr == path effect\\nnullptr != path effect\\n" |
| }, |
| "SkPaint_getShader": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"nullptr %c= shader\\n\", paint.getShader() ? '!' : '=');\n paint.setShader(SkShader::MakeEmptyShader());\n SkDebugf(\"nullptr %c= shader\\n\", paint.getShader() ? '!' : '=');\n}\n", |
| "hash": "09f15b9fd88882850da2d235eb86292f", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getShader", |
| "stdout": "nullptr == shader\\nnullptr != shader\\n" |
| }, |
| "SkPaint_getStrokeCap": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"kButt_Cap %c= default stroke cap\\n\",\n SkPaint::kButt_Cap == paint.getStrokeCap() ? '=' : '!');\n}", |
| "hash": "aabf9baee8e026fae36fca30e955512b", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getStrokeCap", |
| "stdout": "kButt_Cap == default stroke cap\\n" |
| }, |
| "SkPaint_getStrokeJoin": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"kMiter_Join %c= default stroke join\\n\",\n SkPaint::kMiter_Join == paint.getStrokeJoin() ? '=' : '!');\n}", |
| "hash": "31bf751d0a8ddf176b871810820d8199", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getStrokeJoin", |
| "stdout": "kMiter_Join == default stroke join\\n" |
| }, |
| "SkPaint_getStrokeMiter": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"default miter limit == %g\\n\", paint.getStrokeMiter());\n}", |
| "hash": "50da74a43b725f07a914df588c867d36", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getStrokeMiter", |
| "stdout": "default miter limit == 4\\n" |
| }, |
| "SkPaint_getStrokeWidth": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"0 %c= paint.getStrokeWidth()\\n\", 0 == paint.getStrokeWidth() ? '=' : '!');\n}", |
| "hash": "99aa73f64df8bbf06e656cd891a81b9e", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getStrokeWidth", |
| "stdout": "0 == paint.getStrokeWidth()\\n" |
| }, |
| "SkPaint_getStyle": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"SkPaint::kFill_Style %c= paint.getStyle()\\n\",\n SkPaint::kFill_Style == paint.getStyle() ? '=' : '!');\n}", |
| "hash": "1c5e18c3c0102d2dac86a78ba8c8ce01", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getStyle", |
| "stdout": "SkPaint::kFill_Style == paint.getStyle()\\n" |
| }, |
| "SkPaint_getTextEncoding": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"SkTextEncoding::kUTF8 %c= text encoding\\n\",\n SkTextEncoding::kUTF8 == paint.getTextEncoding() ? '=' : '!');\n paint.setTextEncoding(SkTextEncoding::kGlyphID);\n SkDebugf(\"SkTextEncoding::kGlyphID %c= text encoding\\n\",\n SkTextEncoding::kGlyphID == paint.getTextEncoding() ? '=' : '!');\n}", |
| "hash": "0d21e968e9a4c78c902ae3ef494941a0", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getTextEncoding", |
| "stdout": "SkTextEncoding::kUTF8 == text encoding\\nSkTextEncoding::kGlyphID == text encoding\\n" |
| }, |
| "SkPaint_getTextScaleX": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"1 %c= default text scale x\\n\", 1 == paint.getTextScaleX() ? '=' : '!');\n}", |
| "hash": "5dc8e58f6910cb8e4de9ed60f888188b", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getTextScaleX", |
| "stdout": "1 == default text scale x\\n" |
| }, |
| "SkPaint_getTextSize": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"12 %c= default text size\\n\", 12 == paint.getTextSize() ? '=' : '!');\n}", |
| "hash": "983e2a71ba72d4ba8c945420040b8f1c", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getTextSize", |
| "stdout": "12 == default text size\\n" |
| }, |
| "SkPaint_getTextSkewX": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"0 %c= default text skew x\\n\", 0 == paint.getTextSkewX() ? '=' : '!');\n}", |
| "hash": "11c10f466dae0d1639dbb9f6a0040218", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getTextSkewX", |
| "stdout": "0 == default text skew x\\n" |
| }, |
| "SkPaint_getTypeface": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"nullptr %c= typeface\\n\", paint.getTypeface() ? '!' : '=');\n paint.setTypeface(SkTypeface::MakeFromName(\"monospace\", SkFontStyle()));\n SkDebugf(\"nullptr %c= typeface\\n\", paint.getTypeface() ? '!' : '=');\n}\n", |
| "hash": "5ce718e5a184baaac80e7098d7dad67b", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::getTypeface", |
| "stdout": "nullptr == typeface\\nnullptr != typeface\\n" |
| }, |
| "SkPaint_isAntiAlias": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"paint.isAntiAlias() %c= !!(paint.getFlags() & SkPaint::kAntiAlias_Flag)\\n\",\n paint.isAntiAlias() == !!(paint.getFlags() & SkPaint::kAntiAlias_Flag) ? '=' : '!');\n paint.setAntiAlias(true);\n SkDebugf(\"paint.isAntiAlias() %c= !!(paint.getFlags() & SkPaint::kAntiAlias_Flag)\\n\",\n paint.isAntiAlias() == !!(paint.getFlags() & SkPaint::kAntiAlias_Flag) ? '=' : '!');\n}", |
| "hash": "d7d5f4f7da7acd5104a652f490c6f7b8", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::isAntiAlias", |
| "stdout": "paint.isAntiAlias() == !!(paint.getFlags() & SkPaint::kAntiAlias_Flag)\\npaint.isAntiAlias() == !!(paint.getFlags() & SkPaint::kAntiAlias_Flag)\\n" |
| }, |
| "SkPaint_isAutohinted": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n for (auto forceAutoHinting : { false, true} ) {\n paint.setAutohinted(forceAutoHinting);\n SkDebugf(\"paint.isAutohinted() %c=\"\n \" !!(paint.getFlags() & SkPaint::kAutoHinting_Flag)\\n\",\n paint.isAutohinted() ==\n !!(paint.getFlags() & SkPaint::kAutoHinting_Flag) ? '=' : '!');\n }\n}", |
| "hash": "aa4781afbe3b90e7ef56a287e5b9ce1e", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::isAutohinted", |
| "stdout": "paint.isAutohinted() == !!(paint.getFlags() & SkPaint::kAutoHinting_Flag)\\npaint.isAutohinted() == !!(paint.getFlags() & SkPaint::kAutoHinting_Flag)\\n" |
| }, |
| "SkPaint_isDither": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"paint.isDither() %c= !!(paint.getFlags() & SkPaint::kDither_Flag)\\n\",\n paint.isDither() == !!(paint.getFlags() & SkPaint::kDither_Flag) ? '=' : '!');\n paint.setDither(true);\n SkDebugf(\"paint.isDither() %c= !!(paint.getFlags() & SkPaint::kDither_Flag)\\n\",\n paint.isDither() == !!(paint.getFlags() & SkPaint::kDither_Flag) ? '=' : '!');\n}", |
| "hash": "f4ce93f6c5e7335436a985377fd980c0", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::isDither", |
| "stdout": "paint.isDither() == !!(paint.getFlags() & SkPaint::kDither_Flag)\\npaint.isDither() == !!(paint.getFlags() & SkPaint::kDither_Flag)\\n" |
| }, |
| "SkPaint_isEmbeddedBitmapText": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"paint.isEmbeddedBitmapText() %c=\"\n \" !!(paint.getFlags() & SkPaint::kEmbeddedBitmapText_Flag)\\n\",\n paint.isEmbeddedBitmapText() ==\n !!(paint.getFlags() & SkPaint::kEmbeddedBitmapText_Flag) ? '=' : '!');\n paint.setEmbeddedBitmapText(true);\n SkDebugf(\"paint.isEmbeddedBitmapText() %c=\"\n \" !!(paint.getFlags() & SkPaint::kEmbeddedBitmapText_Flag)\\n\",\n paint.isEmbeddedBitmapText() ==\n !!(paint.getFlags() & SkPaint::kEmbeddedBitmapText_Flag) ? '=' : '!');\n}", |
| "hash": "eba10b27b790e87183ae451b3fc5c4b1", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::isEmbeddedBitmapText", |
| "stdout": "paint.isEmbeddedBitmapText() == !!(paint.getFlags() & SkPaint::kEmbeddedBitmapText_Flag)\\npaint.isEmbeddedBitmapText() == !!(paint.getFlags() & SkPaint::kEmbeddedBitmapText_Flag)\\n" |
| }, |
| "SkPaint_isFakeBoldText": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"paint.isFakeBoldText() %c= !!(paint.getFlags() & SkPaint::kFakeBoldText_Flag)\\n\",\n paint.isFakeBoldText() == !!(paint.getFlags() & SkPaint::kFakeBoldText_Flag) ? '=' : '!');\n paint.setFakeBoldText(true);\n SkDebugf(\"paint.isFakeBoldText() %c= !!(paint.getFlags() & SkPaint::kFakeBoldText_Flag)\\n\",\n paint.isFakeBoldText() == !!(paint.getFlags() & SkPaint::kFakeBoldText_Flag) ? '=' : '!');\n}", |
| "hash": "f54d1f85b16073b80b9eef2e1a1d151d", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::isFakeBoldText", |
| "stdout": "paint.isFakeBoldText() == !!(paint.getFlags() & SkPaint::kFakeBoldText_Flag)\\npaint.isFakeBoldText() == !!(paint.getFlags() & SkPaint::kFakeBoldText_Flag)\\n" |
| }, |
| "SkPaint_isLCDRenderText": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"paint.isLCDRenderText() %c= !!(paint.getFlags() & SkPaint::kLCDRenderText_Flag)\\n\",\n paint.isLCDRenderText() == !!(paint.getFlags() & SkPaint::kLCDRenderText_Flag) ? '=' : '!');\n paint.setLCDRenderText(true);\n SkDebugf(\"paint.isLCDRenderText() %c= !!(paint.getFlags() & SkPaint::kLCDRenderText_Flag)\\n\",\n paint.isLCDRenderText() == !!(paint.getFlags() & SkPaint::kLCDRenderText_Flag) ? '=' : '!');\n}", |
| "hash": "68e1fd95dd2fd06a333899d2bd2396b9", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::isLCDRenderText", |
| "stdout": "paint.isLCDRenderText() == !!(paint.getFlags() & SkPaint::kLCDRenderText_Flag)\\npaint.isLCDRenderText() == !!(paint.getFlags() & SkPaint::kLCDRenderText_Flag)\\n" |
| }, |
| "SkPaint_isSrcOver": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"isSrcOver %c= true\\n\", paint.isSrcOver() ? '=' : '!');\n paint.setBlendMode(SkBlendMode::kSrc);\n SkDebugf(\"isSrcOver %c= true\\n\", paint.isSrcOver() ? '=' : '!');\n}\n", |
| "hash": "257c9473db7a2b3a0fb2b9e2431e59a6", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::isSrcOver", |
| "stdout": "isSrcOver == true\\nisSrcOver != true\\n" |
| }, |
| "SkPaint_isSubpixelText": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"paint.isSubpixelText() %c= !!(paint.getFlags() & SkPaint::kSubpixelText_Flag)\\n\",\n paint.isSubpixelText() == !!(paint.getFlags() & SkPaint::kSubpixelText_Flag) ? '=' : '!');\n paint.setSubpixelText(true);\n SkDebugf(\"paint.isSubpixelText() %c= !!(paint.getFlags() & SkPaint::kSubpixelText_Flag)\\n\",\n paint.isSubpixelText() == !!(paint.getFlags() & SkPaint::kSubpixelText_Flag) ? '=' : '!');\n}", |
| "hash": "abe9afc0932e2199324ae6cbb396e67c", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::isSubpixelText", |
| "stdout": "paint.isSubpixelText() == !!(paint.getFlags() & SkPaint::kSubpixelText_Flag)\\npaint.isSubpixelText() == !!(paint.getFlags() & SkPaint::kSubpixelText_Flag)\\n" |
| }, |
| "SkPaint_measureText_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"default width = %g\\n\", paint.measureText(\"!\", 1));\n paint.setTextSize(paint.getTextSize() * 2);\n SkDebugf(\"double width = %g\\n\", paint.measureText(\"!\", 1));\n}", |
| "hash": "f1139a5ddd17fd47c2f45f6e642cac76", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::measureText_2", |
| "stdout": "default width = 5\\ndouble width = 10\\n" |
| }, |
| "SkPaint_move_SkPaint": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n float intervals[] = { 5, 5 };\n paint.setPathEffect(SkDashPathEffect::Make(intervals, SK_ARRAY_COUNT(intervals), 2.5f));\n SkPaint dashed(std::move(paint));\n SkDebugf(\"path effect unique: %s\\n\", dashed.getPathEffect()->unique() ? \"true\" : \"false\");\n}", |
| "hash": "8ed1488a503cd5282b86a51614aa90b1", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::SkPaint(SkPaint&& paint)", |
| "stdout": "path effect unique: true\\n" |
| }, |
| "SkPaint_move_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1, paint2;\n paint1.setColor(SK_ColorRED);\n paint2 = std::move(paint1);\n SkDebugf(\"SK_ColorRED == paint2.getColor()\\n\", SK_ColorRED == paint2.getColor() ? '=' : '!');\n}", |
| "hash": "9fb7459b097d713f5f1fe5675afe14f5", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::operator=(SkPaint&& paint)", |
| "stdout": "SK_ColorRED == paint2.getColor()\\n" |
| }, |
| "SkPaint_notequal_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1, paint2;\n paint1.setColor(SK_ColorRED);\n paint2.setColor(0xFFFF0000);\n SkDebugf(\"paint1 %c= paint2\\n\", paint1 == paint2 ? '=' : '!');\n SkDebugf(\"paint1 %c= paint2\\n\", paint1 != paint2 ? '!' : '=');\n}", |
| "hash": "b6c8484b1187f555b435ad5369833be4", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::operator!=(const SkPaint& a, const SkPaint& b)", |
| "stdout": "paint1 == paint2\\npaint1 == paint2\\n" |
| }, |
| "SkPaint_nothingToDraw": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkPaint& p) -> void {\n SkDebugf(\"%s nothing to draw: %s\\n\", prefix,\n p.nothingToDraw() ? \"true\" : \"false\");\n };\n SkPaint paint;\n debugster(\"initial\", paint);\n paint.setBlendMode(SkBlendMode::kDst);\n debugster(\"blend dst\", paint);\n paint.setBlendMode(SkBlendMode::kSrcOver);\n debugster(\"blend src over\", paint);\n paint.setAlpha(0);\n debugster(\"alpha 0\", paint);\n}\n", |
| "hash": "2973b05bfbb6b4c29332c8ac4fcf3995", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::nothingToDraw", |
| "stdout": "initial nothing to draw: false\\nblend dst nothing to draw: true\\nblend src over nothing to draw: false\\nalpha 0 nothing to draw: true\\n" |
| }, |
| "SkPaint_refColorFilter": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1, paint2;\n paint1.setColorFilter(SkColorFilter::MakeModeFilter(0xFFFF0000, SkBlendMode::kSrcATop));\n SkDebugf(\"color filter unique: %s\\n\", paint1.getColorFilter()->unique() ? \"true\" : \"false\");\n paint2.setColorFilter(paint1.refColorFilter());\n SkDebugf(\"color filter unique: %s\\n\", paint1.getColorFilter()->unique() ? \"true\" : \"false\");\n}\n", |
| "hash": "b588c95fa4c86ddbc4b0546762f08297", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::refColorFilter", |
| "stdout": "color filter unique: true\\ncolor filter unique: false\\n" |
| }, |
| "SkPaint_refDrawLooper": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1, paint2;\n SkLayerDrawLooper::Builder looperBuilder;\n paint1.setDrawLooper(looperBuilder.detach());\n SkDebugf(\"draw looper unique: %s\\n\", paint1.getDrawLooper()->unique() ? \"true\" : \"false\");\n paint2.setDrawLooper(paint1.refDrawLooper());\n SkDebugf(\"draw looper unique: %s\\n\", paint1.getDrawLooper()->unique() ? \"true\" : \"false\");\n}\n", |
| "hash": "2a3782c33f04ed17a725d0e449c6f7c3", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::refDrawLooper", |
| "stdout": "draw looper unique: true\\ndraw looper unique: false\\n" |
| }, |
| "SkPaint_refImageFilter": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1, paint2;\n paint1.setImageFilter(SkOffsetImageFilter::Make(25, 25, nullptr));\n SkDebugf(\"image filter unique: %s\\n\", paint1.getImageFilter()->unique() ? \"true\" : \"false\");\n paint2.setImageFilter(paint1.refImageFilter());\n SkDebugf(\"image filter unique: %s\\n\", paint1.getImageFilter()->unique() ? \"true\" : \"false\");\n}\n", |
| "hash": "13f09088b569251547107d14ae989dc1", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::refImageFilter", |
| "stdout": "image filter unique: true\\nimage filter unique: false\\n" |
| }, |
| "SkPaint_refMaskFilter": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1, paint2;\n paint1.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, 1));\n SkDebugf(\"mask filter unique: %s\\n\", paint1.getMaskFilter()->unique() ? \"true\" : \"false\");\n paint2.setMaskFilter(paint1.refMaskFilter());\n SkDebugf(\"mask filter unique: %s\\n\", paint1.getMaskFilter()->unique() ? \"true\" : \"false\");\n}\n", |
| "hash": "084b0dc3cebd78718c651d58f257f799", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::refMaskFilter", |
| "stdout": "mask filter unique: true\\nmask filter unique: false\\n" |
| }, |
| "SkPaint_refPathEffect": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1, paint2;\n SkScalar intervals[] = {1, 2};\n paint1.setPathEffect(SkDashPathEffect::Make(intervals, SK_ARRAY_COUNT(intervals), 10));\n SkDebugf(\"path effect unique: %s\\n\", paint1.getPathEffect()->unique() ? \"true\" : \"false\");\n paint2.setPathEffect(paint1.refPathEffect());\n SkDebugf(\"path effect unique: %s\\n\", paint1.getPathEffect()->unique() ? \"true\" : \"false\");\n}\n", |
| "hash": "f56039b94c702c2704c8c5100e623aca", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::refPathEffect", |
| "stdout": "path effect unique: true\\npath effect unique: false\\n" |
| }, |
| "SkPaint_refShader": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1, paint2;\n paint1.setShader(SkShader::MakeEmptyShader());\n SkDebugf(\"shader unique: %s\\n\", paint1.getShader()->unique() ? \"true\" : \"false\");\n paint2.setShader(paint1.refShader());\n SkDebugf(\"shader unique: %s\\n\", paint1.getShader()->unique() ? \"true\" : \"false\");\n}\n", |
| "hash": "53da0295972a418cbc9607bbb17feaa8", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::refShader", |
| "stdout": "shader unique: true\\nshader unique: false\\n" |
| }, |
| "SkPaint_refTypeface": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1, paint2;\n paint1.setTypeface(SkTypeface::MakeFromName(\"monospace\",\n SkFontStyle(SkFontStyle::kNormal_Weight, SkFontStyle::kNormal_Width,\n SkFontStyle::kItalic_Slant)));\n SkDebugf(\"typeface1 %c= typeface2\\n\",\n paint1.getTypeface() == paint2.getTypeface() ? '=' : '!');\n paint2.setTypeface(paint1.refTypeface());\n SkDebugf(\"typeface1 %c= typeface2\\n\",\n paint1.getTypeface() == paint2.getTypeface() ? '=' : '!');\n}\n", |
| "hash": "8b5aa7e555a0dc31be69db7cadf471a1", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::refTypeface", |
| "stdout": "typeface1 != typeface2\\ntypeface1 == typeface2\\n" |
| }, |
| "SkPaint_reset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1, paint2;\n paint1.setColor(SK_ColorRED);\n paint1.reset();\n SkDebugf(\"paint1 %c= paint2\", paint1 == paint2 ? '=' : '!');\n}", |
| "hash": "ef269937ade7e7353635121d9a64f9f7", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::reset()", |
| "stdout": "paint1 == paint2" |
| }, |
| "SkPaint_setARGB": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint transRed1, transRed2;\n transRed1.setARGB(255 / 2, 255, 0, 0);\n transRed2.setColor(SkColorSetARGB(255 / 2, 255, 0, 0));\n SkDebugf(\"transRed1 %c= transRed2\", transRed1 == transRed2 ? '=' : '!');\n}", |
| "hash": "cb62e4755789ed32f7120dc55984959d", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setARGB", |
| "stdout": "transRed1 == transRed2" |
| }, |
| "SkPaint_setAlpha": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setColor(0x00112233);\n paint.setAlpha(0x44);\n SkDebugf(\"0x44112233 %c= paint.getColor()\\n\", 0x44112233 == paint.getColor() ? '=' : '!');\n}", |
| "hash": "6ddc0360512dfb9947e75c17e6a8103d", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setAlpha", |
| "stdout": "0x44112233 == paint.getColor()\\n" |
| }, |
| "SkPaint_setAntiAlias": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1, paint2;\n paint1.setAntiAlias(true);\n paint2.setFlags(paint2.getFlags() | SkPaint::kAntiAlias_Flag);\n SkDebugf(\"paint1 %c= paint2\\n\", paint1 == paint2 ? '=' : '!');\n}", |
| "hash": "c2ff148374d01cbef845b223e725905c", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setAntiAlias", |
| "stdout": "paint1 == paint2\\n" |
| }, |
| "SkPaint_setBlendMode": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"isSrcOver %c= true\\n\", paint.isSrcOver() ? '=' : '!');\n paint.setBlendMode(SkBlendMode::kSrc);\n SkDebugf(\"isSrcOver %c= true\\n\", paint.isSrcOver() ? '=' : '!');\n}\n", |
| "hash": "257c9473db7a2b3a0fb2b9e2431e59a6", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setBlendMode", |
| "stdout": "isSrcOver == true\\nisSrcOver != true\\n" |
| }, |
| "SkPaint_setColor": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint green1, green2;\n unsigned a = 255;\n unsigned r = 0;\n unsigned g = 255;\n unsigned b = 0;\n green1.setColor((a << 24) + (r << 16) + (g << 8) + (b << 0));\n green2.setColor(0xFF00FF00);\n SkDebugf(\"green1 %c= green2\\n\", green1 == green2 ? '=' : '!');\n}", |
| "hash": "6e70f18300bd676a3c056ceb6b62f8df", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setColor", |
| "stdout": "green1 == green2\\n" |
| }, |
| "SkPaint_setColor4f": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint green1, green2;\n green1.setColor4f({0, 1, 0, 1}, nullptr); // R=0 G=1 B=0 A=1\n green2.setColor(0xFF00FF00); // A=255 R=0 G=255 B=0\n SkDebugf(\"green1 %c= green2\\n\", green1 == green2 ? '=' : '!');\n}", |
| "hash": "fa60859e3d03bdc117a05b32e093a8f1", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setColor4f", |
| "stdout": "green1 == green2\\n" |
| }, |
| "SkPaint_setDither": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1, paint2;\n paint1.setDither(true);\n paint2.setFlags(paint2.getFlags() | SkPaint::kDither_Flag);\n SkDebugf(\"paint1 %c= paint2\\n\", paint1 == paint2 ? '=' : '!');\n}", |
| "hash": "69b7162e8324d9239dd02dd9ada2bdff", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setDither", |
| "stdout": "paint1 == paint2\\n" |
| }, |
| "SkPaint_setEmbeddedBitmapText": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1, paint2;\n paint1.setEmbeddedBitmapText(true);\n paint2.setFlags(paint2.getFlags() | SkPaint::kEmbeddedBitmapText_Flag);\n SkDebugf(\"paint1 %c= paint2\\n\", paint1 == paint2 ? '=' : '!');\n}", |
| "hash": "246dffdd93a484ba4ad7ecf71198a5d4", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setEmbeddedBitmapText", |
| "stdout": "paint1 == paint2\\n" |
| }, |
| "SkPaint_setFakeBoldText": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1, paint2;\n paint1.setFakeBoldText(true);\n paint2.setFlags(paint2.getFlags() | SkPaint::kFakeBoldText_Flag);\n SkDebugf(\"paint1 %c= paint2\\n\", paint1 == paint2 ? '=' : '!');\n}", |
| "hash": "594d47858eb11028cb626515a520910a", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setFakeBoldText", |
| "stdout": "paint1 == paint2\\n" |
| }, |
| "SkPaint_setFilterQuality": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setFilterQuality(kHigh_SkFilterQuality);\n SkDebugf(\"kHigh_SkFilterQuality %c= paint.getFilterQuality()\\n\",\n kHigh_SkFilterQuality == paint.getFilterQuality() ? '=' : '!');\n}", |
| "hash": "e4288fabf24ee60b645e8bb6ea0afadf", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setFilterQuality", |
| "stdout": "kHigh_SkFilterQuality == paint.getFilterQuality()\\n" |
| }, |
| "SkPaint_setFlags": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setFlags((uint32_t) (SkPaint::kAntiAlias_Flag | SkPaint::kDither_Flag));\n SkDebugf(\"paint.isAntiAlias()\\n\", paint.isAntiAlias() ? '!' : '=');\n SkDebugf(\"paint.isDither()\\n\", paint.isDither() ? '!' : '=');\n}", |
| "hash": "54baed3f6bc4b9c31ba664e27767fdc7", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setFlags", |
| "stdout": "paint.isAntiAlias()\\npaint.isDither()\\n" |
| }, |
| "SkPaint_setHinting": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1, paint2;\n paint2.setHinting(SkFontHinting::kNormal);\n SkDebugf(\"paint1 %c= paint2\\n\", paint1 == paint2 ? '=' : ':');\n}", |
| "hash": "bb179ec5698ec1398ff18f3657ab73f7", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setHinting", |
| "stdout": "paint1 == paint2\\n" |
| }, |
| "SkPaint_setLCDRenderText": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1, paint2;\n paint1.setLCDRenderText(true);\n paint2.setFlags(paint2.getFlags() | SkPaint::kLCDRenderText_Flag);\n SkDebugf(\"paint1 %c= paint2\\n\", paint1 == paint2 ? '=' : '!');\n}", |
| "hash": "50dedf8450159571a3edaf4f0050defe", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setLCDRenderText", |
| "stdout": "paint1 == paint2\\n" |
| }, |
| "SkPaint_setStrokeCap": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setStrokeCap(SkPaint::kRound_Cap);\n paint.setStrokeCap((SkPaint::Cap) SkPaint::kCapCount);\n SkDebugf(\"kRound_Cap %c= paint.getStrokeCap()\\n\",\n SkPaint::kRound_Cap == paint.getStrokeCap() ? '=' : '!');\n}", |
| "hash": "de83fbd848a4625345b4b87a6e55d98a", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setStrokeCap", |
| "stdout": "kRound_Cap == paint.getStrokeCap()\\n" |
| }, |
| "SkPaint_setStrokeJoin": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setStrokeJoin(SkPaint::kMiter_Join);\n paint.setStrokeJoin((SkPaint::Join) SkPaint::kJoinCount);\n SkDebugf(\"kMiter_Join %c= paint.getStrokeJoin()\\n\",\n SkPaint::kMiter_Join == paint.getStrokeJoin() ? '=' : '!');\n}", |
| "hash": "48d963ad4286eddf680f9c511eb6da91", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setStrokeJoin", |
| "stdout": "kMiter_Join == paint.getStrokeJoin()\\n" |
| }, |
| "SkPaint_setStrokeMiter": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setStrokeMiter(8);\n paint.setStrokeMiter(-1);\n SkDebugf(\"default miter limit == %g\\n\", paint.getStrokeMiter());\n}", |
| "hash": "700b284dbc97785c6a9c9636088713ad", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setStrokeMiter", |
| "stdout": "default miter limit == 8\\n" |
| }, |
| "SkPaint_setStrokeWidth": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setStrokeWidth(5);\n paint.setStrokeWidth(-1);\n SkDebugf(\"5 %c= paint.getStrokeWidth()\\n\", 5 == paint.getStrokeWidth() ? '=' : '!');\n}", |
| "hash": "0c4446c0870b5c7b5a2efe77ff92afb8", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setStrokeWidth", |
| "stdout": "5 == paint.getStrokeWidth()\\n" |
| }, |
| "SkPaint_setSubpixelText": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint1, paint2;\n paint1.setSubpixelText(true);\n paint2.setFlags(paint2.getFlags() | SkPaint::kSubpixelText_Flag);\n SkDebugf(\"paint1 %c= paint2\\n\", paint1 == paint2 ? '=' : '!');\n}", |
| "hash": "a77bbc1a4e3be9a8ab0f842f877c5ee4", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setSubpixelText", |
| "stdout": "paint1 == paint2\\n" |
| }, |
| "SkPaint_setTextEncoding": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextEncoding((SkTextEncoding) 4);\n SkDebugf(\"4 %c= text encoding\\n\", (SkTextEncoding) 4 == paint.getTextEncoding() ? '=' : '!');\n}", |
| "hash": "a5d1ba0dbf42afb797ffdb07647b5cb9", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setTextEncoding", |
| "stdout": "4 != text encoding\\n" |
| }, |
| "SkPaint_setTextScaleX": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextScaleX(0.f / 0.f);\n SkDebugf(\"text scale %s-a-number\\n\", SkScalarIsNaN(paint.getTextScaleX()) ? \"not\" : \"is\");\n}", |
| "hash": "a75bbdb8bb866b125c4c1dd5e967d470", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setTextScaleX", |
| "stdout": "text scale not-a-number\\n" |
| }, |
| "SkPaint_setTextSize": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n SkDebugf(\"12 %c= text size\\n\", 12 == paint.getTextSize() ? '=' : '!');\n paint.setTextSize(-20);\n SkDebugf(\"12 %c= text size\\n\", 12 == paint.getTextSize() ? '=' : '!');\n}", |
| "hash": "6510c9e2f57b83c47e67829e7a68d493", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setTextSize", |
| "stdout": "12 == text size\\n12 == text size\\n" |
| }, |
| "SkPaint_setTextSkewX": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setTextScaleX(1.f / 0.f);\n SkDebugf(\"text scale %s-finite\\n\", SkScalarIsFinite(paint.getTextScaleX()) ? \"is\" : \"not\");\n}", |
| "hash": "6bd705a6e0c5f8ee24f302fe531bfabc", |
| "file": "SkPaint_Reference", |
| "name": "SkPaint::setTextSkewX", |
| "stdout": "text scale not-finite\\n" |
| }, |
| "SkPath_ConvertToNonInverseFillType": { |
| "code": "#define nameValue(fill) { SkPath::fill, #fill }\n\nvoid draw(SkCanvas* canvas) {\n struct {\n SkPath::FillType fill;\n const char* name;\n } fills[] = {\n nameValue(kWinding_FillType),\n nameValue(kEvenOdd_FillType),\n nameValue(kInverseWinding_FillType),\n nameValue(kInverseEvenOdd_FillType),\n };\n for (unsigned i = 0; i < SK_ARRAY_COUNT(fills); ++i) {\n if (fills[i].fill != (SkPath::FillType) i) {\n SkDebugf(\"fills array order does not match FillType enum order\");\n break;\n }\n SkDebugf(\"ConvertToNonInverseFillType(%s) == %s\\n\", fills[i].name,\n fills[(int) SkPath::ConvertToNonInverseFillType(fills[i].fill)].name);\n }\n}\n", |
| "hash": "319f6b124458dcc0f9ce4d7bbde65810", |
| "file": "SkPath_Reference", |
| "name": "SkPath::ConvertToNonInverseFillType", |
| "stdout": "ConvertToNonInverseFillType(kWinding_FillType) == kWinding_FillType\\nConvertToNonInverseFillType(kEvenOdd_FillType) == kEvenOdd_FillType\\nConvertToNonInverseFillType(kInverseWinding_FillType) == kWinding_FillType\\nConvertToNonInverseFillType(kInverseEvenOdd_FillType) == kEvenOdd_FillType\\n" |
| }, |
| "SkPath_IsCubicDegenerate": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPoint points[] = {{1, 0}, {0, 0}, {0, 0}, {0, 0}};\n SkScalar step = 1;\n SkScalar prior, length = 0, degenerate = 0;\n do {\n prior = points[0].fX;\n step /= 2;\n if (SkPath::IsCubicDegenerate(points[0], points[1], points[2], points[3], false)) {\n degenerate = prior;\n points[0].fX += step;\n } else {\n length = prior;\n points[0].fX -= step;\n }\n } while (prior != points[0].fX);\n SkDebugf(\"%1.8g is degenerate\\n\", degenerate);\n SkDebugf(\"%1.8g is length\\n\", length);\n}\n", |
| "hash": "6b97099acdae80b16df0c4241f593991", |
| "file": "SkPath_Reference", |
| "name": "SkPath::IsCubicDegenerate", |
| "stdout": "0.00024414062 is degenerate\\n0.00024414065 is length\\n" |
| }, |
| "SkPath_IsInverseFillType": { |
| "code": "#define nameValue(fill) { SkPath::fill, #fill }\n\nvoid draw(SkCanvas* canvas) {\n struct {\n SkPath::FillType fill;\n const char* name;\n } fills[] = {\n nameValue(kWinding_FillType),\n nameValue(kEvenOdd_FillType),\n nameValue(kInverseWinding_FillType),\n nameValue(kInverseEvenOdd_FillType),\n };\n for (auto fill: fills ) {\n SkDebugf(\"IsInverseFillType(%s) == %s\\n\", fill.name, SkPath::IsInverseFillType(fill.fill) ?\n \"true\" : \"false\");\n }\n}\n", |
| "hash": "1453856a9d0c73e8192bf298c4143563", |
| "file": "SkPath_Reference", |
| "name": "SkPath::IsInverseFillType", |
| "stdout": "IsInverseFillType(kWinding_FillType) == false\\nIsInverseFillType(kEvenOdd_FillType) == false\\nIsInverseFillType(kInverseWinding_FillType) == true\\nIsInverseFillType(kInverseEvenOdd_FillType) == true\\n" |
| }, |
| "SkPath_IsLineDegenerate": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPoint points[] = { {100, 100}, {100.000001f, 100.000001f}, {100.0001f, 100.0001f} };\n for (size_t i = 0; i < SK_ARRAY_COUNT(points) - 1; ++i) {\n for (bool exact : { false, true } ) {\n SkDebugf(\"line from (%1.8g,%1.8g) to (%1.8g,%1.8g) is %s\" \"degenerate, %s\\n\",\n points[i].fX, points[i].fY, points[i + 1].fX, points[i + 1].fY,\n SkPath::IsLineDegenerate(points[i], points[i + 1], exact)\n ? \"\" : \"not \", exact ? \"exactly\" : \"nearly\");\n }\n }\n}\n", |
| "hash": "97a031f9186ade586928563840ce9116", |
| "file": "SkPath_Reference", |
| "name": "SkPath::IsLineDegenerate", |
| "stdout": "line from (100,100) to (100,100) is degenerate, nearly\\nline from (100,100) to (100,100) is degenerate, exactly\\nline from (100,100) to (100.0001,100.0001) is degenerate, nearly\\nline from (100,100) to (100.0001,100.0001) is not degenerate, exactly\\n" |
| }, |
| "SkPath_IsQuadDegenerate": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const SkPath& path, bool exact) -> void {\n SkDebugf(\"quad (%1.8g,%1.8g), (%1.8g,%1.8g), (%1.8g,%1.8g) is %s\" \"degenerate, %s\\n\",\n path.getPoint(0).fX, path.getPoint(0).fY, path.getPoint(1).fX,\n path.getPoint(1).fY, path.getPoint(2).fX, path.getPoint(2).fY,\n SkPath::IsQuadDegenerate(path.getPoint(0), path.getPoint(1), path.getPoint(2), exact) ?\n \"\" : \"not \", exact ? \"exactly\" : \"nearly\");\n };\n SkPath path, offset;\n path.moveTo({100, 100});\n path.quadTo({100.00001f, 100.00001f}, {100.00002f, 100.00002f});\n offset.addPath(path, 1000, 1000);\n for (bool exact : { false, true } ) {\n debugster(path, exact);\n debugster(offset, exact);\n }\n}\n", |
| "hash": "a2b255a7dac1926cc3a247d318d63c62", |
| "file": "SkPath_Reference", |
| "name": "SkPath::IsQuadDegenerate", |
| "stdout": "quad (100,100), (100.00001,100.00001), (100.00002,100.00002) is degenerate, nearly\\nquad (1100,1100), (1100,1100), (1100,1100) is degenerate, nearly\\nquad (100,100), (100.00001,100.00001), (100.00002,100.00002) is not degenerate, exactly\\nquad (1100,1100), (1100,1100), (1100,1100) is degenerate, exactly\\n" |
| }, |
| "SkPath_Iter_Iter": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath::Iter iter;\n SkPoint points[4];\n SkDebugf(\"iter is \" \"%s\" \"done\\n\", SkPath::kDone_Verb == iter.next(points) ? \"\" : \"not \");\n SkPath path;\n iter.setPath(path, false);\n SkDebugf(\"iter is \" \"%s\" \"done\\n\", SkPath::kDone_Verb == iter.next(points) ? \"\" : \"not \");\n}\n", |
| "hash": "01648775cb9b354b2f1836dad82a25ab", |
| "file": "SkPath_Reference", |
| "name": "SkPath::Iter::Iter()", |
| "stdout": "iter is done\\niter is done\\n" |
| }, |
| "SkPath_Iter_conicWeight": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path;\n path.conicTo(1, 2, 3, 4, .5f);\n SkPath::Iter iter(path, false);\n SkPoint p[4];\n SkDebugf(\"first verb is \" \"%s\" \"move\\n\", SkPath::kMove_Verb == iter.next(p) ? \"\" : \"not \");\n SkDebugf(\"next verb is \" \"%s\" \"conic\\n\", SkPath::kConic_Verb == iter.next(p) ? \"\" : \"not \");\n SkDebugf(\"conic points: {%g,%g}, {%g,%g}, {%g,%g}\\n\", p[0].fX, p[0].fY, p[1].fX, p[1].fY,\n p[2].fX, p[2].fY);\n SkDebugf(\"conic weight: %g\\n\", iter.conicWeight());\n}\n", |
| "hash": "7cdea37741d50f0594c6244eb07fd175", |
| "file": "SkPath_Reference", |
| "name": "SkPath::Iter::conicWeight", |
| "stdout": "first verb is move\\nnext verb is conic\\nconic points: {0,0}, {1,2}, {3,4}\\nconic weight: 0.5\\n" |
| }, |
| "SkPath_Iter_const_SkPath": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, SkPath::Iter& iter) -> void {\n SkDebugf(\"%s:\\n\", prefix);\n const char* verbStr[] = { \"Move\", \"Line\", \"Quad\", \"Conic\", \"Cubic\", \"Close\", \"Done\" };\n const int pointCount[] = { 1 , 2 , 3 , 3 , 4 , 1 , 0 };\n SkPath::Verb verb;\n do {\n SkPoint points[4];\n verb = iter.next(points);\n SkDebugf(\"k%s_Verb \", verbStr[(int) verb]);\n for (int i = 0; i < pointCount[(int) verb]; ++i) {\n SkDebugf(\"{%g, %g}, \", points[i].fX, points[i].fY);\n }\n if (SkPath::kConic_Verb == verb) {\n SkDebugf(\"weight = %g\", iter.conicWeight());\n }\n SkDebugf(\"\\n\");\n } while (SkPath::kDone_Verb != verb);\n SkDebugf(\"\\n\");\n };\n SkPath path;\n path.quadTo(10, 20, 30, 40);\n SkPath::Iter openIter(path, false);\n debugster(\"open\", openIter);\n SkPath::Iter closedIter(path, true);\n debugster(\"closed\", closedIter);\n}\n", |
| "hash": "13044dbf68885c0f15322c0633b633a3", |
| "file": "SkPath_Reference", |
| "name": "SkPath::Iter::Iter(const SkPath& path, bool forceClose)", |
| "stdout": "open:\\nkMove_Verb {0, 0}, \\nkQuad_Verb {0, 0}, {10, 20}, {30, 40}, \\nkDone_Verb \\n\\nclosed:\\nkMove_Verb {0, 0}, \\nkQuad_Verb {0, 0}, {10, 20}, {30, 40}, \\nkLine_Verb {30, 40}, {0, 0}, \\nkClose_Verb {0, 0}, \\nkDone_Verb \\n\\n" |
| }, |
| "SkPath_Iter_isCloseLine": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path;\n path.moveTo(6, 7);\n path.conicTo(1, 2, 3, 4, .5f);\n path.close();\n SkPath::Iter iter(path, false);\n SkPoint p[4];\n SkDebugf(\"1st verb is \" \"%s\" \"move\\n\", SkPath::kMove_Verb == iter.next(p) ? \"\" : \"not \");\n SkDebugf(\"moveTo point: {%g,%g}\\n\", p[0].fX, p[0].fY);\n SkDebugf(\"2nd verb is \" \"%s\" \"conic\\n\", SkPath::kConic_Verb == iter.next(p) ? \"\" : \"not \");\n SkDebugf(\"3rd verb is \" \"%s\" \"line\\n\", SkPath::kLine_Verb == iter.next(p) ? \"\" : \"not \");\n SkDebugf(\"line points: {%g,%g}, {%g,%g}\\n\", p[0].fX, p[0].fY, p[1].fX, p[1].fY);\n SkDebugf(\"line \" \"%s\" \"generated by close\\n\", iter.isCloseLine() ? \"\" : \"not \");\n SkDebugf(\"4th verb is \" \"%s\" \"close\\n\", SkPath::kClose_Verb == iter.next(p) ? \"\" : \"not \");\n}\n", |
| "hash": "7000b501f49341629bfdd9f80e686103", |
| "file": "SkPath_Reference", |
| "name": "SkPath::Iter::isCloseLine", |
| "stdout": "1st verb is move\\nmoveTo point: {6,7}\\n2nd verb is conic\\n3rd verb is line\\nline points: {3,4}, {6,7}\\nline generated by close\\n4th verb is close\\n" |
| }, |
| "SkPath_Iter_isClosedContour": { |
| "code": "void draw(SkCanvas* canvas) {\n for (bool forceClose : { false, true } ) {\n SkPath path;\n path.conicTo(1, 2, 3, 4, .5f);\n SkPath::Iter iter(path, forceClose);\n SkDebugf(\"without close(), forceClose is %s: isClosedContour returns %s\\n\",\n forceClose ? \"true \" : \"false\", iter.isClosedContour() ? \"true\" : \"false\");\n path.close();\n iter.setPath(path, forceClose);\n SkDebugf(\"with close(), forceClose is %s: isClosedContour returns %s\\n\",\n forceClose ? \"true \" : \"false\", iter.isClosedContour() ? \"true\" : \"false\");\n }\n}\n", |
| "hash": "b0d48a6e949db1cb545216ae9c3c3c70", |
| "file": "SkPath_Reference", |
| "name": "SkPath::Iter::isClosedContour", |
| "stdout": "without close(), forceClose is false: isClosedContour returns false\\nwith close(), forceClose is false: isClosedContour returns true\\nwithout close(), forceClose is true : isClosedContour returns true\\nwith close(), forceClose is true : isClosedContour returns true\\n" |
| }, |
| "SkPath_Iter_next": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkPath& path, bool degen, bool exact) -> void {\n SkPath::Iter iter(path, false);\n SkDebugf(\"%s:\\n\", prefix);\n const char* verbStr[] = { \"Move\", \"Line\", \"Quad\", \"Conic\", \"Cubic\", \"Close\", \"Done\" };\n const int pointCount[] = { 1 , 2 , 3 , 3 , 4 , 1 , 0 };\n SkPath::Verb verb;\n do {\n SkPoint points[4];\n verb = iter.next(points, degen, exact);\n SkDebugf(\"k%s_Verb \", verbStr[(int) verb]);\n for (int i = 0; i < pointCount[(int) verb]; ++i) {\n SkDebugf(\"{%1.8g, %1.8g}, \", points[i].fX, points[i].fY);\n }\n SkDebugf(\"\\n\");\n } while (SkPath::kDone_Verb != verb);\n SkDebugf(\"\\n\");\n };\n SkPath path;\n path.moveTo(10, 10);\n path.moveTo(20, 20);\n path.quadTo(10, 20, 30, 40);\n path.moveTo(1, 1);\n path.close();\n path.moveTo(30, 30);\n path.lineTo(30, 30);\n path.moveTo(30, 30);\n path.lineTo(30.00001f, 30);\n debugster(\"skip degenerate\", path, true, false);\n debugster(\"skip degenerate if exact\", path, true, true);\n debugster(\"skip none\", path, false, false);\n}\n", |
| "hash": "00ae8984856486bdb626d0ed6587855a", |
| "file": "SkPath_Reference", |
| "name": "SkPath::Iter::next()", |
| "stdout": "skip degenerate:\\nkMove_Verb {20, 20}, \\nkQuad_Verb {20, 20}, {10, 20}, {30, 40}, \\nkDone_Verb \\n\\nskip degenerate if exact:\\nkMove_Verb {20, 20}, \\nkQuad_Verb {20, 20}, {10, 20}, {30, 40}, \\nkMove_Verb {30, 30}, \\nkLine_Verb {30, 30}, {30.00001, 30}, \\nkDone_Verb \\n\\nskip none:\\nkMove_Verb {10, 10}, \\nkMove_Verb {20, 20}, \\nkQuad_Verb {20, 20}, {10, 20}, {30, 40}, \\nkMove_Verb {1, 1}, \\nkClose_Verb {1, 1}, \\nkMove_Verb {30, 30}, \\nkLine_Verb {30, 30}, {30, 30}, \\nkMove_Verb {30, 30}, \\nkLine_Verb {30, 30}, {30.00001, 30}, \\nkDone_Verb \\n\\n" |
| }, |
| "SkPath_Iter_setPath": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, SkPath::Iter& iter) -> void {\n SkDebugf(\"%s:\\n\", prefix);\n const char* verbStr[] = { \"Move\", \"Line\", \"Quad\", \"Conic\", \"Cubic\", \"Close\", \"Done\" };\n const int pointCount[] = { 1 , 2 , 3 , 3 , 4 , 1 , 0 };\n SkPath::Verb verb;\n do {\n SkPoint points[4];\n verb = iter.next(points);\n SkDebugf(\"k%s_Verb \", verbStr[(int) verb]);\n for (int i = 0; i < pointCount[(int) verb]; ++i) {\n SkDebugf(\"{%g, %g}, \", points[i].fX, points[i].fY);\n }\n if (SkPath::kConic_Verb == verb) {\n SkDebugf(\"weight = %g\", iter.conicWeight());\n }\n SkDebugf(\"\\n\");\n } while (SkPath::kDone_Verb != verb);\n SkDebugf(\"\\n\");\n };\n SkPath path;\n path.quadTo(10, 20, 30, 40);\n SkPath::Iter iter(path, false);\n debugster(\"quad open\", iter);\n SkPath path2;\n path2.conicTo(1, 2, 3, 4, .5f);\n iter.setPath(path2, true);\n debugster(\"conic closed\", iter);\n}\n", |
| "hash": "6c9688008cea8937ad5cc188b38ecf16", |
| "file": "SkPath_Reference", |
| "name": "SkPath::Iter::setPath", |
| "stdout": "quad open:\\nkMove_Verb {0, 0}, \\nkQuad_Verb {0, 0}, {10, 20}, {30, 40}, \\nkDone_Verb \\n\\nconic closed:\\nkMove_Verb {0, 0}, \\nkConic_Verb {0, 0}, {1, 2}, {3, 4}, weight = 0.5\\nkLine_Verb {3, 4}, {0, 0}, \\nkClose_Verb {0, 0}, \\nkDone_Verb \\n\\n" |
| }, |
| "SkPath_RawIter_conicWeight": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path;\n path.conicTo(1, 2, 3, 4, .5f);\n SkPath::RawIter iter(path);\n SkPoint p[4];\n SkDebugf(\"first verb is \" \"%s\" \"move\\n\", SkPath::kMove_Verb == iter.next(p) ? \"\" : \"not \");\n SkDebugf(\"next verb is \" \"%s\" \"conic\\n\", SkPath::kConic_Verb == iter.next(p) ? \"\" : \"not \");\n SkDebugf(\"conic points: {%g,%g}, {%g,%g}, {%g,%g}\\n\", p[0].fX, p[0].fY, p[1].fX, p[1].fY,\n p[2].fX, p[2].fY);\n SkDebugf(\"conic weight: %g\\n\", iter.conicWeight());\n}\n", |
| "hash": "69f360a0ba8f40c51ef4cd9f972c5893", |
| "file": "SkPath_Reference", |
| "name": "SkPath::RawIter::conicWeight", |
| "stdout": "first verb is move\\nnext verb is conic\\nconic points: {0,0}, {1,2}, {3,4}\\nconic weight: 0.5\\n" |
| }, |
| "SkPath_RawIter_next": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path;\n path.moveTo(50, 60);\n path.quadTo(10, 20, 30, 40);\n path.close();\n path.lineTo(30, 30);\n path.conicTo(1, 2, 3, 4, .5f);\n path.cubicTo(-1, -2, -3, -4, -5, -6);\n SkPath::RawIter iter(path);\n const char* verbStr[] = { \"Move\", \"Line\", \"Quad\", \"Conic\", \"Cubic\", \"Close\", \"Done\" };\n const int pointCount[] = { 1 , 2 , 3 , 3 , 4 , 1 , 0 };\n SkPath::Verb verb;\n do {\n SkPoint points[4];\n verb = iter.next(points);\n SkDebugf(\"k%s_Verb \", verbStr[(int) verb]);\n for (int i = 0; i < pointCount[(int) verb]; ++i) {\n SkDebugf(\"{%1.8g, %1.8g}, \", points[i].fX, points[i].fY);\n }\n if (SkPath::kConic_Verb == verb) {\n SkDebugf(\"weight = %g\", iter.conicWeight());\n }\n SkDebugf(\"\\n\");\n } while (SkPath::kDone_Verb != verb);\n}\n", |
| "hash": "944a80c7ff8c04e1fecc4aec4a47ea60", |
| "file": "SkPath_Reference", |
| "name": "SkPath::RawIter::next()", |
| "stdout": "kMove_Verb {50, 60}, \\nkQuad_Verb {50, 60}, {10, 20}, {30, 40}, \\nkClose_Verb {50, 60}, \\nkMove_Verb {50, 60}, \\nkLine_Verb {50, 60}, {30, 30}, \\nkConic_Verb {30, 30}, {1, 2}, {3, 4}, weight = 0.5\\nkCubic_Verb {3, 4}, {-1, -2}, {-3, -4}, {-5, -6}, \\nkDone_Verb \\n" |
| }, |
| "SkPath_RawIter_peek": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path;\n path.quadTo(10, 20, 30, 40);\n path.conicTo(1, 2, 3, 4, .5f);\n path.cubicTo(1, 2, 3, 4, .5, 6);\n SkPath::RawIter iter(path);\n SkPath::Verb verb, peek = iter.peek();\n const char* verbStr[] = { \"Move\", \"Line\", \"Quad\", \"Conic\", \"Cubic\", \"Close\", \"Done\" };\n do {\n SkPoint points[4];\n verb = iter.next(points);\n SkDebugf(\"peek %s %c= verb %s\\n\", verbStr[peek], peek == verb ? '=' : '!', verbStr[verb]);\n peek = iter.peek();\n } while (SkPath::kDone_Verb != verb);\n SkDebugf(\"peek %s %c= verb %s\\n\", verbStr[peek], peek == verb ? '=' : '!', verbStr[verb]);\n}", |
| "hash": "eb5fa5bea23059ce538e883502f828f5", |
| "file": "SkPath_Reference", |
| "name": "SkPath::RawIter::peek()", |
| "stdout": "peek Move == verb Move\\npeek Quad == verb Quad\\npeek Conic == verb Conic\\npeek Cubic == verb Cubic\\npeek Done == verb Done\\npeek Done == verb Done\\n\\n" |
| }, |
| "SkPath_SegmentMask": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path;\n path.conicTo(10, 10, 20, 30, 1);\n SkDebugf(\"Path kConic_SegmentMask is %s\\n\", path.getSegmentMasks() &\n SkPath::kConic_SegmentMask ? \"set\" : \"clear\");\n SkDebugf(\"Path kQuad_SegmentMask is %s\\n\", path.getSegmentMasks() &\n SkPath::kQuad_SegmentMask ? \"set\" : \"clear\");\n}", |
| "hash": "a61e5758574e28190ec4ed8c4ae7e7fa", |
| "file": "SkPath_Reference", |
| "name": "SkPath::SegmentMask", |
| "stdout": "Path kConic_SegmentMask is clear\\nPath kQuad_SegmentMask is set\\n" |
| }, |
| "SkPath_Verb": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path;\n path.lineTo(20, 20);\n path.quadTo(-10, -10, 30, 30);\n path.close();\n path.cubicTo(1, 2, 3, 4, 5, 6);\n path.conicTo(0, 0, 0, 0, 2);\n uint8_t verbs[7];\n int count = path.getVerbs(verbs, (int) SK_ARRAY_COUNT(verbs));\n const char* verbStr[] = { \"Move\", \"Line\", \"Quad\", \"Conic\", \"Cubic\", \"Close\" };\n SkDebugf(\"verb count: %d\\nverbs: \", count);\n for (int i = 0; i < count; ++i) {\n SkDebugf(\"k%s_Verb \", verbStr[verbs[i]]);\n }\n SkDebugf(\"\\n\");\n}\n", |
| "hash": "799096fdc1298aa815934a74e76570ca", |
| "file": "SkPath_Reference", |
| "name": "SkPath::Verb", |
| "stdout": "verb count: 7\\nverbs: kMove_Verb kLine_Verb kQuad_Verb kClose_Verb kMove_Verb kCubic_Verb kConic_Verb \\n" |
| }, |
| "SkPath_arcTo_2_b": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path;\n path.moveTo({156, 20});\n path.arcTo(200, 20, 170, 50, 50);\n SkPath::Iter iter(path, false);\n SkPoint p[4];\n SkPath::Verb verb;\n while (SkPath::kDone_Verb != (verb = iter.next(p))) {\n switch (verb) {\n case SkPath::kMove_Verb:\n SkDebugf(\"move to (%g,%g)\\n\", p[0].fX, p[0].fY);\n break;\n case SkPath::kLine_Verb:\n SkDebugf(\"line (%g,%g),(%g,%g)\\n\", p[0].fX, p[0].fY, p[1].fX, p[1].fY);\n break;\n case SkPath::kConic_Verb:\n SkDebugf(\"conic (%g,%g),(%g,%g),(%g,%g) weight %g\\n\",\n p[0].fX, p[0].fY, p[1].fX, p[1].fY, p[2].fX, p[2].fY, iter.conicWeight());\n break;\n default:\n SkDebugf(\"unexpected verb\\n\");\n }\n }\n}\n", |
| "hash": "498360fa0a201cc5db04b1c27256358f", |
| "file": "SkPath_Reference", |
| "name": "SkPath::arcTo_2_3", |
| "stdout": "move to (156,20)\\nline (156,20),(79.2893,20)\\nconic (79.2893,20),(200,20),(114.645,105.355) weight 0.382683\\n" |
| }, |
| "SkPath_arcTo_3": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path;\n path.moveTo({156, 20});\n path.arcTo({200, 20}, {170, 20}, 50);\n SkPath::Iter iter(path, false);\n SkPoint p[4];\n SkPath::Verb verb;\n while (SkPath::kDone_Verb != (verb = iter.next(p))) {\n switch (verb) {\n case SkPath::kMove_Verb:\n SkDebugf(\"move to (%g,%g)\\n\", p[0].fX, p[0].fY);\n break;\n case SkPath::kLine_Verb:\n SkDebugf(\"line (%g,%g),(%g,%g)\\n\", p[0].fX, p[0].fY, p[1].fX, p[1].fY);\n break;\n case SkPath::kConic_Verb:\n SkDebugf(\"conic (%g,%g),(%g,%g),(%g,%g) weight %g\\n\",\n p[0].fX, p[0].fY, p[1].fX, p[1].fY, p[2].fX, p[2].fY, iter.conicWeight());\n break;\n default:\n SkDebugf(\"unexpected verb\\n\");\n }\n }\n}\n", |
| "hash": "0c056264a361579c18e5d02d3172d4d4", |
| "file": "SkPath_Reference", |
| "name": "SkPath::arcTo_3", |
| "stdout": "move to (156,20)\\nline (156,20),(200,20)\\n" |
| }, |
| "SkPath_computeTightBounds": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkPath& path) -> void {\n const SkRect& bounds = path.computeTightBounds();\n SkDebugf(\"%s bounds = %g, %g, %g, %g\\n\", prefix,\n bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);\n };\n SkPath path;\n debugster(\"empty\", path);\n path.addCircle(50, 45, 25);\n debugster(\"circle\", path);\n SkMatrix matrix;\n matrix.setRotate(45, 50, 45);\n path.transform(matrix);\n debugster(\"rotated circle\", path);\n}", |
| "hash": "9a39c56e95b19a657133b7ad1fe0cf03", |
| "file": "SkPath_Reference", |
| "name": "SkPath::computeTightBounds", |
| "stdout": "empty bounds = 0, 0, 0, 0\\ncircle bounds = 25, 20, 75, 70\\nrotated circle bounds = 25, 20, 75, 70\\n" |
| }, |
| "SkPath_copy_const_SkPath": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path;\n path.lineTo(20, 20);\n SkPath path2(path);\n path2.close();\n SkDebugf(\"path verbs: %d\\n\", path.countVerbs());\n SkDebugf(\"path2 verbs: %d\\n\", path2.countVerbs());\n path.reset();\n SkDebugf(\"after reset\\n\" \"path verbs: %d\\n\", path.countVerbs());\n SkDebugf(\"path2 verbs: %d\\n\", path2.countVerbs());\n}", |
| "hash": "647312aacd946c8a6eabaca797140432", |
| "file": "SkPath_Reference", |
| "name": "SkPath::SkPath(const SkPath& path)", |
| "stdout": "path verbs: 2\\npath2 verbs: 3\\nafter reset\\npath verbs: 0\\npath2 verbs: 3\\n" |
| }, |
| "SkPath_copy_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path1;\n path1.addRect({10, 20, 30, 40});\n SkPath path2 = path1;\n const SkRect& b1 = path1.getBounds();\n SkDebugf(\"path1 bounds = %g, %g, %g, %g\\n\", b1.fLeft, b1.fTop, b1.fRight, b1.fBottom);\n const SkRect& b2 = path2.getBounds();\n SkDebugf(\"path2 bounds = %g, %g, %g, %g\\n\", b2.fLeft, b2.fTop, b2.fRight, b2.fBottom);\n}", |
| "hash": "bba288f5f77fc8e37e89d2ec08e0ac60", |
| "file": "SkPath_Reference", |
| "name": "SkPath::operator=(const SkPath& path)", |
| "stdout": "path1 bounds = 10, 20, 30, 40\\npath2 bounds = 10, 20, 30, 40\\n" |
| }, |
| "SkPath_countPoints": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkPath& path) -> void {\n SkDebugf(\"%s point count: %d\\n\", prefix, path.countPoints());\n };\n SkPath path;\n debugster(\"empty\", path);\n path.lineTo(0, 0);\n debugster(\"zero line\", path);\n path.rewind();\n path.moveTo(10, 10);\n path.lineTo(20, 20);\n debugster(\"line\", path);\n path.moveTo(20, 20);\n debugster(\"second move\", path);\n}\n", |
| "hash": "bca6379ccef62cb081b10db7381deb27", |
| "file": "SkPath_Reference", |
| "name": "SkPath::countPoints", |
| "stdout": "empty point count: 0\\nzero line point count: 2\\nline point count: 2\\nsecond move point count: 3\\n" |
| }, |
| "SkPath_countVerbs": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path;\n SkDebugf(\"empty verb count: %d\\n\", path.countVerbs());\n path.addRoundRect({10, 20, 30, 40}, 5, 5);\n SkDebugf(\"round rect verb count: %d\\n\", path.countVerbs());\n}", |
| "hash": "af0c66aea3ef81b709664c7007f48aae", |
| "file": "SkPath_Reference", |
| "name": "SkPath::countVerbs", |
| "stdout": "empty verb count: 0\\nround rect verb count: 10\\n" |
| }, |
| "SkPath_destructor": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath* path = new SkPath();\n path->lineTo(20, 20);\n SkPath path2(*path);\n delete path;\n SkDebugf(\"path2 is \" \"%s\" \"empty\", path2.isEmpty() ? \"\" : \"not \");\n}\n", |
| "hash": "01ad6be9b7d15a2217daea273eb3d466", |
| "file": "SkPath_Reference", |
| "name": "SkPath::~SkPath()", |
| "stdout": "path2 is not empty" |
| }, |
| "SkPath_dump": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path;\n path.quadTo(20, 30, 40, 50);\n for (bool forceClose : { false, true } ) {\n for (bool dumpAsHex : { false, true } ) {\n path.dump(nullptr, forceClose, dumpAsHex);\n SkDebugf(\"\\n\");\n }\n }\n}", |
| "hash": "8036d764452a62f9953af50846f0f3c0", |
| "file": "SkPath_Reference", |
| "name": "SkPath::dump()", |
| "stdout": "path.setFillType(SkPath::kWinding_FillType);\\npath.moveTo(0, 0);\\npath.quadTo(20, 30, 40, 50);\\n\\npath.setFillType(SkPath::kWinding_FillType);\\npath.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0\\npath.quadTo(SkBits2Float(0x41a00000), SkBits2Float(0x41f00000), SkBits2Float(0x42200000), SkBits2Float(0x42480000)); // 20, 30, 40, 50\\n\\npath.setFillType(SkPath::kWinding_FillType);\\npath.moveTo(0, 0);\\npath.quadTo(20, 30, 40, 50);\\npath.lineTo(0, 0);\\npath.close();\\n\\npath.setFillType(SkPath::kWinding_FillType);\\npath.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0\\npath.quadTo(SkBits2Float(0x41a00000), SkBits2Float(0x41f00000), SkBits2Float(0x42200000), SkBits2Float(0x42480000)); // 20, 30, 40, 50\\npath.lineTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0\\npath.close();\\n\\n" |
| }, |
| "SkPath_dumpHex": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path, copy;\n path.lineTo(6.f / 7, 2.f / 3);\n path.dumpHex();\n copy.setFillType(SkPath::kWinding_FillType);\n copy.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0\n copy.lineTo(SkBits2Float(0x3f5b6db7), SkBits2Float(0x3f2aaaab)); // 0.857143f, 0.666667f\n SkDebugf(\"path is \" \"%s\" \"equal to copy\\n\", path == copy ? \"\" : \"not \");\n}", |
| "hash": "72a92fe058e8b3be6c8a30fad7fd1266", |
| "file": "SkPath_Reference", |
| "name": "SkPath::dumpHex", |
| "stdout": "path.setFillType(SkPath::kWinding_FillType);\\npath.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000)); // 0, 0\\npath.lineTo(SkBits2Float(0x3f5b6db7), SkBits2Float(0x3f2aaaab)); // 0.857143f, 0.666667f\\npath is equal to copy\\n" |
| }, |
| "SkPath_dump_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path, copy;\n path.lineTo(6.f / 7, 2.f / 3);\n path.dump();\n copy.setFillType(SkPath::kWinding_FillType);\n copy.moveTo(0, 0);\n copy.lineTo(0.857143f, 0.666667f);\n SkDebugf(\"path is \" \"%s\" \"equal to copy\\n\", path == copy ? \"\" : \"not \");\n}", |
| "hash": "92e0032f85181795d1f8b5a2c8e4e4b7", |
| "file": "SkPath_Reference", |
| "name": "SkPath::dump_2", |
| "stdout": "path.setFillType(SkPath::kWinding_FillType);\\npath.moveTo(0, 0);\\npath.lineTo(0.857143f, 0.666667f);\\npath is not equal to copy\\n" |
| }, |
| "SkPath_empty_constructor": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path;\n SkDebugf(\"path is \" \"%s\" \"empty\", path.isEmpty() ? \"\" : \"not \");\n}", |
| "hash": "0a0026fca638d1cd75c0ab884e3ee1c6", |
| "file": "SkPath_Reference", |
| "name": "SkPath::SkPath()", |
| "stdout": "path is empty" |
| }, |
| "SkPath_equal_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkPath& a, const SkPath& b) -> void {\n SkDebugf(\"%s one %c= two\\n\", prefix, a == b ? '=' : '!');\n };\n SkPath one;\n SkPath two;\n debugster(\"empty\", one, two);\n one.moveTo(0, 0);\n debugster(\"moveTo\", one, two);\n one.rewind();\n debugster(\"rewind\", one, two);\n one.moveTo(0, 0);\n one.reset();\n debugster(\"reset\", one, two);\n}\n", |
| "hash": "31883f51bb357f2ac5990d88f8b82e02", |
| "file": "SkPath_Reference", |
| "name": "SkPath::operator==(const SkPath& a, const SkPath& b)", |
| "stdout": "empty one == two\\nmoveTo one != two\\nrewind one == two\\nreset one == two\\n" |
| }, |
| "SkPath_getBounds": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkPath& path) -> void {\n const SkRect& bounds = path.getBounds();\n SkDebugf(\"%s bounds = %g, %g, %g, %g\\n\", prefix,\n bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom);\n };\n SkPath path;\n debugster(\"empty\", path);\n path.addCircle(50, 45, 25);\n debugster(\"circle\", path);\n SkMatrix matrix;\n matrix.setRotate(45, 50, 45);\n path.transform(matrix);\n debugster(\"rotated circle\", path);\n}", |
| "hash": "45c0fc3acb74fab99d544b80eadd10ad", |
| "file": "SkPath_Reference", |
| "name": "SkPath::getBounds", |
| "stdout": "empty bounds = 0, 0, 0, 0\\ncircle bounds = 25, 20, 75, 70\\nrotated circle bounds = 14.6447, 9.64466, 85.3553, 80.3553\\n" |
| }, |
| "SkPath_getConvexity": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkPath& path) -> void {\n SkDebugf(\"%s path convexity is %s\\n\", prefix,\n SkPath::kUnknown_Convexity == path.getConvexity() ? \"unknown\" :\n SkPath::kConvex_Convexity == path.getConvexity() ? \"convex\" : \"concave\"); };\n SkPath path;\n debugster(\"initial\", path);\n path.lineTo(50, 0);\n debugster(\"first line\", path);\n path.lineTo(50, 50);\n debugster(\"second line\", path);\n path.lineTo(100, 50);\n debugster(\"third line\", path);\n}\n", |
| "hash": "a8f36f2fa90003e3691fd0da0bb0c243", |
| "file": "SkPath_Reference", |
| "name": "SkPath::getConvexity", |
| "stdout": "initial path convexity is convex\\nfirst line path convexity is convex\\nsecond line path convexity is convex\\nthird line path convexity is concave\\n" |
| }, |
| "SkPath_getConvexityOrUnknown": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkPath& path) -> void {\n SkDebugf(\"%s path convexity is %s\\n\", prefix,\n SkPath::kUnknown_Convexity == path.getConvexityOrUnknown() ? \"unknown\" :\n SkPath::kConvex_Convexity == path.getConvexityOrUnknown() ? \"convex\" : \"concave\"); };\n SkPath path;\n debugster(\"initial\", path);\n path.lineTo(50, 0);\n debugster(\"first line\", path);\n path.getConvexity();\n path.lineTo(50, 50);\n debugster(\"second line\", path);\n path.lineTo(100, 50);\n path.getConvexity();\n debugster(\"third line\", path);\n}\n", |
| "hash": "111c59e9afadb940ab8f41bdc25378a4", |
| "file": "SkPath_Reference", |
| "name": "SkPath::getConvexityOrUnknown", |
| "stdout": "initial path convexity is unknown\\nfirst line path convexity is unknown\\nsecond line path convexity is unknown\\nthird line path convexity is concave\\n" |
| }, |
| "SkPath_getFillType": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path;\n SkDebugf(\"default path fill type is %s\\n\",\n path.getFillType() == SkPath::kWinding_FillType ? \"kWinding_FillType\" :\n path.getFillType() == SkPath::kEvenOdd_FillType ? \"kEvenOdd_FillType\" :\n path.getFillType() == SkPath::kInverseWinding_FillType ? \"kInverseWinding_FillType\" :\n \"kInverseEvenOdd_FillType\");\n}", |
| "hash": "019af90e778914e8a109d6305ede4fc4", |
| "file": "SkPath_Reference", |
| "name": "SkPath::getFillType", |
| "stdout": "default path fill type is kWinding_FillType\\n" |
| }, |
| "SkPath_getGenerationID": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path;\n SkDebugf(\"empty genID = %u\\n\", path.getGenerationID());\n path.lineTo(1, 2);\n SkDebugf(\"1st lineTo genID = %u\\n\", path.getGenerationID());\n path.rewind();\n SkDebugf(\"empty genID = %u\\n\", path.getGenerationID());\n path.lineTo(1, 2);\n SkDebugf(\"2nd lineTo genID = %u\\n\", path.getGenerationID());\n}", |
| "hash": "a0f166715d6479f91258d854e63e586d", |
| "file": "SkPath_Reference", |
| "name": "SkPath::getGenerationID", |
| "stdout": "empty genID = 1\\n1st lineTo genID = 2\\nempty genID = 1\\n2nd lineTo genID = 3\\n" |
| }, |
| "SkPath_getLastPt": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path;\n path.moveTo(100, 100);\n path.quadTo(100, 20, 20, 100);\n SkMatrix matrix;\n matrix.setRotate(36, 100, 100);\n path.transform(matrix);\n SkPoint last;\n path.getLastPt(&last);\n SkDebugf(\"last point: %g, %g\\n\", last.fX, last.fY);\n}", |
| "hash": "df8160dd7ac8aa4b40fce7286fe49952", |
| "file": "SkPath_Reference", |
| "name": "SkPath::getLastPt", |
| "stdout": "last point: 35.2786, 52.9772\\n" |
| }, |
| "SkPath_getPoint": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path;\n path.lineTo(20, 20);\n path.offset(-10, -10);\n for (int i= 0; i < path.countPoints(); ++i) {\n SkDebugf(\"point %d: (%1.8g,%1.8g)\\n\", i, path.getPoint(i).fX, path.getPoint(i).fY);\n }\n}\n", |
| "hash": "42885f1df13de109adccc5d531f62111", |
| "file": "SkPath_Reference", |
| "name": "SkPath::getPoint", |
| "stdout": "point 0: (-10,-10)\\npoint 1: (10,10)\\n" |
| }, |
| "SkPath_getPoints": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkPath& path, SkPoint* points, int max) -> void {\n int count = path.getPoints(points, max);\n SkDebugf(\"%s point count: %d \", prefix, count);\n for (int i = 0; i < SkTMin(count, max) && points; ++i) {\n SkDebugf(\"(%1.8g,%1.8g) \", points[i].fX, points[i].fY);\n }\n SkDebugf(\"\\n\");\n };\n SkPath path;\n path.lineTo(20, 20);\n path.lineTo(-10, -10);\n SkPoint points[3];\n debugster(\"no points\", path, nullptr, 0);\n debugster(\"zero max\", path, points, 0);\n debugster(\"too small\", path, points, 2);\n debugster(\"just right\", path, points, path.countPoints());\n}\n", |
| "hash": "9bc86efda08cbcd9c6f7c5f220294a24", |
| "file": "SkPath_Reference", |
| "name": "SkPath::getPoints", |
| "stdout": "no points point count: 3 \\nzero max point count: 3 \\ntoo small point count: 3 (0,0) (20,20) \\njust right point count: 3 (0,0) (20,20) (-10,-10) \\n" |
| }, |
| "SkPath_getSegmentMasks": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path;\n path.quadTo(20, 30, 40, 50);\n path.close();\n const char* masks[] = { \"line\", \"quad\", \"conic\", \"cubic\" };\n int index = 0;\n for (auto mask : { SkPath::kLine_SegmentMask, SkPath::kQuad_SegmentMask,\n SkPath::kConic_SegmentMask, SkPath::kCubic_SegmentMask } ) {\n if (mask & path.getSegmentMasks()) {\n SkDebugf(\"mask %s set\\n\", masks[index]);\n }\n ++index;\n }\n}", |
| "hash": "657a3f3e11acafea92b84d6bb0c13633", |
| "file": "SkPath_Reference", |
| "name": "SkPath::getSegmentMasks", |
| "stdout": "mask quad set\\n" |
| }, |
| "SkPath_getVerbs": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkPath& path, uint8_t* verbs, int max) -> void {\n int count = path.getVerbs(verbs, max);\n SkDebugf(\"%s verb count: %d \", prefix, count);\n const char* verbStr[] = { \"move\", \"line\", \"quad\", \"conic\", \"cubic\", \"close\" };\n for (int i = 0; i < SkTMin(count, max) && verbs; ++i) {\n SkDebugf(\"%s \", verbStr[verbs[i]]);\n }\n SkDebugf(\"\\n\");\n };\n SkPath path;\n path.lineTo(20, 20);\n path.lineTo(-10, -10);\n uint8_t verbs[3];\n debugster(\"no verbs\", path, nullptr, 0);\n debugster(\"zero max\", path, verbs, 0);\n debugster(\"too small\", path, verbs, 2);\n debugster(\"just right\", path, verbs, path.countVerbs());\n}\n", |
| "hash": "2ec66880966a6133ddd9331ce7323438", |
| "file": "SkPath_Reference", |
| "name": "SkPath::getVerbs", |
| "stdout": "no verbs verb count: 3 \\nzero max verb count: 3 \\ntoo small verb count: 3 move line \\njust right verb count: 3 move line line \\n" |
| }, |
| "SkPath_isEmpty": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkPath& path) -> void {\n SkDebugf(\"%s path is %s\" \"empty\\n\", prefix, path.isEmpty() ? \"\" : \"not \");\n };\n SkPath path;\n debugster(\"initial\", path);\n path.moveTo(0, 0);\n debugster(\"after moveTo\", path);\n path.rewind();\n debugster(\"after rewind\", path);\n path.lineTo(0, 0);\n debugster(\"after lineTo\", path);\n path.reset();\n debugster(\"after reset\", path);\n}\n", |
| "hash": "0b34e6d55d11586744adeb889d2a12f4", |
| "file": "SkPath_Reference", |
| "name": "SkPath::isEmpty", |
| "stdout": "initial path is empty\\nafter moveTo path is not empty\\nafter rewind path is empty\\nafter lineTo path is not empty\\nafter reset path is empty\\n" |
| }, |
| "SkPath_isFinite": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkPath& path) -> void {\n SkDebugf(\"%s path is %s\" \"finite\\n\", prefix, path.isFinite() ? \"\" : \"not \");\n };\n SkPath path;\n debugster(\"initial\", path);\n path.lineTo(SK_ScalarMax, SK_ScalarMax);\n debugster(\"after line\", path);\n SkMatrix matrix;\n matrix.setScale(2, 2);\n path.transform(matrix);\n debugster(\"after scale\", path);\n}\n", |
| "hash": "dd4e4dd2aaa8039b2430729c6b3af817", |
| "file": "SkPath_Reference", |
| "name": "SkPath::isFinite", |
| "stdout": "initial path is finite\\nafter line path is finite\\nafter scale path is not finite\\n" |
| }, |
| "SkPath_isInterpolatable": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path, path2;\n path.moveTo(20, 20);\n path.lineTo(40, 40);\n path.lineTo(20, 20);\n path.lineTo(40, 40);\n path.close();\n path2.addRect({20, 20, 40, 40});\n SkDebugf(\"paths are \" \"%s\" \"interpolatable\", path.isInterpolatable(path2) ? \"\" : \"not \");\n}", |
| "hash": "c81fc7dfaf785c3fb77209c7f2ebe5b8", |
| "file": "SkPath_Reference", |
| "name": "SkPath::isInterpolatable", |
| "stdout": "paths are interpolatable" |
| }, |
| "SkPath_isInverseFillType": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path;\n SkDebugf(\"default path fill type is inverse: %s\\n\",\n path.isInverseFillType() ? \"true\" : \"false\");\n}", |
| "hash": "2a2d39f5da611545caa18bbcea873ab2", |
| "file": "SkPath_Reference", |
| "name": "SkPath::isInverseFillType", |
| "stdout": "default path fill type is inverse: false\\n" |
| }, |
| "SkPath_isLastContourClosed": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkPath& path) -> void {\n SkDebugf(\"%s last contour is %s\" \"closed\\n\", prefix,\n path.isLastContourClosed() ? \"\" : \"not \");\n };\n SkPath path;\n debugster(\"initial\", path);\n path.close();\n debugster(\"after close\", path);\n path.lineTo(0, 0);\n debugster(\"after lineTo\", path);\n path.close();\n debugster(\"after close\", path);\n}\n", |
| "hash": "03b740ab94b9017800a52e30b5e7fee7", |
| "file": "SkPath_Reference", |
| "name": "SkPath::isLastContourClosed", |
| "stdout": "initial last contour is not closed\\nafter close last contour is not closed\\nafter lineTo last contour is not closed\\nafter close last contour is closed\\n" |
| }, |
| "SkPath_isLine": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkPath& path) -> void {\n SkPoint line[2];\n if (path.isLine(line)) {\n SkDebugf(\"%s is line (%1.8g,%1.8g) (%1.8g,%1.8g)\\n\", prefix,\n line[0].fX, line[0].fY, line[1].fX, line[1].fY);\n } else {\n SkDebugf(\"%s is not line\\n\", prefix);\n }\n };\n SkPath path;\n debugster(\"empty\", path);\n path.lineTo(0, 0);\n debugster(\"zero line\", path);\n path.rewind();\n path.moveTo(10, 10);\n path.lineTo(20, 20);\n debugster(\"line\", path);\n path.moveTo(20, 20);\n debugster(\"second move\", path);\n}\n", |
| "hash": "1ad07d56e4258e041606d50cad969392", |
| "file": "SkPath_Reference", |
| "name": "SkPath::isLine", |
| "stdout": "empty is not line\\nzero line is line (0,0) (0,0)\\nline is line (10,10) (20,20)\\nsecond move is not line\\n" |
| }, |
| "SkPath_isNestedFillRects": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPaint paint;\n paint.setStyle(SkPaint::kStroke_Style);\n paint.setStrokeWidth(5);\n SkPath path;\n path.addRect({10, 20, 30, 40});\n paint.getFillPath(path, &path);\n SkRect rects[2];\n SkPath::Direction directions[2];\n if (path.isNestedFillRects(rects, directions)) {\n for (int i = 0; i < 2; ++i) {\n SkDebugf(\"%s (%g, %g, %g, %g); direction %s\\n\", i ? \"inner\" : \"outer\",\n rects[i].fLeft, rects[i].fTop, rects[i].fRight, rects[i].fBottom,\n SkPath::kCW_Direction == directions[i] ? \"CW\" : \"CCW\");\n }\n } else {\n SkDebugf(\"is not nested rectangles\\n\");\n }\n}\n", |
| "hash": "77e4394caf9fa083c19c21c2462efe14", |
| "file": "SkPath_Reference", |
| "name": "SkPath::isNestedFillRects", |
| "stdout": "outer (7.5, 17.5, 32.5, 42.5); direction CW\\ninner (12.5, 22.5, 27.5, 37.5); direction CCW\\n" |
| }, |
| "SkPath_isRect": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkPath& path) -> void {\n SkRect rect;\n SkPath::Direction direction;\n bool isClosed;\n path.isRect(&rect, &isClosed, &direction) ?\n SkDebugf(\"%s is rect (%g, %g, %g, %g); is %s\" \"closed; direction %s\\n\", prefix,\n rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, isClosed ? \"\" : \"not \",\n SkPath::kCW_Direction == direction ? \"CW\" : \"CCW\") :\n SkDebugf(\"%s is not rect\\n\", prefix);\n };\n SkPath path;\n debugster(\"empty\", path);\n path.addRect({10, 20, 30, 40});\n debugster(\"addRect\", path);\n path.moveTo(60, 70);\n debugster(\"moveTo\", path);\n path.lineTo(60, 70);\n debugster(\"lineTo\", path);\n path.reset();\n const SkPoint pts[] = { {0, 0}, {0, 80}, {80, 80}, {80, 0}, {40, 0}, {20, 0} };\n path.addPoly(pts, SK_ARRAY_COUNT(pts), false);\n debugster(\"addPoly\", path);\n}\n", |
| "hash": "81a2aac1b8f0ff3d4c8d35ccb9149b16", |
| "file": "SkPath_Reference", |
| "name": "SkPath::isRect", |
| "stdout": "empty is not rect\\naddRect is rect (10, 20, 30, 40); is closed; direction CW\\nmoveTo is rect (10, 20, 30, 40); is closed; direction CW\\nlineTo is not rect\\naddPoly is rect (0, 0, 80, 80); is not closed; direction CCW\\n" |
| }, |
| "SkPath_isVolatile": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path;\n SkDebugf(\"volatile by default is %s\\n\", path.isVolatile() ? \"true\" : \"false\");\n}", |
| "hash": "c722ebe8ac991d77757799ce29e509e1", |
| "file": "SkPath_Reference", |
| "name": "SkPath::isVolatile", |
| "stdout": "volatile by default is false\\n" |
| }, |
| "SkPath_notequal_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkPath& a, const SkPath& b) -> void {\n SkDebugf(\"%s one %c= two\\n\", prefix, a != b ? '!' : '=');\n };\n SkPath one;\n SkPath two;\n debugster(\"empty\", one, two);\n one.addRect({10, 20, 30, 40});\n two.addRect({10, 20, 30, 40});\n debugster(\"add rect\", one, two);\n one.setConvexity(SkPath::kConcave_Convexity);\n debugster(\"setConvexity\", one, two);\n SkDebugf(\"convexity %c=\\n\", one.getConvexity() == two.getConvexity() ? '=' : '!');\n}\n", |
| "hash": "bbbda1cc818d96c9c0d2a06c0c48902b", |
| "file": "SkPath_Reference", |
| "name": "SkPath::operator!=(const SkPath& a, const SkPath& b)", |
| "stdout": "empty one == two\\nadd rect one == two\\nsetConvexity one == two\\nconvexity !=\\n" |
| }, |
| "SkPath_readFromMemory": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path, copy;\n path.lineTo(6.f / 7, 2.f / 3);\n size_t size = path.writeToMemory(nullptr);\n SkTDArray<char> storage;\n storage.setCount(size);\n path.writeToMemory(storage.begin());\n size_t wrongSize = size - 4;\n size_t bytesRead = copy.readFromMemory(storage.begin(), wrongSize);\n SkDebugf(\"length = %u; returned by readFromMemory = %u\\n\", wrongSize, bytesRead);\n size_t largerSize = size + 4;\n bytesRead = copy.readFromMemory(storage.begin(), largerSize);\n SkDebugf(\"length = %u; returned by readFromMemory = %u\\n\", largerSize, bytesRead);\n}\n", |
| "hash": "9c6edd836c573a0fd232d2b8aa11a678", |
| "file": "SkPath_Reference", |
| "name": "SkPath::readFromMemory", |
| "stdout": "length = 32; returned by readFromMemory = 0\\nlength = 40; returned by readFromMemory = 36\\n" |
| }, |
| "SkPath_reset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path1, path2;\n path1.setFillType(SkPath::kInverseWinding_FillType);\n path1.addRect({10, 20, 30, 40});\n SkDebugf(\"path1 %c= path2\\n\", path1 == path2 ? '=' : '!');\n path1.reset();\n SkDebugf(\"path1 %c= path2\\n\", path1 == path2 ? '=' : '!');\n}", |
| "hash": "8cdca35d2964bbbecb93d79a13f71c65", |
| "file": "SkPath_Reference", |
| "name": "SkPath::reset()", |
| "stdout": "path1 != path2\\npath1 == path2\\n" |
| }, |
| "SkPath_rewind": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path1, path2;\n path1.setFillType(SkPath::kInverseWinding_FillType);\n path1.addRect({10, 20, 30, 40});\n SkDebugf(\"path1 %c= path2\\n\", path1 == path2 ? '=' : '!');\n path1.rewind();\n SkDebugf(\"path1 %c= path2\\n\", path1 == path2 ? '=' : '!');\n}", |
| "hash": "f1fedbb89da9c2a33a91805175663012", |
| "file": "SkPath_Reference", |
| "name": "SkPath::rewind()", |
| "stdout": "path1 != path2\\npath1 == path2\\n" |
| }, |
| "SkPath_serialize": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path, copy;\n path.lineTo(6.f / 7, 2.f / 3);\n sk_sp<SkData> data = path.serialize();\n copy.readFromMemory(data->data(), data->size());\n SkDebugf(\"path is \" \"%s\" \"equal to copy\\n\", path == copy ? \"\" : \"not \");\n}\n", |
| "hash": "2c6aff73608cd198659db6d1eeaaae4f", |
| "file": "SkPath_Reference", |
| "name": "SkPath::serialize()", |
| "stdout": "path is equal to copy\\n" |
| }, |
| "SkPath_setConvexity": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const char* prefix, const SkPath& path) -> void {\n SkDebugf(\"%s path convexity is %s\\n\", prefix,\n SkPath::kUnknown_Convexity == path.getConvexity() ? \"unknown\" :\n SkPath::kConvex_Convexity == path.getConvexity() ? \"convex\" : \"concave\"); };\n SkPoint quad[] = {{70, 70}, {20, 20}, {120, 20}, {120, 120}};\n SkPath path;\n path.addPoly(quad, SK_ARRAY_COUNT(quad), true);\n debugster(\"initial\", path);\n path.setConvexity(SkPath::kConcave_Convexity);\n debugster(\"after forcing concave\", path);\n path.setConvexity(SkPath::kUnknown_Convexity);\n debugster(\"after forcing unknown\", path);\n}\n", |
| "hash": "875e32b4b1cb48d739325705fc0fa42c", |
| "file": "SkPath_Reference", |
| "name": "SkPath::setConvexity", |
| "stdout": "initial path convexity is convex\\nafter forcing concave path convexity is concave\\nafter forcing unknown path convexity is convex\\n" |
| }, |
| "SkPath_swap": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path1, path2;\n path1.addRect({10, 20, 30, 40});\n path1.swap(path2);\n const SkRect& b1 = path1.getBounds();\n SkDebugf(\"path1 bounds = %g, %g, %g, %g\\n\", b1.fLeft, b1.fTop, b1.fRight, b1.fBottom);\n const SkRect& b2 = path2.getBounds();\n SkDebugf(\"path2 bounds = %g, %g, %g, %g\\n\", b2.fLeft, b2.fTop, b2.fRight, b2.fBottom);\n}", |
| "hash": "4c5ebee2b5039e5faefa07ae63a15467", |
| "file": "SkPath_Reference", |
| "name": "SkPath::swap()", |
| "stdout": "path1 bounds = 0, 0, 0, 0\\npath2 bounds = 10, 20, 30, 40\\n" |
| }, |
| "SkPath_updateBoundsCache": { |
| "code": "void draw(SkCanvas* canvas) {\n double times[2] = { 0, 0 };\n for (int i = 0; i < 10000; ++i) {\n SkPath path;\n for (int j = 1; j < 100; ++ j) {\n path.addCircle(50 + j, 45 + j, 25 + j);\n }\n if (1 & i) {\n path.updateBoundsCache();\n }\n double start = SkTime::GetNSecs();\n (void) path.getBounds();\n times[1 & i] += SkTime::GetNSecs() - start;\n }\n SkDebugf(\"uncached avg: %g ms\\n\", times[0] * 1e-6);\n SkDebugf(\"cached avg: %g ms\\n\", times[1] * 1e-6);\n}", |
| "hash": "bb761cd858e6d0ca05627262cd22ff5e", |
| "file": "SkPath_Reference", |
| "name": "SkPath::updateBoundsCache", |
| "stdout": "uncached avg: 0.18048 ms\\ncached avg: 0.182784 ms\\n\\n" |
| }, |
| "SkPath_writeToMemory": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPath path, copy;\n path.lineTo(6.f / 7, 2.f / 3);\n size_t size = path.writeToMemory(nullptr);\n SkTDArray<char> storage;\n storage.setCount(size);\n path.writeToMemory(storage.begin());\n copy.readFromMemory(storage.begin(), size);\n SkDebugf(\"path is \" \"%s\" \"equal to copy\\n\", path == copy ? \"\" : \"not \");\n}\n", |
| "hash": "e5f16eda6a1c2d759556285f72598445", |
| "file": "SkPath_Reference", |
| "name": "SkPath::writeToMemory", |
| "stdout": "path is equal to copy\\n" |
| }, |
| "SkPicture_uniqueID": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPictureRecorder recorder;\n recorder.beginRecording({0, 0, 0, 0});\n sk_sp<SkPicture> picture = recorder.finishRecordingAsPicture();\n SkDebugf(\"empty picture id = %d\\n\", picture->uniqueID());\n sk_sp<SkPicture> placeholder = SkPicture::MakePlaceholder({0, 0, 0, 0});\n SkDebugf(\"placeholder id = %d\\n\", placeholder->uniqueID());\n}", |
| "hash": "8e4257245c988c600410fe4fd7293f07", |
| "file": "SkPicture_Reference", |
| "name": "SkPicture::uniqueID", |
| "stdout": "empty picture id = 1\\nplaceholder id = 2\\n" |
| }, |
| "SkPixmap_addr": { |
| "code": "void draw(SkCanvas* canvas) {\n std::vector<int32_t> pixels;\n pixels.resize(image->height() * image->width() * 4);\n SkPixmap pixmap(SkImageInfo::Make(image->width(), image->height(), kN32_SkColorType,\n image->alphaType()), (const void*) &pixels.front(), image->width() * 4);\n image->readPixels(pixmap, 0, 0);\n SkDebugf(\"pixels address: 0x%llx\\n\", pixmap.addr());\n SkPixmap inset;\n if (pixmap.extractSubset(&inset, {128, 128, 512, 512})) {\n SkDebugf(\"inset address: 0x%llx\\n\", inset.addr());\n }\n}", |
| "hash": "17bcabaaee2dbb7beba562e9ca50b55e", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::addr()", |
| "stdout": "pixels address: 0x7f2a440bb010\\ninset address: 0x7f2a440fb210\\n\\n" |
| }, |
| "SkPixmap_addr16": { |
| "code": "void draw(SkCanvas* canvas) {\n const int w = 4;\n const int h = 4;\n uint16_t storage[w * h];\n SkPixmap pixmap(SkImageInfo::Make(w, h, kARGB_4444_SkColorType, kPremul_SkAlphaType),\n storage, w * sizeof(storage[0]));\n SkDebugf(\"pixmap.addr16() %c= storage\\n\",\n pixmap.addr16() == storage ? '=' : '!');\n}", |
| "hash": "9b16012d265c954c6de13f3fc960da52", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::addr16", |
| "stdout": "pixmap.addr16() == storage\\n" |
| }, |
| "SkPixmap_addr16_2": { |
| "code": "void draw(SkCanvas* canvas) {\n const int w = 4;\n const int h = 4;\n uint16_t storage[w * h];\n SkPixmap pixmap(SkImageInfo::Make(w, h, kARGB_4444_SkColorType, kPremul_SkAlphaType),\n storage, w * sizeof(storage[0]));\n SkDebugf(\"pixmap.addr16(1, 2) %c= &storage[1 + 2 * w]\\n\",\n pixmap.addr16(1, 2) == &storage[1 + 2 * w] ? '=' : '!');\n}", |
| "hash": "2c0c88a546d4ef093ab63ff72dac00b9", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::addr16_2", |
| "stdout": "pixmap.addr16(1, 2) == &storage[1 + 2 * w]\\n" |
| }, |
| "SkPixmap_addr32": { |
| "code": "void draw(SkCanvas* canvas) {\n const int w = 4;\n const int h = 4;\n uint32_t storage[w * h];\n SkPixmap pixmap(SkImageInfo::MakeN32(w, h, kPremul_SkAlphaType),\n storage, w * sizeof(storage[0]));\n SkDebugf(\"pixmap.addr32() %c= storage\\n\",\n pixmap.addr32() == storage ? '=' : '!');\n}", |
| "hash": "6b90c7ae9f254fe4ea9ef638f893a3e6", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::addr32", |
| "stdout": "pixmap.addr32() == storage\\n" |
| }, |
| "SkPixmap_addr32_2": { |
| "code": "void draw(SkCanvas* canvas) {\n const int w = 4;\n const int h = 4;\n uint32_t storage[w * h];\n SkPixmap pixmap(SkImageInfo::Make(w, h, kRGBA_8888_SkColorType, kPremul_SkAlphaType),\n storage, w * sizeof(storage[0]));\n SkDebugf(\"pixmap.addr32(1, 2) %c= &storage[1 + 2 * w]\\n\",\n pixmap.addr32(1, 2) == &storage[1 + 2 * w] ? '=' : '!');\n}", |
| "hash": "12f8b5ce9fb25604f33df336677f5d62", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::addr32_2", |
| "stdout": "pixmap.addr32(1, 2) == &storage[1 + 2 * w]\\n" |
| }, |
| "SkPixmap_addr64": { |
| "code": "void draw(SkCanvas* canvas) {\n const int w = 4;\n const int h = 4;\n uint64_t storage[w * h];\n SkPixmap pixmap(SkImageInfo::Make(w, h, kRGBA_F16_SkColorType, kPremul_SkAlphaType),\n storage, w * sizeof(storage[0]));\n SkDebugf(\"pixmap.addr64() %c= storage\\n\",\n pixmap.addr64() == storage ? '=' : '!');\n}", |
| "hash": "0d17085a4698a8a2e2235fad9041b4b4", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::addr64", |
| "stdout": "pixmap.addr64() == storage\\n" |
| }, |
| "SkPixmap_addr64_2": { |
| "code": "void draw(SkCanvas* canvas) {\n const int w = 4;\n const int h = 4;\n uint64_t storage[w * h];\n SkPixmap pixmap(SkImageInfo::Make(w, h, kRGBA_F16_SkColorType, kPremul_SkAlphaType),\n storage, w * sizeof(storage[0]));\n SkDebugf(\"pixmap.addr64(1, 2) %c= &storage[1 + 2 * w]\\n\",\n pixmap.addr64(1, 2) == &storage[1 + 2 * w] ? '=' : '!');\n}", |
| "hash": "5449f65fd7673273b0b57807fd3117ff", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::addr64_2", |
| "stdout": "pixmap.addr64(1, 2) == &storage[1 + 2 * w]\\n" |
| }, |
| "SkPixmap_addr8": { |
| "code": "void draw(SkCanvas* canvas) {\n const int w = 4;\n const int h = 4;\n uint8_t storage[w * h];\n SkPixmap pixmap(SkImageInfo::Make(w, h, kGray_8_SkColorType, kPremul_SkAlphaType),\n storage, w * sizeof(storage[0]));\n SkDebugf(\"pixmap.addr8() %c= storage\\n\",\n pixmap.addr8() == storage ? '=' : '!');\n}", |
| "hash": "9adda80b2dd1b08ec5ccf66da7c8bd91", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::addr8", |
| "stdout": "pixmap.addr8() == storage\\n" |
| }, |
| "SkPixmap_addr8_2": { |
| "code": "void draw(SkCanvas* canvas) {\n const int w = 4;\n const int h = 4;\n uint8_t storage[w * h];\n SkPixmap pixmap(SkImageInfo::Make(w, h, kGray_8_SkColorType, kPremul_SkAlphaType),\n storage, w * sizeof(storage[0]));\n SkDebugf(\"pixmap.addr8(1, 2) %c= &storage[1 + 2 * w]\\n\",\n pixmap.addr8(1, 2) == &storage[1 + 2 * w] ? '=' : '!');\n}", |
| "hash": "5b986272268ef2c52045c1856f8b6107", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::addr8_2", |
| "stdout": "pixmap.addr8(1, 2) == &storage[1 + 2 * w]\\n" |
| }, |
| "SkPixmap_addrF16": { |
| "code": "void draw(SkCanvas* canvas) {\n const int w = 4;\n const int h = 4;\n uint16_t storage[w * h * 4];\n SkPixmap pixmap(SkImageInfo::Make(w, h, kRGBA_F16_SkColorType, kPremul_SkAlphaType),\n storage, w * 4 * sizeof(storage[0]));\n SkDebugf(\"pixmap.addrF16() %c= storage\\n\",\n pixmap.addrF16() == storage ? '=' : '!');\n}", |
| "hash": "54e8525a592f05623c33b375aebc90c1", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::addrF16", |
| "stdout": "pixmap.addrF16() == storage\\n" |
| }, |
| "SkPixmap_addrF16_2": { |
| "code": "void draw(SkCanvas* canvas) {\n const int w = 4;\n const int h = 4;\n const int wordsPerPixel = 4;\n const int rowWords = w * wordsPerPixel;\n uint16_t storage[rowWords * h];\n SkPixmap pixmap(SkImageInfo::Make(w, h, kRGBA_F16_SkColorType, kPremul_SkAlphaType),\n storage, rowWords * sizeof(storage[0]));\n SkDebugf(\"pixmap.addrF16(1, 2) %c= &storage[1 * wordsPerPixel + 2 * rowWords]\\n\",\n pixmap.addrF16(1, 2) == &storage[1 * wordsPerPixel + 2 * rowWords] ? '=' : '!');\n}", |
| "hash": "f6076cad455bc80af5d06eb121d3b6f2", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::addrF16_2", |
| "stdout": "pixmap.addrF16(1, 2) == &storage[1 * wordsPerPixel + 2 * rowWords]\\n" |
| }, |
| "SkPixmap_addr_2": { |
| "code": "void draw(SkCanvas* canvas) {\n const int w = 4;\n const int h = 4;\n std::vector<SkPMColor> storage;\n storage.resize(w * h);\n SkPixmap pixmap(SkImageInfo::MakeN32(w, h, kPremul_SkAlphaType), &storage.front(), w * 4);\n SkDebugf(\"pixmap.addr(1, 2) %c= &storage[1 + 2 * w]\\n\",\n pixmap.addr(1, 2) == &storage[1 + 2 * w] ? '=' : '!');\n}", |
| "hash": "6e6e29e860eafed77308c973400cc84d", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::addr_2", |
| "stdout": "pixmap.addr(1, 2) == &storage[1 + 2 * w]\\n" |
| }, |
| "SkPixmap_alphaType": { |
| "code": "void draw(SkCanvas* canvas) {\n const char* alphas[] = {\"Unknown\", \"Opaque\", \"Premul\", \"Unpremul\"};\n SkPixmap pixmap(SkImageInfo::MakeA8(16, 32), nullptr, 64);\n SkDebugf(\"alpha type: k\" \"%s\" \"_SkAlphaType\\n\", alphas[pixmap.alphaType()]);\n}", |
| "hash": "070b1a60232be499eb10c6ea62371804", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::alphaType", |
| "stdout": "alpha type: kPremul_SkAlphaType\\n" |
| }, |
| "SkPixmap_bounds": { |
| "code": "void draw(SkCanvas* canvas) {\n for (int width : { 0, 2 } ) {\n for (int height : { 0, 2 } ) {\n SkPixmap pixmap(SkImageInfo::MakeA8(width, height), nullptr, width);\n SkDebugf(\"width: %d height: %d empty: %s\\n\", width, height,\n pixmap.bounds().isEmpty() ? \"true\" : \"false\");\n }\n }\n}", |
| "hash": "79750fb1d898a4e5c8c828b7bc9acec5", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::bounds()", |
| "stdout": "width: 0 height: 0 empty: true\\nwidth: 0 height: 2 empty: true\\nwidth: 2 height: 0 empty: true\\nwidth: 2 height: 2 empty: false\\n" |
| }, |
| "SkPixmap_colorSpace": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPixmap pixmap(SkImageInfo::MakeN32(16, 32, kPremul_SkAlphaType,\n SkColorSpace::MakeSRGBLinear()), nullptr, 64);\n SkColorSpace* colorSpace = pixmap.colorSpace();\n SkDebugf(\"gammaCloseToSRGB: %s gammaIsLinear: %s isSRGB: %s\\n\",\n colorSpace->gammaCloseToSRGB() ? \"true\" : \"false\",\n colorSpace->gammaIsLinear() ? \"true\" : \"false\",\n colorSpace->isSRGB() ? \"true\" : \"false\");\n}", |
| "hash": "3421bb20a302d563832ba7bb45e0cc58", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::colorSpace", |
| "stdout": "gammaCloseToSRGB: false gammaIsLinear: true isSRGB: false\\n" |
| }, |
| "SkPixmap_colorType": { |
| "code": "void draw(SkCanvas* canvas) {\n const char* colors[] = {\"Unknown\", \"Alpha_8\", \"RGB_565\", \"ARGB_4444\", \"RGBA_8888\", \"RGB_888x\",\n \"BGRA_8888\", \"RGBA_1010102\", \"RGB_101010x\", \"Gray_8\", \"RGBA_F16\"};\n SkPixmap pixmap(SkImageInfo::MakeA8(16, 32), nullptr, 64);\n SkDebugf(\"color type: k\" \"%s\" \"_SkColorType\\n\", colors[pixmap.colorType()]);\n}", |
| "hash": "0ab5c7af272685f2ce177cc79e6b9457", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::colorType", |
| "stdout": "color type: kAlpha_8_SkColorType\\n" |
| }, |
| "SkPixmap_computeByteSize": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPixmap pixmap;\n for (int width : { 1, 1000, 1000000 } ) {\n for (int height: { 1, 1000, 1000000 } ) {\n SkImageInfo imageInfo = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);\n pixmap.reset(imageInfo, nullptr, width * 5);\n SkDebugf(\"width: %7d height: %7d computeByteSize: %13lld\\n\", width, height,\n pixmap.computeByteSize());\n }\n }\n}", |
| "hash": "410d14ddc45d272598c5a4e52bb047de", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::computeByteSize", |
| "stdout": "width: 1 height: 1 computeByteSize: 4\\nwidth: 1 height: 1000 computeByteSize: 4999\\nwidth: 1 height: 1000000 computeByteSize: 4999999\\nwidth: 1000 height: 1 computeByteSize: 4000\\nwidth: 1000 height: 1000 computeByteSize: 4999000\\nwidth: 1000 height: 1000000 computeByteSize: 4999999000\\nwidth: 1000000 height: 1 computeByteSize: 4000000\\nwidth: 1000000 height: 1000 computeByteSize: 4999000000\\nwidth: 1000000 height: 1000000 computeByteSize: 4999999000000\\n" |
| }, |
| "SkPixmap_computeIsOpaque": { |
| "code": "void draw(SkCanvas* canvas) {\n std::vector<uint32_t> pixels;\n const int height = 2;\n const int width = 2;\n pixels.resize(height * width * 4);\n SkPixmap pixmap(SkImageInfo::Make(width, height, kN32_SkColorType,\n kPremul_SkAlphaType), (const void*) &pixels.front(), width * 4);\n for (int index = 0; index < 2; ++index) {\n pixmap.erase(0x00000000);\n SkDebugf(\"computeIsOpaque: %s\\n\", pixmap.computeIsOpaque() ? \"true\" : \"false\");\n pixmap.erase(0xFFFFFFFF);\n SkDebugf(\"computeIsOpaque: %s\\n\", pixmap.computeIsOpaque() ? \"true\" : \"false\");\n pixmap.reset(pixmap.info().makeAlphaType(kOpaque_SkAlphaType),\n (const void*) &pixels.front(), width * 4);\n }\n}", |
| "hash": "6ef37d5be03d0bfaec992dbb5a94c66f", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::computeIsOpaque", |
| "stdout": "computeIsOpaque: false\\ncomputeIsOpaque: true\\ncomputeIsOpaque: false\\ncomputeIsOpaque: true\\n" |
| }, |
| "SkPixmap_const_SkImageInfo_const_star": { |
| "code": "void draw(SkCanvas* canvas) {\n SkDebugf(\"image alpha only = %s\\n\", image->isAlphaOnly() ? \"true\" : \"false\");\n SkPMColor pmColors = 0;\n sk_sp<SkImage> copy = SkImage::MakeRasterCopy({SkImageInfo::MakeA8(1, 1),\n (uint8_t*)&pmColors,\n 1});\n SkDebugf(\"copy alpha only = %s\\n\", copy->isAlphaOnly() ? \"true\" : \"false\");\n}", |
| "hash": "9a00774be57d7308313b3a9073e6e696", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::SkPixmap(const SkImageInfo& info, const void* addr, size_t rowBytes)", |
| "stdout": "image alpha only = false\\ncopy alpha only = true\\n" |
| }, |
| "SkPixmap_empty_constructor": { |
| "code": "void draw(SkCanvas* canvas) {\n const char* alphas[] = {\"Unknown\", \"Opaque\", \"Premul\", \"Unpremul\"};\n const char* colors[] = {\"Unknown\", \"Alpha_8\", \"RGB_565\", \"ARGB_4444\", \"RGBA_8888\", \"RGB_888x\",\n \"BGRA_8888\", \"RGBA_1010102\", \"RGB_101010x\", \"Gray_8\", \"RGBA_F16\"};\n SkPixmap pixmap;\n for (int i = 0; i < 2; ++i) {\n SkDebugf(\"width: %2d height: %2d\", pixmap.width(), pixmap.height());\n SkDebugf(\" color: k%s_SkColorType\", colors[pixmap.colorType()]);\n SkDebugf(\" alpha: k%s_SkAlphaType\\n\", alphas[pixmap.alphaType()]);\n pixmap.reset(SkImageInfo::Make(25, 35, kRGBA_8888_SkColorType, kOpaque_SkAlphaType),\n nullptr, 0);\n }\n}\n", |
| "hash": "9547e74a9d37553a667b913ffd1312dd", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::SkPixmap()", |
| "stdout": "width: 0 height: 0 color: kUnknown_SkColorType alpha: kUnknown_SkAlphaType\\nwidth: 25 height: 35 color: kRGBA_8888_SkColorType alpha: kOpaque_SkAlphaType\\n" |
| }, |
| "SkPixmap_getColor": { |
| "code": "void draw(SkCanvas* canvas) {\n const int w = 4;\n const int h = 4;\n std::vector<SkPMColor> storage;\n storage.resize(w * h);\n SkDebugf(\"Premultiplied:\\n\");\n for (int y = 0; y < h; ++y) {\n SkDebugf(\"(0, %d) \", y);\n for (int x = 0; x < w; ++x) {\n int a = 0xFF * (x + y) / (w - 1 + h - 1);\n storage[x + y * w] = SkPackARGB32(a, a * x / (w - 1), a * y / (h - 1), a);\n SkDebugf(\"0x%08x%c\", storage[x + y * w], x == w - 1 ? '\\n' : ' ');\n }\n }\n SkPixmap pixmap(SkImageInfo::MakeN32(w, h, kPremul_SkAlphaType), &storage.front(), w * 4);\n SkDebugf(\"Unpremultiplied:\\n\");\n for (int y = 0; y < h; ++y) {\n SkDebugf(\"(0, %d) \", y);\n for (int x = 0; x < w; ++x) {\n SkDebugf(\"0x%08x%c\", pixmap.getColor(x, y), x == w - 1 ? '\\n' : ' ');\n }\n }\n}", |
| "hash": "94ad244056dc80ecd87daae004266334", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::getColor", |
| "stdout": "Premultiplied:\\n(0, 0) 0x00000000 0x2a0e002a 0x55380055 0x7f7f007f\\n(0, 1) 0x2a000e2a 0x551c1c55 0x7f542a7f 0xaaaa38aa\\n(0, 2) 0x55003855 0x7f2a547f 0xaa7171aa 0xd4d48dd4\\n(0, 3) 0x7f007f7f 0xaa38aaaa 0xd48dd4d4 0xffffffff\\nUnpremultiplied:\\n(0, 0) 0x00000000 0x2a5500ff 0x55a800ff 0x7fff00ff\\n(0, 1) 0x2a0055ff 0x555454ff 0x7fa954ff 0xaaff54ff\\n(0, 2) 0x5500a8ff 0x7f54a9ff 0xaaaaaaff 0xd4ffaaff\\n(0, 3) 0x7f00ffff 0xaa54ffff 0xd4aaffff 0xffffffff\\n" |
| }, |
| "SkPixmap_height": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPixmap pixmap(SkImageInfo::MakeA8(16, 32), nullptr, 64);\n SkDebugf(\"pixmap height: %d info height: %d\\n\", pixmap.height(), pixmap.info().height());\n}", |
| "hash": "4a996d32122f469d51ddd0186efb48cc", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::height()", |
| "stdout": "pixmap height: 32 info height: 32\\n" |
| }, |
| "SkPixmap_info": { |
| "code": "void draw(SkCanvas* canvas) {\n std::vector<int32_t> pixels;\n pixels.resize(image->height() * image->width() * 4);\n SkPixmap pixmap(SkImageInfo::Make(image->width(), image->height(), kN32_SkColorType,\n image->alphaType()), (const void*) &pixels.front(), image->width() * 4);\n image->readPixels(pixmap, 0, 0);\n SkPixmap inset;\n if (pixmap.extractSubset(&inset, {128, 128, 512, 512})) {\n const SkImageInfo& info = inset.info();\n const char* alphas[] = {\"Unknown\", \"Opaque\", \"Premul\", \"Unpremul\"};\n const char* colors[] = {\"Unknown\", \"Alpha_8\", \"RGB_565\", \"ARGB_4444\", \"RGBA_8888\",\n \"RGB_888x\", \"BGRA_8888\", \"RGBA_1010102\", \"RGB_101010x\", \"Gray_8\", \"RGBA_F16\"};\n SkDebugf(\"width: %d height: %d color: %s alpha: %s\\n\", info.width(), info.height(),\n colors[info.colorType()], alphas[info.alphaType()]);\n }\n}", |
| "hash": "6e0f558bf7fabc655041116288559134", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::info()", |
| "stdout": "width: 384 height: 384 color: BGRA_8888 alpha: Opaque\\n" |
| }, |
| "SkPixmap_isOpaque": { |
| "code": "void draw(SkCanvas* canvas) {\n std::vector<uint32_t> pixels;\n const int height = 2;\n const int width = 2;\n pixels.resize(height * width * 4);\n SkPixmap pixmap(SkImageInfo::Make(width, height, kN32_SkColorType,\n kPremul_SkAlphaType), (const void*) &pixels.front(), width * 4);\n for (int index = 0; index < 2; ++index) {\n pixmap.erase(0x00000000);\n SkDebugf(\"isOpaque: %s\\n\", pixmap.isOpaque() ? \"true\" : \"false\");\n pixmap.erase(0xFFFFFFFF);\n SkDebugf(\"isOpaque: %s\\n\", pixmap.isOpaque() ? \"true\" : \"false\");\n pixmap.reset(pixmap.info().makeAlphaType(kOpaque_SkAlphaType),\n (const void*) &pixels.front(), width * 4);\n }\n}", |
| "hash": "efd083f121e888a523455ea8a49e50d1", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::isOpaque", |
| "stdout": "isOpaque: false\\nisOpaque: false\\nisOpaque: true\\nisOpaque: true\\n" |
| }, |
| "SkPixmap_reset": { |
| "code": "void draw(SkCanvas* canvas) {\n const char* alphas[] = {\"Unknown\", \"Opaque\", \"Premul\", \"Unpremul\"};\n const char* colors[] = {\"Unknown\", \"Alpha_8\", \"RGB_565\", \"ARGB_4444\", \"RGBA_8888\", \"RGB_888x\",\n \"BGRA_8888\", \"RGBA_1010102\", \"RGB_101010x\", \"Gray_8\", \"RGBA_F16\"};\n SkPixmap pixmap(SkImageInfo::Make(25, 35, kRGBA_8888_SkColorType, kOpaque_SkAlphaType),\n nullptr, 0);\n for (int i = 0; i < 2; ++i) {\n SkDebugf(\"width: %2d height: %2d\", pixmap.width(), pixmap.height());\n SkDebugf(\" color: k%s_SkColorType\", colors[pixmap.colorType()]);\n SkDebugf(\" alpha: k%s_SkAlphaType\\n\", alphas[pixmap.alphaType()]);\n pixmap.reset();\n }\n}\n", |
| "hash": "d9eb583c39f4f0baea79896b89245c98", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::reset()", |
| "stdout": "width: 25 height: 35 color: kRGBA_8888_SkColorType alpha: kOpaque_SkAlphaType\\nwidth: 0 height: 0 color: kUnknown_SkColorType alpha: kUnknown_SkAlphaType\\n" |
| }, |
| "SkPixmap_rowBytes": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPixmap badPixmap = {SkImageInfo::MakeA8(4, 4), nullptr, 2};\n SkPixmap okPixmap = {SkImageInfo::MakeA8(4, 4), nullptr, 8};\n for (auto& pixmap : { badPixmap, okPixmap } ) {\n SkDebugf(\"rowBytes: %d minRowBytes: %d\\n\", pixmap.rowBytes(),\n pixmap.info().minRowBytes());\n }\n}", |
| "hash": "19ac8bb81854680bd408fec8cb797d5c", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::rowBytes", |
| "stdout": "rowBytes: 2 minRowBytes: 4\\nrowBytes: 8 minRowBytes: 4\\n" |
| }, |
| "SkPixmap_rowBytesAsPixels": { |
| "code": "void draw(SkCanvas* canvas) {\n for (int rowBytes : { 4, 5, 6, 7, 8} ) {\n SkPixmap pixmap(SkImageInfo::MakeN32(1, 1, kPremul_SkAlphaType), nullptr, rowBytes);\n SkDebugf(\"rowBytes: %d rowBytesAsPixels: %d\\n\", rowBytes, pixmap.rowBytesAsPixels());\n }\n}", |
| "hash": "6231bb212d0c231b5bc44eac626fbcb5", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::rowBytesAsPixels", |
| "stdout": "rowBytes: 4 rowBytesAsPixels: 1\\nrowBytes: 5 rowBytesAsPixels: 1\\nrowBytes: 6 rowBytesAsPixels: 1\\nrowBytes: 7 rowBytesAsPixels: 1\\nrowBytes: 8 rowBytesAsPixels: 2\\n" |
| }, |
| "SkPixmap_setColorSpace": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPixmap pixmap;\n sk_sp<SkColorSpace> colorSpace1 = SkColorSpace::MakeRGB(SkColorSpace::kLinear_RenderTargetGamma,\n SkColorSpace::kRec2020_Gamut);\n SkDebugf(\"is %sunique\\n\", colorSpace1->unique() ? \"\" : \"not \");\n pixmap.setColorSpace(colorSpace1);\n SkDebugf(\"is %sunique\\n\", colorSpace1->unique() ? \"\" : \"not \");\n}\n", |
| "hash": "30d70aec4de17c831dba71e03dc9664a", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::setColorSpace", |
| "stdout": "is unique\\nis not unique\\n" |
| }, |
| "SkPixmap_shiftPerPixel": { |
| "code": "void draw(SkCanvas* canvas) {\n const char* colors[] = {\"Unknown\", \"Alpha_8\", \"RGB_565\", \"ARGB_4444\", \"RGBA_8888\", \"RGB_888x\",\n \"BGRA_8888\", \"RGBA_1010102\", \"RGB_101010x\", \"Gray_8\", \"RGBA_F16\"};\n SkImageInfo info = SkImageInfo::MakeA8(1, 1);\n for (SkColorType colorType : { kUnknown_SkColorType, kAlpha_8_SkColorType,\n kRGB_565_SkColorType, kARGB_4444_SkColorType,\n kRGBA_8888_SkColorType, kBGRA_8888_SkColorType,\n kGray_8_SkColorType, kRGBA_F16_SkColorType } ) {\n SkPixmap pixmap(info.makeColorType(colorType), nullptr, 4);\n SkDebugf(\"color: k\" \"%s\" \"_SkColorType\" \"%*s\" \"bytesPerPixel: %d shiftPerPixel: %d\\n\",\n colors[colorType], 10 - strlen(colors[colorType]), \" \",\n pixmap.info().bytesPerPixel(), pixmap.shiftPerPixel());\n }\n}", |
| "hash": "bf31ee140e2c163c3957276e6d4c4f0c", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::shiftPerPixel", |
| "stdout": "color: kUnknown_SkColorType bytesPerPixel: 0 shiftPerPixel: 0\\ncolor: kAlpha_8_SkColorType bytesPerPixel: 1 shiftPerPixel: 0\\ncolor: kRGB_565_SkColorType bytesPerPixel: 2 shiftPerPixel: 1\\ncolor: kARGB_4444_SkColorType bytesPerPixel: 2 shiftPerPixel: 1\\ncolor: kRGBA_8888_SkColorType bytesPerPixel: 4 shiftPerPixel: 2\\ncolor: kBGRA_8888_SkColorType bytesPerPixel: 4 shiftPerPixel: 2\\ncolor: kGray_8_SkColorType bytesPerPixel: 1 shiftPerPixel: 0\\ncolor: kRGBA_F16_SkColorType bytesPerPixel: 8 shiftPerPixel: 3\\n" |
| }, |
| "SkPixmap_width": { |
| "code": "void draw(SkCanvas* canvas) {\n SkImageInfo info = SkImageInfo::MakeA8(16, 32);\n SkPixmap pixmap(info, nullptr, 64);\n SkDebugf(\"pixmap width: %d info width: %d\\n\", pixmap.width(), info.width());\n}", |
| "hash": "f68617b7153a20b2ed3d7f9ed5c6e5e4", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::width()", |
| "stdout": "pixmap width: 16 info width: 16\\n" |
| }, |
| "SkPixmap_writable_addr": { |
| "code": "void draw(SkCanvas* canvas) {\n const int w = 4;\n const int h = 4;\n SkPMColor storage[w * h * 4];\n SkPixmap pixmap(SkImageInfo::MakeN32(w, h, kPremul_SkAlphaType), storage, w * 4);\n SkDebugf(\"pixmap.writable_addr() %c= (void *)storage\\n\",\n pixmap.writable_addr() == (void *)storage ? '=' : '!');\n pixmap.erase(0x00000000);\n *(SkPMColor*)pixmap.writable_addr() = 0xFFFFFFFF;\n SkDebugf(\"pixmap.getColor(0, 1) %c= 0x00000000\\n\",\n pixmap.getColor(0, 1) == 0x00000000 ? '=' : '!');\n SkDebugf(\"pixmap.getColor(0, 0) %c= 0xFFFFFFFF\\n\",\n pixmap.getColor(0, 0) == 0xFFFFFFFF ? '=' : '!');\n}", |
| "hash": "74ef460f89ed5904334d0f8883e781c4", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::writable_addr", |
| "stdout": "pixmap.writable_addr() == (void *)storage\\npixmap.getColor(0, 1) == 0x00000000\\npixmap.getColor(0, 0) == 0xFFFFFFFF\\n" |
| }, |
| "SkPixmap_writable_addr_2": { |
| "code": "void draw(SkCanvas* canvas) {\n const int w = 4;\n const int h = 4;\n SkPMColor storage[w * h * 4];\n SkPixmap pixmap(SkImageInfo::MakeN32(w, h, kPremul_SkAlphaType), storage, w * 4);\n SkDebugf(\"pixmap.writable_addr() %c= (void *)storage\\n\",\n pixmap.writable_addr() == (void *)storage ? '=' : '!');\n pixmap.erase(0x00000000);\n *(SkPMColor*)pixmap.writable_addr(1, 2) = 0xFFFFFFFF;\n SkDebugf(\"pixmap.getColor(0, 0) %c= 0x00000000\\n\",\n pixmap.getColor(0, 0) == 0x00000000 ? '=' : '!');\n SkDebugf(\"pixmap.getColor(1, 2) %c= 0xFFFFFFFF\\n\",\n pixmap.getColor(1, 2) == 0xFFFFFFFF ? '=' : '!');\n}", |
| "hash": "559eaca89c765bc8466ea1ba3331d4db", |
| "file": "SkPixmap_Reference", |
| "name": "SkPixmap::writable_addr_2", |
| "stdout": "pixmap.writable_addr() == (void *)storage\\npixmap.getColor(0, 0) == 0x00000000\\npixmap.getColor(1, 2) == 0xFFFFFFFF\\n" |
| }, |
| "SkPoint_Make": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPoint pt1 = {45, 66};\n SkPoint pt2 = SkPoint::Make(45, 66);\n SkVector v1 = {45, 66};\n SkVector v2 = SkPoint::Make(45, 66);\n SkDebugf(\"all %s\" \"equal\\n\", pt1 == pt2 && pt2 == v1 && v1 == v2 ? \"\" : \"not \");\n}", |
| "hash": "d266e70977847001f7c42f8a2513bee7", |
| "file": "SkPoint_Reference", |
| "name": "SkPoint::Make", |
| "stdout": "all equal\\n" |
| }, |
| "SkPoint_equal_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPoint test[] = { {0, -0.f}, {-1, -2}, {SK_ScalarInfinity, 1}, {SK_ScalarNaN, -1} };\n for (const SkPoint& pt : test) {\n SkDebugf(\"pt: %g, %g %c= pt\\n\", pt.fX, pt.fY, pt == pt ? '=' : '!');\n }\n}", |
| "hash": "741f793334a48a35dadf4310d7ea52cb", |
| "file": "SkPoint_Reference", |
| "name": "SkPoint::operator==(const SkPoint& a, const SkPoint& b)", |
| "stdout": "pt: 0, -0 == pt\\npt: -1, -2 == pt\\npt: inf, 1 == pt\\npt: nan, -1 != pt\\n" |
| }, |
| "SkPoint_equals": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPoint test[] = { {0, -0.f}, {-1, -2}, {SK_ScalarInfinity, 1}, {SK_ScalarNaN, -1} };\n for (const SkPoint& pt : test) {\n SkDebugf(\"pt: %g, %g %c= pt\\n\", pt.fX, pt.fY, pt.equals(pt.fX, pt.fY) ? '=' : '!');\n }\n}", |
| "hash": "4cecb878c8b66beffda051f26c00f817", |
| "file": "SkPoint_Reference", |
| "name": "SkPoint::equals()", |
| "stdout": "pt: 0, -0 == pt\\npt: -1, -2 == pt\\npt: inf, 1 == pt\\npt: nan, -1 != pt\\n" |
| }, |
| "SkPoint_isFinite": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPoint test[] = { {0, -0.f}, {-1, -2}, {SK_ScalarInfinity, 1}, {SK_ScalarNaN, -1} };\n for (const SkPoint& pt : test) {\n SkDebugf(\"pt: %g, %g finite: %s\\n\", pt.fX, pt.fY, pt.isFinite() ? \"true\" : \"false\");\n }\n}", |
| "hash": "937cc166cc0e220f33fb82501141d0b3", |
| "file": "SkPoint_Reference", |
| "name": "SkPoint::isFinite", |
| "stdout": "pt: 0, -0 finite: true\\npt: -1, -2 finite: true\\npt: inf, 1 finite: false\\npt: nan, -1 finite: false\\n" |
| }, |
| "SkPoint_isZero": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPoint pt = { 0.f, -0.f};\n SkDebugf(\"pt.fX=%c%g pt.fY=%c%g\\n\", std::signbit(pt.fX) ? '-' : '+', fabsf(pt.fX),\n std::signbit(pt.fY) ? '-' : '+', fabsf(pt.fY));\n SkDebugf(\"pt.isZero() == %s\\n\", pt.isZero() ? \"true\" : \"false\");\n}", |
| "hash": "81b9665110b88ef6bcbc20464aed7da1", |
| "file": "SkPoint_Reference", |
| "name": "SkPoint::isZero", |
| "stdout": "pt.fX=+0 pt.fY=-0\\npt.isZero() == true\\n" |
| }, |
| "SkPoint_iset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPoint pt1, pt2 = { SK_MinS16, SK_MaxS16 };\n pt1.iset(SK_MinS16, SK_MaxS16);\n SkDebugf(\"pt1 %c= pt2\\n\", pt1 == pt2 ? '=' : '!');\n}", |
| "hash": "0d9e8ed734981b5b113f22c7bfde5357", |
| "file": "SkPoint_Reference", |
| "name": "SkPoint::iset()", |
| "stdout": "pt1 == pt2\\n" |
| }, |
| "SkPoint_iset_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIPoint iPt = { SK_MinS32, SK_MaxS32 };\n SkPoint fPt;\n fPt.iset(iPt);\n SkDebugf(\"iPt: %d, %d\\n\", iPt.fX, iPt.fY);\n SkDebugf(\"fPt: %g, %g\\n\", fPt.fX, fPt.fY);\n}", |
| "hash": "12b7164a769e232bb772f19c59600ee7", |
| "file": "SkPoint_Reference", |
| "name": "SkPoint::iset_2", |
| "stdout": "iPt: -2147483647, 2147483647\\nfPt: -2.14748e+09, 2.14748e+09\\n" |
| }, |
| "SkPoint_minus_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPoint test[] = { {0.f, -0.f}, {-1, -2},\n { SK_ScalarInfinity, SK_ScalarNegativeInfinity },\n { SK_ScalarNaN, -SK_ScalarNaN } };\n for (const SkPoint& pt : test) {\n SkPoint negPt = -pt;\n SkDebugf(\"pt: %g, %g negate: %g, %g\\n\", pt.fX, pt.fY, negPt.fX, negPt.fY);\n }\n}", |
| "hash": "9baf247cfcd8272c0ddf6ce93f676b37", |
| "file": "SkPoint_Reference", |
| "name": "SkPoint::operator-() const", |
| "stdout": "pt: 0, -0 negate: -0, 0\\npt: -1, -2 negate: 1, 2\\npt: inf, -inf negate: -inf, inf\\npt: nan, -nan negate: -nan, nan\\n" |
| }, |
| "SkPoint_negate": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPoint test[] = { {0.f, -0.f}, {-1, -2},\n { SK_ScalarInfinity, SK_ScalarNegativeInfinity },\n { SK_ScalarNaN, -SK_ScalarNaN } };\n for (const SkPoint& pt : test) {\n SkPoint negPt = pt;\n negPt.negate();\n SkDebugf(\"pt: %g, %g negate: %g, %g\\n\", pt.fX, pt.fY, negPt.fX, negPt.fY);\n }\n}", |
| "hash": "312c0c8065ab5d0adfda80cccf2d11e6", |
| "file": "SkPoint_Reference", |
| "name": "SkPoint::negate()", |
| "stdout": "pt: 0, -0 negate: -0, 0\\npt: -1, -2 negate: 1, 2\\npt: inf, -inf negate: -inf, inf\\npt: nan, -nan negate: -nan, nan\\n" |
| }, |
| "SkPoint_notequal_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPoint test[] = { {0, -0.f}, {-1, -2}, {SK_ScalarInfinity, 1}, {SK_ScalarNaN, -1} };\n for (const SkPoint& pt : test) {\n SkDebugf(\"pt: %g, %g %c= pt\\n\", pt.fX, pt.fY, pt != pt ? '!' : '=');\n }\n}", |
| "hash": "8fe8572685eaa617f25a5a6767a874dc", |
| "file": "SkPoint_Reference", |
| "name": "SkPoint::operator!=(const SkPoint& a, const SkPoint& b)", |
| "stdout": "pt: 0, -0 == pt\\npt: -1, -2 == pt\\npt: inf, 1 == pt\\npt: nan, -1 != pt\\n" |
| }, |
| "SkPoint_set": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPoint pt1, pt2 = { SK_ScalarPI, SK_ScalarSqrt2 };\n pt1.set(SK_ScalarPI, SK_ScalarSqrt2);\n SkDebugf(\"pt1 %c= pt2\\n\", pt1 == pt2 ? '=' : '!');\n}", |
| "hash": "d08d1e7dafcad4342d1619fdbb2f5781", |
| "file": "SkPoint_Reference", |
| "name": "SkPoint::set()", |
| "stdout": "pt1 == pt2\\n" |
| }, |
| "SkPoint_setAbs": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPoint test[] = { {0.f, -0.f}, {-1, -2},\n { SK_ScalarInfinity, SK_ScalarNegativeInfinity },\n { SK_ScalarNaN, -SK_ScalarNaN } };\n for (const SkPoint& pt : test) {\n SkPoint absPt;\n absPt.setAbs(pt);\n SkDebugf(\"pt: %g, %g abs: %g, %g\\n\", pt.fX, pt.fY, absPt.fX, absPt.fY);\n }\n}", |
| "hash": "7f70860e820b67a347cff03c00488426", |
| "file": "SkPoint_Reference", |
| "name": "SkPoint::setAbs", |
| "stdout": "pt: 0, -0 abs: 0, 0\\npt: -1, -2 abs: 1, 2\\npt: inf, -inf abs: inf, inf\\npt: nan, -nan abs: nan, nan\\n" |
| }, |
| "SkPoint_x": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPoint pt1 = {45, 66};\n SkDebugf(\"pt1.fX %c= pt1.x()\\n\", pt1.fX == pt1.x() ? '=' : '!');\n}", |
| "hash": "9f3fe446b800ae1d940785d438634941", |
| "file": "SkPoint_Reference", |
| "name": "SkPoint::x()", |
| "stdout": "pt1.fX == pt1.x()\\n" |
| }, |
| "SkPoint_y": { |
| "code": "void draw(SkCanvas* canvas) {\n SkPoint pt1 = {45, 66};\n SkDebugf(\"pt1.fY %c= pt1.y()\\n\", pt1.fY == pt1.y() ? '=' : '!');\n}", |
| "hash": "4c962850c2dbea4d2325df469400680e", |
| "file": "SkPoint_Reference", |
| "name": "SkPoint::y()", |
| "stdout": "pt1.fY == pt1.y()\\n" |
| }, |
| "SkRGBA4f_FromColor": { |
| "code": "void draw(SkCanvas* canvas) {\n uint8_t red = 77, green = 101, blue = 153, alpha = 43;\n SkColor argb = SkColorSetARGB(alpha, red, green, blue);\n SkColor4f color4f = SkColor4f::FromColor(argb);\n SkDebugf(\"red=%g green=%g blue=%g alpha=%g\\n\", color4f.fR, color4f.fG, color4f.fB, color4f.fA);\n SkColor fromColor4f = color4f.toSkColor();\n SkDebugf(\"red=%d green=%d blue=%d alpha=%d\\n\", SkColorGetR(fromColor4f),\n SkColorGetG(fromColor4f), SkColorGetB(fromColor4f), SkColorGetA(fromColor4f));\n}", |
| "hash": "33b029064e8d1928e42a587c953d0e4e", |
| "file": "SkColor4f_Reference", |
| "name": "SkRGBA4f::FromColor", |
| "stdout": "red=0.301961 green=0.396078 blue=0.6 alpha=0.168627\\nred=77 green=101 blue=153 alpha=43\\n" |
| }, |
| "SkRGBA4f_equal1_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkColor4f colorRed = { 1, 0, 0, 1 };\n SkColor4f colorNamedRed = SkColor4f::FromColor(SK_ColorRED);\n SkDebugf(\"colorRed %c= colorNamedRed\", colorRed == colorNamedRed ? '=' : '!');\n}", |
| "hash": "e5b34bcb7f80f2ed890cdacaa059db0d", |
| "file": "SkColor4f_Reference", |
| "name": "SkRGBA4f::operator==(const SkRGBA4f& other) const", |
| "stdout": "colorRed == colorNamedRed" |
| }, |
| "SkRGBA4f_notequal1_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkColor4f colorGray = { .5, .5, .5, 1 };\n SkColor4f colorNamedGray = SkColor4f::FromColor(SK_ColorGRAY);\n SkDebugf(\"colorGray %c= colorNamedGray \", colorGray != colorNamedGray ? '!' : '=');\n}", |
| "hash": "82f1a9b4c2b27aa547061786d1f33dab", |
| "file": "SkColor4f_Reference", |
| "name": "SkRGBA4f::operator!=(const SkRGBA4f& other) const", |
| "stdout": "colorGray != colorNamedGray" |
| }, |
| "SkRGBA4f_toSkColor": { |
| "code": "void draw(SkCanvas* canvas) {\n float red = 0.07, green = 0.13, blue = 0.32, alpha = 0.17;\n SkColor4f color4f = { red, green, blue, alpha };\n SkColor argb = color4f.toSkColor();\n SkDebugf(\"red=%d green=%d blue=%d alpha=%d\\n\", SkColorGetR(argb),\n SkColorGetG(argb), SkColorGetB(argb), SkColorGetA(argb));\n SkColor4f fromSkColor = SkColor4f::FromColor(argb);\n SkDebugf(\"red=%g green=%g blue=%g alpha=%g\\n\", fromSkColor.fR, fromSkColor.fG,\n fromSkColor.fB, fromSkColor.fA);\n}", |
| "hash": "edc5fd18d961f7607d2bcbf7f7d427e5", |
| "file": "SkColor4f_Reference", |
| "name": "SkRGBA4f::toSkColor", |
| "stdout": "red=18 green=33 blue=82 alpha=43\\nred=0.0705882 green=0.129412 blue=0.321569 alpha=0.168627\\n" |
| }, |
| "SkRGBA4f_vec": { |
| "code": "void draw(SkCanvas* canvas) {\n SkColor4f color = SkColor4f::FromColor(0x884488CC);\n SkDebugf(\"red=%g green=%g blue=%g alpha=%g\\n\", color.fR, color.fG, color.fB, color.fA);\n const float* array = color.vec();\n SkDebugf(\"[0]=%g [1]=%g [2]=%g [3]=%g\\n\", array[0], array[1], array[2], array[3]);\n}", |
| "hash": "229057023515224358a36acf15508cf6", |
| "file": "SkColor4f_Reference", |
| "name": "SkRGBA4f::vec()", |
| "stdout": "red=0.266667 green=0.533333 blue=0.8 alpha=0.533333\\n[0]=0.266667 [1]=0.533333 [2]=0.8 [3]=0.533333\\n" |
| }, |
| "SkRGBA4f_vec_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkColor4f color = SkColor4f::FromColor(0x884488CC);\n SkDebugf(\"red=%g green=%g blue=%g alpha=%g\\n\", color.fR, color.fG, color.fB, color.fA);\n float* array = color.vec();\n array[3] = 1;\n SkDebugf(\"[0]=%g [1]=%g [2]=%g [3]=%g\\n\", array[0], array[1], array[2], array[3]);\n}", |
| "hash": "7420bf0a7cae5c6577c4c4a4613e7e7e", |
| "file": "SkColor4f_Reference", |
| "name": "SkRGBA4f::vec_2", |
| "stdout": "red=0.266667 green=0.533333 blue=0.8 alpha=0.533333\\n[0]=0.266667 [1]=0.533333 [2]=0.8 [3]=1\\n" |
| }, |
| "SkRRect_dump": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRRect rrect = SkRRect::MakeRect({6.f / 7, 2.f / 3, 6.f / 7, 2.f / 3});\n for (bool dumpAsHex : { false, true } ) {\n rrect.dump(dumpAsHex);\n }\n}", |
| "hash": "265b8d23288dc8026ff788e809360af7", |
| "file": "SkRRect_Reference", |
| "name": "SkRRect::dump()", |
| "stdout": "SkRect::MakeLTRB(0.857143f, 0.666667f, 0.857143f, 0.666667f);\\nconst SkPoint corners[] = {\\n { 0, 0 },\\n { 0, 0 },\\n { 0, 0 },\\n { 0, 0 },\\n};\\nSkRect::MakeLTRB(SkBits2Float(0x3f5b6db7), /* 0.857143 */\\n SkBits2Float(0x3f2aaaab), /* 0.666667 */\\n SkBits2Float(0x3f5b6db7), /* 0.857143 */\\n SkBits2Float(0x3f2aaaab) /* 0.666667 */);\\nconst SkPoint corners[] = {\\n { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */\\n { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */\\n { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */\\n { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */\\n};\\n" |
| }, |
| "SkRRect_dumpHex": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRRect rrect = SkRRect::MakeRect({6.f / 7, 2.f / 3, 6.f / 7, 2.f / 3});\n rrect.dumpHex();\n SkRect bounds = SkRect::MakeLTRB(SkBits2Float(0x3f5b6db7), /* 0.857143 */\n SkBits2Float(0x3f2aaaab), /* 0.666667 */\n SkBits2Float(0x3f5b6db7), /* 0.857143 */\n SkBits2Float(0x3f2aaaab) /* 0.666667 */);\n const SkPoint corners[] = {\n { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */\n { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */\n { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */\n { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */\n };\n SkRRect copy;\n copy.setRectRadii(bounds, corners);\n SkDebugf(\"rrect is \" \"%s\" \"equal to copy\\n\", rrect == copy ? \"\" : \"not \");\n}", |
| "hash": "c73f5e2644d949b859f05bd367883454", |
| "file": "SkRRect_Reference", |
| "name": "SkRRect::dumpHex", |
| "stdout": "SkRect::MakeLTRB(SkBits2Float(0x3f5b6db7), /* 0.857143 */\\n SkBits2Float(0x3f2aaaab), /* 0.666667 */\\n SkBits2Float(0x3f5b6db7), /* 0.857143 */\\n SkBits2Float(0x3f2aaaab) /* 0.666667 */);\\nconst SkPoint corners[] = {\\n { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */\\n { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */\\n { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */\\n { SkBits2Float(0x00000000), SkBits2Float(0x00000000) }, /* 0.000000 0.000000 */\\n};\\nrrect is equal to copy\\n" |
| }, |
| "SkRRect_dump_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRRect rrect = SkRRect::MakeRect({6.f / 7, 2.f / 3, 6.f / 7, 2.f / 3});\n rrect.dump();\n SkRect bounds = SkRect::MakeLTRB(0.857143f, 0.666667f, 0.857143f, 0.666667f);\n const SkPoint corners[] = {\n { 0, 0 },\n { 0, 0 },\n { 0, 0 },\n { 0, 0 },\n };\n SkRRect copy;\n copy.setRectRadii(bounds, corners);\n SkDebugf(\"rrect is \" \"%s\" \"equal to copy\\n\", rrect == copy ? \"\" : \"not \");\n}", |
| "hash": "f850423c7c0c4f803d479ecd92221059", |
| "file": "SkRRect_Reference", |
| "name": "SkRRect::dump_2", |
| "stdout": "SkRect::MakeLTRB(0.857143f, 0.666667f, 0.857143f, 0.666667f);\\nconst SkPoint corners[] = {\\n { 0, 0 },\\n { 0, 0 },\\n { 0, 0 },\\n { 0, 0 },\\n};\\nrrect is not equal to copy\\n" |
| }, |
| "SkRRect_height": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRRect unsorted = SkRRect::MakeRect({ 15, 25, 10, 20 });\n SkDebugf(\"unsorted height: %g\\n\", unsorted.height());\n SkRRect large = SkRRect::MakeRect({ 1, -FLT_MAX, 2, FLT_MAX });\n SkDebugf(\"large height: %.0f\\n\", large.height());\n}", |
| "hash": "5a3eb1755164a7becec33cec6e6eca31", |
| "file": "SkRRect_Reference", |
| "name": "SkRRect::height()", |
| "stdout": "unsorted height: 5\\nlarge height: inf\\n" |
| }, |
| "SkRRect_radii": { |
| "code": "void draw(SkCanvas* canvas) {\n for (SkScalar radiusX : { SK_ScalarNaN, SK_ScalarInfinity, 100.f, 50.f, 25.f} ) {\n SkRRect rrect1 = SkRRect::MakeRectXY({10, 20, 60, 220}, radiusX, 200);\n SkDebugf(\"left corner: (%g) %g\\n\", radiusX, rrect1.radii(SkRRect::kUpperLeft_Corner).fX);\n }\n}", |
| "hash": "8d5c88478528584913867ada423e0d59", |
| "file": "SkRRect_Reference", |
| "name": "SkRRect::radii()", |
| "stdout": "left corner: (nan) 0\\nleft corner: (inf) 0\\nleft corner: (100) 25\\nleft corner: (50) 25\\nleft corner: (25) 12.5\\n" |
| }, |
| "SkRRect_rect": { |
| "code": "void draw(SkCanvas* canvas) {\n for (SkScalar left : { SK_ScalarNaN, SK_ScalarInfinity, 100.f, 50.f, 25.f} ) {\n SkRRect rrect1 = SkRRect::MakeRectXY({left, 20, 60, 220}, 50, 200);\n SkDebugf(\"left bounds: (%g) %g\\n\", left, rrect1.rect().fLeft);\n }\n}", |
| "hash": "6831adf4c536047f4709c686feb10c48", |
| "file": "SkRRect_Reference", |
| "name": "SkRRect::rect()", |
| "stdout": "left bounds: (nan) 0\\nleft bounds: (inf) 0\\nleft bounds: (100) 60\\nleft bounds: (50) 50\\nleft bounds: (25) 25\\n" |
| }, |
| "SkRRect_width": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRRect unsorted = SkRRect::MakeRect({ 15, 25, 10, 5 });\n SkDebugf(\"unsorted width: %g\\n\", unsorted.width());\n SkRRect large = SkRRect::MakeRect({ -FLT_MAX, 1, FLT_MAX, 2 });\n SkDebugf(\"large width: %.0f\\n\", large.width());\n}", |
| "hash": "c675a480b41dee157f84fa2550a2a53c", |
| "file": "SkRRect_Reference", |
| "name": "SkRRect::width()", |
| "stdout": "unsorted width: 5\\nlarge width: inf\\n" |
| }, |
| "SkRect_Intersects": { |
| "code": "void draw(SkCanvas* canvas) {\n SkDebugf(\"%s intersection\", SkRect::Intersects({10, 40, 50, 80}, {30, 60, 70, 90}) ? \"\" : \"no \");\n}", |
| "hash": "795061764b10c9e05efb466c9cb60644", |
| "file": "SkRect_Reference", |
| "name": "SkRect::Intersects", |
| "stdout": "intersection" |
| }, |
| "SkRect_Make": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect1 = SkRect::MakeSize({2, 35});\n SkRect rect2 = SkRect::MakeIWH(2, 35);\n SkDebugf(\"rect1 %c= rect2\\n\", rect1 == rect2 ? '=' : '!');\n}", |
| "hash": "e866f5e4f6ac52e89acadf48e54ac8e0", |
| "file": "SkRect_Reference", |
| "name": "SkRect::Make", |
| "stdout": "rect1 == rect2\\n" |
| }, |
| "SkRect_MakeEmpty": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = SkRect::MakeEmpty();\n SkDebugf(\"MakeEmpty isEmpty: %s\\n\", rect.isEmpty() ? \"true\" : \"false\");\n rect.offset(10, 10);\n SkDebugf(\"offset rect isEmpty: %s\\n\", rect.isEmpty() ? \"true\" : \"false\");\n rect.inset(10, 10);\n SkDebugf(\"inset rect isEmpty: %s\\n\", rect.isEmpty() ? \"true\" : \"false\");\n rect.outset(20, 20);\n SkDebugf(\"outset rect isEmpty: %s\\n\", rect.isEmpty() ? \"true\" : \"false\");\n}", |
| "hash": "2e262d0ac4b8ef51695e0525fc3ecdf6", |
| "file": "SkRect_Reference", |
| "name": "SkRect::MakeEmpty", |
| "stdout": "MakeEmpty isEmpty: true\\noffset rect isEmpty: true\\ninset rect isEmpty: true\\noutset rect isEmpty: false\\n" |
| }, |
| "SkRect_MakeIWH": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect i_rect = SkIRect::MakeWH(25, 35);\n SkRect f_rect = SkRect::MakeIWH(25, 35);\n SkDebugf(\"i_rect width: %d f_rect width:%g\\n\", i_rect.width(), f_rect.width());\n i_rect = SkIRect::MakeWH(125000111, 0);\n f_rect = SkRect::MakeIWH(125000111, 0);\n SkDebugf(\"i_rect width: %d f_rect width:%.0f\\n\", i_rect.width(), f_rect.width());\n}", |
| "hash": "faa660ac19eaddc3f3eab57a0bddfdcb", |
| "file": "SkRect_Reference", |
| "name": "SkRect::MakeIWH", |
| "stdout": "i_rect width: 25 f_rect width:25\\ni_rect width: 125000111 f_rect width:125000112\\n" |
| }, |
| "SkRect_MakeLTRB": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = SkRect::MakeLTRB(5, 35, 15, 25);\n SkDebugf(\"rect: %g, %g, %g, %g isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n rect.sort();\n SkDebugf(\"rect: %g, %g, %g, %g isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n}", |
| "hash": "158b8dd9d02d65a5ae5ab7d1595a5b4c", |
| "file": "SkRect_Reference", |
| "name": "SkRect::MakeLTRB", |
| "stdout": "rect: 5, 35, 15, 25 isEmpty: true\\nrect: 5, 25, 15, 35 isEmpty: false\\n" |
| }, |
| "SkRect_MakeSize": { |
| "code": "void draw(SkCanvas* canvas) {\n SkSize size = {25.5f, 35.5f};\n SkRect rect = SkRect::MakeSize(size);\n SkDebugf(\"rect width: %g height: %g\\n\", rect.width(), rect.height());\n SkISize floor = size.toFloor();\n rect = SkRect::MakeSize(SkSize::Make(floor));\n SkDebugf(\"floor width: %g height: %g\\n\", rect.width(), rect.height());\n}", |
| "hash": "ab2c1a55016c8de9172b77fdf69e00a2", |
| "file": "SkRect_Reference", |
| "name": "SkRect::MakeSize", |
| "stdout": "rect width: 25.5 height: 35.5\\nfloor width: 25 height: 35\\n" |
| }, |
| "SkRect_MakeWH": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect1 = SkRect::MakeWH(25, 35);\n SkRect rect2 = SkRect::MakeIWH(25, 35);\n SkRect rect3 = SkRect::MakeXYWH(0, 0, 25, 35);\n SkRect rect4 = SkRect::MakeLTRB(0, 0, 25, 35);\n SkDebugf(\"all %s\" \"equal\\n\", rect1 == rect2 && rect2 == rect3 && rect3 == rect4 ?\n \"\" : \"not \");\n}", |
| "hash": "8009d30f431e01f8aea4808e9017d9bf", |
| "file": "SkRect_Reference", |
| "name": "SkRect::MakeWH", |
| "stdout": "all equal\\n" |
| }, |
| "SkRect_MakeXYWH": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = SkRect::MakeXYWH(5, 35, -15, 25);\n SkDebugf(\"rect: %g, %g, %g, %g isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n rect.sort();\n SkDebugf(\"rect: %g, %g, %g, %g isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n}", |
| "hash": "38e464dba13be11ac21e210fbf3b5afc", |
| "file": "SkRect_Reference", |
| "name": "SkRect::MakeXYWH", |
| "stdout": "rect: 5, 35, -10, 60 isEmpty: true\\nrect: -10, 35, 5, 60 isEmpty: false\\n" |
| }, |
| "SkRect_Make_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect i_rect1 = {2, 35, 22, 53};\n SkRect f_rect = SkRect::Make(i_rect1);\n f_rect.offset(0.49f, 0.49f);\n SkIRect i_rect2;\n f_rect.round(&i_rect2);\n SkDebugf(\"i_rect1 %c= i_rect2\\n\", i_rect1 == i_rect2? '=' : '!');\n}", |
| "hash": "dd801faa1e60a0fe9e0657674461e063", |
| "file": "SkRect_Reference", |
| "name": "SkRect::Make_2", |
| "stdout": "i_rect1 == i_rect2\\n" |
| }, |
| "SkRect_asScalars": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = {7, 11, 13, 17};\n SkDebugf(\"rect.asScalars() %c= &rect.fLeft\\n\", rect.asScalars() == &rect.fLeft? '=' : '!');\n}", |
| "hash": "e1ea5f949d80276f3637931eae93a07c", |
| "file": "SkRect_Reference", |
| "name": "SkRect::asScalars", |
| "stdout": "rect.asScalars() == &rect.fLeft\\n" |
| }, |
| "SkRect_bottom": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect unsorted = { 15, 25, 10, 5 };\n SkDebugf(\"unsorted.fBottom: %g unsorted.bottom(): %g\\n\", unsorted.fBottom, unsorted.bottom());\n SkRect sorted = unsorted.makeSorted();\n SkDebugf(\"sorted.fBottom: %g sorted.bottom(): %g\\n\", sorted.fBottom, sorted.bottom());\n}", |
| "hash": "a98993a66616ae406d8bdc54adfb1411", |
| "file": "SkRect_Reference", |
| "name": "SkRect::bottom()", |
| "stdout": "unsorted.fBottom: 5 unsorted.bottom(): 5\\nsorted.fBottom: 25 sorted.bottom(): 25\\n" |
| }, |
| "SkRect_centerX": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect tests[] = {{20, 30, 41, 51}, {-20, -30, -41, -51}};\n for (auto rect : tests) {\n SkDebugf(\"left: %3g right: %3g centerX: %3g\\n\", rect.left(), rect.right(), rect.centerX());\n rect.sort();\n SkDebugf(\"left: %3g right: %3g centerX: %3g\\n\", rect.left(), rect.right(), rect.centerX());\n }\n}", |
| "hash": "d8439ba8d23a424fa032fb97147fd2d2", |
| "file": "SkRect_Reference", |
| "name": "SkRect::centerX", |
| "stdout": "left: 20 right: 41 centerX: 30.5\\nleft: 20 right: 41 centerX: 30.5\\nleft: -20 right: -41 centerX: -30.5\\nleft: -41 right: -20 centerX: -30.5\\n" |
| }, |
| "SkRect_centerY": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 2e+38, 2e+38, 3e+38, 3e+38 };\n SkDebugf(\"left: %g right: %g centerX: %g \", rect.left(), rect.right(), rect.centerX());\n SkDebugf(\"safe mid x: %g\\n\", rect.left() / 2 + rect.right() / 2);\n}", |
| "hash": "ebeeafafeb8fe39d5ffc9115b02c2340", |
| "file": "SkRect_Reference", |
| "name": "SkRect::centerY", |
| "stdout": "left: 2e+38 right: 3e+38 centerX: 2.5e+38 safe mid x: 2.5e+38\\n" |
| }, |
| "SkRect_contains": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 30, 50, 40, 60 };\n SkPoint tests[] = { { 30, 50 }, { 39, 49 }, { 29, 59 } };\n for (auto contained : tests) {\n SkDebugf(\"rect: (%g, %g, %g, %g) %s (%g, %g)\\n\",\n rect.left(), rect.top(), rect.right(), rect.bottom(),\n rect.contains(contained.x(), contained.y()) ? \"contains\" : \"does not contain\",\n contained.x(), contained.y());\n }\n}", |
| "hash": "85be528a78945a6dc4f7dccb80a80746", |
| "file": "SkRect_Reference", |
| "name": "SkRect::contains()", |
| "stdout": "rect: (30, 50, 40, 60) contains (30, 50)\\nrect: (30, 50, 40, 60) does not contain (39, 49)\\nrect: (30, 50, 40, 60) does not contain (29, 59)\\n" |
| }, |
| "SkRect_contains_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 30, 50, 40, 60 };\n SkRect tests[] = { { 30, 50, 31, 51}, { 39, 49, 40, 50}, { 29, 59, 30, 60} };\n for (auto contained : tests) {\n SkDebugf(\"rect: (%g, %g, %g, %g) %s (%g, %g, %g, %g)\\n\",\n rect.left(), rect.top(), rect.right(), rect.bottom(),\n rect.contains(contained) ? \"contains\" : \"does not contain\",\n contained.left(), contained.top(), contained.right(), contained.bottom());\n }\n}", |
| "hash": "92f9e6aa5bb76791139a24cf7d8df99e", |
| "file": "SkRect_Reference", |
| "name": "SkRect::contains_2", |
| "stdout": "rect: (30, 50, 40, 60) contains (30, 50, 31, 51)\\nrect: (30, 50, 40, 60) does not contain (39, 49, 40, 50)\\nrect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)\\n" |
| }, |
| "SkRect_contains_3": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 30, 50, 40, 60 };\n SkIRect tests[] = { { 30, 50, 31, 51}, { 39, 49, 40, 50}, { 29, 59, 30, 60} };\n for (auto contained : tests) {\n SkDebugf(\"rect: (%g, %g, %g, %g) %s (%d, %d, %d, %d)\\n\",\n rect.left(), rect.top(), rect.right(), rect.bottom(),\n rect.contains(contained) ? \"contains\" : \"does not contain\",\n contained.left(), contained.top(), contained.right(), contained.bottom());\n }\n}", |
| "hash": "dd58b699551dd44026a2c6386be27d88", |
| "file": "SkRect_Reference", |
| "name": "SkRect::contains_3", |
| "stdout": "rect: (30, 50, 40, 60) contains (30, 50, 31, 51)\\nrect: (30, 50, 40, 60) does not contain (39, 49, 40, 50)\\nrect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)\\n" |
| }, |
| "SkRect_dump": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = {20, 30, 40, 50};\n for (bool dumpAsHex : { false, true } ) {\n rect.dump(dumpAsHex);\n SkDebugf(\"\\n\");\n }\n}", |
| "hash": "cea049ffff702a5923da41fe0ae0763b", |
| "file": "SkRect_Reference", |
| "name": "SkRect::dump()", |
| "stdout": "SkRect::MakeLTRB(20, 30, 40, 50);\\n\\nSkRect::MakeLTRB(SkBits2Float(0x41a00000), /* 20.000000 */\\n SkBits2Float(0x41f00000), /* 30.000000 */\\n SkBits2Float(0x42200000), /* 40.000000 */\\n SkBits2Float(0x42480000) /* 50.000000 */);\\n\\n" |
| }, |
| "SkRect_dumpHex": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = {6.f / 7, 2.f / 3, 26.f / 10, 42.f / 6};\n rect.dumpHex();\n SkRect copy = SkRect::MakeLTRB(SkBits2Float(0x3f5b6db7), /* 0.857143 */\n SkBits2Float(0x3f2aaaab), /* 0.666667 */\n SkBits2Float(0x40266666), /* 2.600000 */\n SkBits2Float(0x40e00000) /* 7.000000 */);\n SkDebugf(\"rect is \" \"%s\" \"equal to copy\\n\", rect == copy ? \"\" : \"not \");\n}", |
| "hash": "824b5a3fcfd46a7e1c5f9e3c16e6bb39", |
| "file": "SkRect_Reference", |
| "name": "SkRect::dumpHex", |
| "stdout": "SkRect::MakeLTRB(SkBits2Float(0x3f5b6db7), /* 0.857143 */\\n SkBits2Float(0x3f2aaaab), /* 0.666667 */\\n SkBits2Float(0x40266666), /* 2.600000 */\\n SkBits2Float(0x40e00000) /* 7.000000 */);\\nrect is equal to copy\\n" |
| }, |
| "SkRect_dump_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = {6.f / 7, 2.f / 3, 26.f / 10, 42.f / 6};\n rect.dump();\n SkRect copy = SkRect::MakeLTRB(0.857143f, 0.666667f, 2.6f, 7);\n SkDebugf(\"rect is \" \"%s\" \"equal to copy\\n\", rect == copy ? \"\" : \"not \");\n}", |
| "hash": "9fb76971b1a104a2a59816e0392267a7", |
| "file": "SkRect_Reference", |
| "name": "SkRect::dump_2", |
| "stdout": "SkRect::MakeLTRB(0.857143f, 0.666667f, 2.6f, 7);\\nrect is not equal to copy\\n" |
| }, |
| "SkRect_equal_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n auto debugster = [](const SkRect& test) -> void {\n SkRect negZero = {-0.0f, -0.0f, 2, 2};\n SkDebugf(\"{%g, %g, %g, %g} %c= {%g, %g, %g, %g} %s numerically equal\\n\",\n test.fLeft, test.fTop, test.fRight, test.fBottom,\n negZero.fLeft, negZero.fTop, negZero.fRight, negZero.fBottom,\n test == negZero ? '=' : '!',\n test.fLeft == negZero.fLeft && test.fTop == negZero.fTop &&\n test.fRight == negZero.fRight && test.fBottom == negZero.fBottom ?\n \"and are\" : \"yet are not\");\n };\n SkRect tests[] = {{0, 0, 2, 2}, {-0, -0, 2, 2}, {0.0f, 0.0f, 2, 2}};\n SkDebugf(\"tests are %s\" \"equal\\n\", tests[0] == tests[1] && tests[1] == tests[2] ? \"\" : \"not \");\n for (auto rect : tests) {\n debugster(rect);\n }\n}", |
| "hash": "c6c5b40cad7c3a839fdf576b380391a6", |
| "file": "SkRect_Reference", |
| "name": "SkRect::operator==(const SkRect& a, const SkRect& b)", |
| "stdout": "tests are equal\\n{0, 0, 2, 2} == {-0, -0, 2, 2} and are numerically equal\\n{0, 0, 2, 2} == {-0, -0, 2, 2} and are numerically equal\\n{0, 0, 2, 2} == {-0, -0, 2, 2} and are numerically equal\\n" |
| }, |
| "SkRect_height": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect unsorted = { 15, 25, 10, 20 };\n SkDebugf(\"unsorted height: %g\\n\", unsorted.height());\n SkRect large = { 1, -2147483647.f, 2, 2147483644.f };\n SkDebugf(\"large height: %.0f\\n\", large.height());\n}", |
| "hash": "39429e45f05240218ecd511443ab3e44", |
| "file": "SkRect_Reference", |
| "name": "SkRect::height()", |
| "stdout": "unsorted height: -5\\nlarge height: 4294967296\\n" |
| }, |
| "SkRect_inset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 10, 14, 50, 73 };\n rect.inset(5, 13);\n SkDebugf(\"rect: %g, %g, %g, %g\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n}", |
| "hash": "dae21340941dc6e4d048816dfd9f204c", |
| "file": "SkRect_Reference", |
| "name": "SkRect::inset()", |
| "stdout": "rect: 15, 27, 45, 60\\n" |
| }, |
| "SkRect_intersect": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect leftRect = { 10, 40, 50, 80 };\n SkRect rightRect = { 30, 60, 70, 90 };\n SkDebugf(\"%s intersection: \", leftRect.intersect(rightRect) ? \"\" : \"no \");\n SkDebugf(\"%g, %g, %g, %g\\n\", leftRect.left(), leftRect.top(),\n leftRect.right(), leftRect.bottom());\n}", |
| "hash": "5d0b12e0ef6f1c181dddded4274230ca", |
| "file": "SkRect_Reference", |
| "name": "SkRect::intersect()", |
| "stdout": "intersection: 30, 60, 50, 80\\n" |
| }, |
| "SkRect_intersect_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect leftRect = { 10, 40, 50, 80 };\n SkDebugf(\"%s intersection: \", leftRect.intersect(30, 60, 70, 90) ? \"\" : \"no \");\n SkDebugf(\"%g, %g, %g, %g\\n\", leftRect.left(), leftRect.top(),\n leftRect.right(), leftRect.bottom());\n}", |
| "hash": "5002f65a72def2787086a33131933e70", |
| "file": "SkRect_Reference", |
| "name": "SkRect::intersect_2", |
| "stdout": "intersection: 30, 60, 50, 80\\n" |
| }, |
| "SkRect_intersect_3": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect result;\n bool intersected = result.intersect({ 10, 40, 50, 80 }, { 30, 60, 70, 90 });\n SkDebugf(\"%s intersection: %g, %g, %g, %g\\n\", intersected ? \"\" : \"no \",\n result.left(), result.top(), result.right(), result.bottom());\n}", |
| "hash": "d610437a65dd3e952719efe605cbd0c7", |
| "file": "SkRect_Reference", |
| "name": "SkRect::intersect_3", |
| "stdout": "intersection: 30, 60, 50, 80\\n" |
| }, |
| "SkRect_intersects": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 10, 40, 50, 80 };\n SkDebugf(\"%s intersection\", rect.intersects(30, 60, 70, 90) ? \"\" : \"no \");\n}", |
| "hash": "7145dc17ebce4f54e892102f6c98e811", |
| "file": "SkRect_Reference", |
| "name": "SkRect::intersects()", |
| "stdout": "intersection" |
| }, |
| "SkRect_intersects_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 10, 40, 50, 80 };\n SkDebugf(\"%s intersection\", rect.intersects({30, 60, 70, 90}) ? \"\" : \"no \");\n}", |
| "hash": "ca37b4231b21eb8296cb19ba9e0c781b", |
| "file": "SkRect_Reference", |
| "name": "SkRect::intersects_2", |
| "stdout": "intersection" |
| }, |
| "SkRect_isEmpty": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect tests[] = {{20, 40, 10, 50}, {20, 40, 20, 50}};\n for (auto rect : tests) {\n SkDebugf(\"rect: {%g, %g, %g, %g} is\" \"%s empty\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"\" : \" not\");\n rect.sort();\n SkDebugf(\"sorted: {%g, %g, %g, %g} is\" \"%s empty\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"\" : \" not\");\n }\n}", |
| "hash": "1d7b924d6ca2a6aef09684a8a632439c", |
| "file": "SkRect_Reference", |
| "name": "SkRect::isEmpty", |
| "stdout": "rect: {20, 40, 10, 50} is empty\\nsorted: {10, 40, 20, 50} is not empty\\nrect: {20, 40, 20, 50} is empty\\nsorted: {20, 40, 20, 50} is empty\\n" |
| }, |
| "SkRect_isFinite": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect largest = { SK_ScalarMin, SK_ScalarMin, SK_ScalarMax, SK_ScalarMax };\n SkDebugf(\"largest is finite: %s\\n\", largest.isFinite() ? \"true\" : \"false\");\n SkDebugf(\"large width %g\\n\", largest.width());\n SkRect widest = SkRect::MakeWH(largest.width(), largest.height());\n SkDebugf(\"widest is finite: %s\\n\", widest.isFinite() ? \"true\" : \"false\");\n}", |
| "hash": "443fe5f8296d4cdb19cc9862a9cf77a4", |
| "file": "SkRect_Reference", |
| "name": "SkRect::isFinite", |
| "stdout": "largest is finite: true\\nlarge width inf\\nwidest is finite: false\\n" |
| }, |
| "SkRect_isSorted": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect tests[] = {{20, 40, 10, 50}, {20, 40, 20, 50}};\n for (auto rect : tests) {\n SkDebugf(\"rect: {%g, %g, %g, %g} is\" \"%s sorted\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isSorted() ? \"\" : \" not\");\n rect.sort();\n SkDebugf(\"sorted: {%g, %g, %g, %g} is\" \"%s sorted\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isSorted() ? \"\" : \" not\");\n }\n}", |
| "hash": "c7065a83b220a96f903dbbb65906fe7b", |
| "file": "SkRect_Reference", |
| "name": "SkRect::isSorted", |
| "stdout": "rect: {20, 40, 10, 50} is not sorted\\nsorted: {10, 40, 20, 50} is sorted\\nrect: {20, 40, 20, 50} is sorted\\nsorted: {20, 40, 20, 50} is sorted\\n" |
| }, |
| "SkRect_iset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect1 = {3, 4, 1, 2};\n SkDebugf(\"rect1: {%g, %g, %g, %g}\\n\", rect1.fLeft, rect1.fTop, rect1.fRight, rect1.fBottom);\n SkRect rect2;\n rect2.iset(3, 4, 1, 2);\n SkDebugf(\"rect2: {%g, %g, %g, %g}\\n\", rect2.fLeft, rect2.fTop, rect2.fRight, rect2.fBottom);\n}", |
| "hash": "18532f1aa90b76364fb8d7ea072f1892", |
| "file": "SkRect_Reference", |
| "name": "SkRect::iset()", |
| "stdout": "rect1: {3, 4, 1, 2}\\nrect2: {3, 4, 1, 2}\\n" |
| }, |
| "SkRect_isetWH": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect1 = {0, 0, 1, 2};\n SkDebugf(\"rect1: {%g, %g, %g, %g}\\n\", rect1.fLeft, rect1.fTop, rect1.fRight, rect1.fBottom);\n SkRect rect2;\n rect2.isetWH(1, 2);\n SkDebugf(\"rect2: {%g, %g, %g, %g}\\n\", rect2.fLeft, rect2.fTop, rect2.fRight, rect2.fBottom);\n}", |
| "hash": "ee6000080fc7123214ea404018cf9176", |
| "file": "SkRect_Reference", |
| "name": "SkRect::isetWH", |
| "stdout": "rect1: {0, 0, 1, 2}\\nrect2: {0, 0, 1, 2}\\n" |
| }, |
| "SkRect_join": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 10, 20, 15, 25};\n rect.join(50, 60, 55, 65);\n SkDebugf(\"join: %g, %g, %g, %g\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n}", |
| "hash": "afa9c6b4d05bb669db07fe0b7b97e6aa", |
| "file": "SkRect_Reference", |
| "name": "SkRect::join()", |
| "stdout": "join: 10, 20, 55, 65\\n" |
| }, |
| "SkRect_joinNonEmptyArg": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 10, 100, 15, 0};\n SkRect sorted = rect.makeSorted();\n SkRect toJoin = { 50, 60, 55, 65 };\n rect.joinNonEmptyArg(toJoin);\n SkDebugf(\"rect: %g, %g, %g, %g\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n sorted.joinNonEmptyArg(toJoin);\n SkDebugf(\"sorted: %g, %g, %g, %g\\n\", sorted.fLeft, sorted.fTop, sorted.fRight, sorted.fBottom);\n}", |
| "hash": "88439de2aa0911262c60c0eb506396cb", |
| "file": "SkRect_Reference", |
| "name": "SkRect::joinNonEmptyArg", |
| "stdout": "rect: 50, 60, 55, 65\\nsorted: 10, 0, 55, 100\\n" |
| }, |
| "SkRect_joinPossiblyEmptyRect": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 10, 100, 15, 0};\n SkRect sorted = rect.makeSorted();\n SkRect toJoin = { 50, 60, 55, 65 };\n rect.joinPossiblyEmptyRect(toJoin);\n SkDebugf(\"rect: %g, %g, %g, %g\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n sorted.joinPossiblyEmptyRect(toJoin);\n SkDebugf(\"sorted: %g, %g, %g, %g\\n\", sorted.fLeft, sorted.fTop, sorted.fRight, sorted.fBottom);\n}", |
| "hash": "a476548d0001296afd8e58c1eba1b70b", |
| "file": "SkRect_Reference", |
| "name": "SkRect::joinPossiblyEmptyRect", |
| "stdout": "rect: 10, 60, 55, 65\\nsorted: 10, 0, 55, 100\\n" |
| }, |
| "SkRect_join_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 10, 20, 15, 25};\n rect.join({50, 60, 55, 65});\n SkDebugf(\"join: %g, %g, %g, %g\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n}", |
| "hash": "26500032494cf93c5fa3423110fe82af", |
| "file": "SkRect_Reference", |
| "name": "SkRect::join_2", |
| "stdout": "join: 10, 20, 55, 65\\n" |
| }, |
| "SkRect_left": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect unsorted = { 15, 5, 10, 25 };\n SkDebugf(\"unsorted.fLeft: %g unsorted.left(): %g\\n\", unsorted.fLeft, unsorted.left());\n SkRect sorted = unsorted.makeSorted();\n SkDebugf(\"sorted.fLeft: %g sorted.left(): %g\\n\", sorted.fLeft, sorted.left());\n}", |
| "hash": "900dc96c3549795a87036d6458c4fde6", |
| "file": "SkRect_Reference", |
| "name": "SkRect::left()", |
| "stdout": "unsorted.fLeft: 15 unsorted.left(): 15\\nsorted.fLeft: 10 sorted.left(): 10\\n" |
| }, |
| "SkRect_makeInset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 10, 50, 20, 60 };\n SkDebugf(\"rect: %g, %g, %g, %g isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n rect = rect.makeInset(15, 32);\n SkDebugf(\"rect: %g, %g, %g, %g isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n}", |
| "hash": "b8d32ab2f7ea3d4d5fb5a4ea2156f1c5", |
| "file": "SkRect_Reference", |
| "name": "SkRect::makeInset", |
| "stdout": "rect: 10, 50, 20, 60 isEmpty: false\\nrect: 25, 82, 5, 28 isEmpty: true\\n" |
| }, |
| "SkRect_makeOffset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 10, 50, 20, 60 };\n SkDebugf(\"rect: %g, %g, %g, %g isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n rect = rect.makeOffset(15, 32);\n SkDebugf(\"rect: %g, %g, %g, %g isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n}", |
| "hash": "98841ab0a932f99cccd8e6a34d94ba05", |
| "file": "SkRect_Reference", |
| "name": "SkRect::makeOffset", |
| "stdout": "rect: 10, 50, 20, 60 isEmpty: false\\nrect: 25, 82, 35, 92 isEmpty: false\\n" |
| }, |
| "SkRect_makeOutset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 10, 50, 20, 60 };\n SkDebugf(\"rect: %g, %g, %g, %g isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n rect = rect.makeOutset(15, 32);\n SkDebugf(\"rect: %g, %g, %g, %g isEmpty: %s\\n\", rect.left(), rect.top(), rect.right(),\n rect.bottom(), rect.isEmpty() ? \"true\" : \"false\");\n}", |
| "hash": "87176fc60914cbca9c6a20998a033c24", |
| "file": "SkRect_Reference", |
| "name": "SkRect::makeOutset", |
| "stdout": "rect: 10, 50, 20, 60 isEmpty: false\\nrect: -5, 18, 35, 92 isEmpty: false\\n" |
| }, |
| "SkRect_makeSorted": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 30.5f, 50.5f, 20.5f, 10.5f };\n SkDebugf(\"rect: %g, %g, %g, %g\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n SkRect sort = rect.makeSorted();\n SkDebugf(\"sorted: %g, %g, %g, %g\\n\", sort.fLeft, sort.fTop, sort.fRight, sort.fBottom);\n}", |
| "hash": "f59567042b87f6b26f9bfeeb04468032", |
| "file": "SkRect_Reference", |
| "name": "SkRect::makeSorted", |
| "stdout": "rect: 30.5, 50.5, 20.5, 10.5\\nsorted: 20.5, 10.5, 30.5, 50.5\\n" |
| }, |
| "SkRect_notequal_operator": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect test = {0, 0, 2, SK_ScalarNaN};\n SkDebugf(\"test with NaN is %s\" \"equal to itself\\n\", test == test ? \"\" : \"not \");\n}", |
| "hash": "286072f8c27ff15be9eb945fa38dc9f7", |
| "file": "SkRect_Reference", |
| "name": "SkRect::operator!=(const SkRect& a, const SkRect& b)", |
| "stdout": "test with NaN is not equal to itself\\n" |
| }, |
| "SkRect_offset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 10, 14, 50, 73 };\n rect.offset(5, 13);\n SkDebugf(\"rect: %g, %g, %g, %g\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n}", |
| "hash": "04eb33f0fd376f2942ca5f1c7f6cbcfc", |
| "file": "SkRect_Reference", |
| "name": "SkRect::offset()", |
| "stdout": "rect: 15, 27, 55, 86\\n" |
| }, |
| "SkRect_offsetTo": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 10, 14, 50, 73 };\n rect.offsetTo(15, 27);\n SkDebugf(\"rect: %g, %g, %g, %g\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n}", |
| "hash": "bedb04b7b3e1af3e8039f9cffe66989e", |
| "file": "SkRect_Reference", |
| "name": "SkRect::offsetTo", |
| "stdout": "rect: 15, 27, 55, 86\\n" |
| }, |
| "SkRect_offset_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 10, 14, 50, 73 };\n rect.offset({5, 13});\n SkDebugf(\"rect: %g, %g, %g, %g\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n}", |
| "hash": "b24cf65561c98c1858a06c39f10fb797", |
| "file": "SkRect_Reference", |
| "name": "SkRect::offset_2", |
| "stdout": "rect: 15, 27, 55, 86\\n" |
| }, |
| "SkRect_outset": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 10, 14, 50, 73 };\n rect.outset(5, 13);\n SkDebugf(\"rect: %g, %g, %g, %g\\n\", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);\n}", |
| "hash": "861f873ba660af8c8bf8b0b83d829cf4", |
| "file": "SkRect_Reference", |
| "name": "SkRect::outset()", |
| "stdout": "rect: 5, 1, 55, 86\\n" |
| }, |
| "SkRect_right": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect unsorted = { 15, 25, 10, 5 };\n SkDebugf(\"unsorted.fRight: %g unsorted.right(): %g\\n\", unsorted.fRight, unsorted.right());\n SkRect sorted = unsorted.makeSorted();\n SkDebugf(\"sorted.fRight: %g sorted.right(): %g\\n\", sorted.fRight, sorted.right());\n}", |
| "hash": "ca3de7e5e292b3ad3633b1c39a31d3ab", |
| "file": "SkRect_Reference", |
| "name": "SkRect::right()", |
| "stdout": "unsorted.fRight: 10 unsorted.right(): 10\\nsorted.fRight: 15 sorted.right(): 15\\n" |
| }, |
| "SkRect_round": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 30.5f, 50.5f, 40.5f, 60.5f };\n SkIRect round;\n rect.round(&round);\n SkDebugf(\"round: %d, %d, %d, %d\\n\", round.fLeft, round.fTop, round.fRight, round.fBottom);\n}", |
| "hash": "8b9e5a9af0a9b878f76919534d88f41e", |
| "file": "SkRect_Reference", |
| "name": "SkRect::round()", |
| "stdout": "round: 31, 51, 41, 61\\n" |
| }, |
| "SkRect_roundIn": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 30.5f, 50.5f, 40.5f, 60.5f };\n SkIRect round;\n rect.roundIn(&round);\n SkDebugf(\"round: %d, %d, %d, %d\\n\", round.fLeft, round.fTop, round.fRight, round.fBottom);\n}", |
| "hash": "abb337da8fc1891f016c61258681c64c", |
| "file": "SkRect_Reference", |
| "name": "SkRect::roundIn", |
| "stdout": "round: 31, 51, 40, 60\\n" |
| }, |
| "SkRect_roundOut": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 30.5f, 50.5f, 40.5f, 60.5f };\n SkIRect round;\n rect.roundOut(&round);\n SkDebugf(\"round: %d, %d, %d, %d\\n\", round.fLeft, round.fTop, round.fRight, round.fBottom);\n}", |
| "hash": "0bd13d7e6426ae7a3befa2ab151ac5fc", |
| "file": "SkRect_Reference", |
| "name": "SkRect::roundOut", |
| "stdout": "round: 30, 50, 41, 61\\n" |
| }, |
| "SkRect_roundOut_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 30.5f, 50.5f, 40.5f, 60.5f };\n SkRect round;\n rect.roundOut(&round);\n SkDebugf(\"round: %g, %g, %g, %g\\n\", round.fLeft, round.fTop, round.fRight, round.fBottom);\n}", |
| "hash": "e09a6a12869a8ac21e9c2af98a5bb686", |
| "file": "SkRect_Reference", |
| "name": "SkRect::roundOut_2", |
| "stdout": "round: 30, 50, 41, 61\\n" |
| }, |
| "SkRect_roundOut_3": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 30.5f, 50.5f, 40.5f, 60.5f };\n SkIRect round = rect.roundOut();\n SkDebugf(\"round: %d, %d, %d, %d\\n\", round.fLeft, round.fTop, round.fRight, round.fBottom);\n}", |
| "hash": "05f0f65ae148f192656cd87df90f1d57", |
| "file": "SkRect_Reference", |
| "name": "SkRect::roundOut_3", |
| "stdout": "round: 30, 50, 41, 61\\n" |
| }, |
| "SkRect_round_2": { |
| "code": "void draw(SkCanvas* canvas) {\n SkRect rect = { 30.5f, 50.5f, 40.5f, 60.5f };\n SkIRect round = rect.round();\n SkDebugf(\"round: %d, %d, %d, %d\\n\", round.fLeft, round.fTop, round.fRight, round.fBottom);\n}", |
| "hash": "ef7ae1dd522c235b0afe41b55a624f46", |
| "file": "SkRect_Reference", |
| "name": "SkRect::round_2", |
| "stdout": "round: 31, 51, 41, 61\\n" |
| }, |
| "SkRect_set": { |
| "code": "void draw(SkCanvas* canvas) {\n SkIRect i_rect = {3, 4, 1, 2};\n SkDebugf(\"i_rect: {%d, %d, %d, %d}\\n\", i_rect.fLeft, i_rect.fTop, i_rect.fRight, i_rect.fBottom);\n SkRect f_rect;\n f_rect.set(i_rect);\n SkDebugf(\"f_rect: {%g, %g, %g, %g}\\n\", f_rect.fLeft, f_rect.fTop, f_rect.fRight, f_rect.fBottom);\n}", |
|