blob: 3cd8bb2033dc3594c81129d1e02bbef1c8ca0009 [file] [log] [blame]
Hal Canary83c2f702019-03-07 14:53:03 -05001// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3#include "fiddle/examples.h"
4// HASH=6a63dfdd62ab77ff57783af8c33d7b78
5REG_FIDDLE(ImageInfo_049, 256, 256, true, 0) {
6void draw(SkCanvas* canvas) {
7 if (sizeof(size_t) == 8) {
8 SkImageInfo info = SkImageInfo::MakeN32Premul(2, 1000000000);
9 for (size_t rowBytes = 100000000; rowBytes < 10000000000000LL; rowBytes *= 10) {
10 const size_t size = info.computeByteSize(rowBytes);
11 SkDebugf("rowBytes:%llu size:%llu overflowed:%s\n", rowBytes, size,
12 SkImageInfo::ByteSizeOverflowed(size) ? "true" : "false");
13 }
14 }
15}
16} // END FIDDLE