xref: /aosp_15_r20/external/skia/docs/examples/image_subsets_get_different_uids.cpp (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
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_subsets_get_different_uids, 128, 128, true, 5) {
5 // image_subsets_get_different_uids
draw(SkCanvas *)6 void draw(SkCanvas*) {
7     SkIRect r{0, 0, 10, 10};
8     auto s1 = image->makeSubset(nullptr, r);
9     auto s2 = image->makeSubset(nullptr, r);
10     SkDebugf("%u\n%u\n", s1->uniqueID(), s2->uniqueID());
11 }
12 }  // END FIDDLE
13