1cb93a386Sopenharmony_ci#if 0 // disabled 2cb93a386Sopenharmony_ci// Copyright 2019 Google LLC. 3cb93a386Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. 4cb93a386Sopenharmony_ci#include "tools/fiddle/examples.h" 5cb93a386Sopenharmony_ci// HASH=6a63dfdd62ab77ff57783af8c33d7b78 6cb93a386Sopenharmony_ciREG_FIDDLE(ImageInfo_ByteSizeOverflowed, 256, 256, true, 0) { 7cb93a386Sopenharmony_civoid draw(SkCanvas* canvas) { 8cb93a386Sopenharmony_ci if (sizeof(size_t) == 8) { 9cb93a386Sopenharmony_ci SkImageInfo info = SkImageInfo::MakeN32Premul(2, 1000000000); 10cb93a386Sopenharmony_ci for (size_t rowBytes = 100000000; rowBytes < 10000000000000LL; rowBytes *= 10) { 11cb93a386Sopenharmony_ci const size_t size = info.computeByteSize(rowBytes); 12cb93a386Sopenharmony_ci SkDebugf("rowBytes:%llu size:%llu overflowed:%s\n", rowBytes, size, 13cb93a386Sopenharmony_ci SkImageInfo::ByteSizeOverflowed(size) ? "true" : "false"); 14cb93a386Sopenharmony_ci } 15cb93a386Sopenharmony_ci } 16cb93a386Sopenharmony_ci} 17cb93a386Sopenharmony_ci} // END FIDDLE 18cb93a386Sopenharmony_ci#endif // disabled 19