blob: 3ddeab40a1e0246347c4b8efcca90db246aa2877 [file] [log] [blame]
Hal Canary6c8422c2020-01-10 15:22:09 -05001// Copyright 2020 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 "tools/fiddle/examples.h"
4REG_FIDDLE(image_to_bitmap_does_not_preserve_genid, 128, 128, true, 5) {
5// image_to_bitmap_does_not_preserve_genid
6void draw(SkCanvas* canvas) {
7 SkBitmap bm1, bm2;
8 image->asLegacyBitmap(&bm1, SkImage::kRO_LegacyBitmapMode);
9 image->asLegacyBitmap(&bm2, SkImage::kRO_LegacyBitmapMode);
10 SkDebugf("%u\n%u\n", bm1.getGenerationID(), bm2.getGenerationID());
11}
12} // END FIDDLE