Flutter Engine
The Flutter Engine
image_to_bitmap_does_not_preserve_genid.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_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;
10 SkDebugf("%u\n%u\n", bm1.getGenerationID(), bm2.getGenerationID());
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
uint32_t getGenerationID() const
Definition: SkBitmap.cpp:361
bool asLegacyBitmap(SkBitmap *bitmap, LegacyBitmapMode legacyBitmapMode=kRO_LegacyBitmapMode) const
Definition: SkImage.cpp:233
@ kRO_LegacyBitmapMode
returned bitmap is read-only and immutable
Definition: SkImage.h:826
REG_FIDDLE(image_to_bitmap_does_not_preserve_genid, 128, 128, true, 5)
sk_sp< const SkImage > image
Definition: SkRecords.h:269