Hal Canary | 6c8422c | 2020-01-10 15:22:09 -0500 | [diff] [blame] | 1 | // 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" |
| 4 | REG_FIDDLE(image_to_bitmap_does_not_preserve_genid, 128, 128, true, 5) { |
| 5 | // image_to_bitmap_does_not_preserve_genid |
| 6 | void 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 |