Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
image_subsets_get_different_uids.cpp
Go to the documentation of this file.
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.
4REG_FIDDLE(image_subsets_get_different_uids, 128, 128, true, 5) {
5// image_subsets_get_different_uids
6void 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
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
virtual sk_sp< SkImage > makeSubset(GrDirectContext *direct, const SkIRect &subset) const =0
sk_sp< SkImage > image
Definition examples.cpp:29
#define REG_FIDDLE(NAME, W, H, TEXT, I)
Definition examples.h:60