blob: 8822e2eb8bc8f809c9786f7783b64666262c67cf [file] [log] [blame]
Hal Canary83c2f702019-03-07 14:53:03 -05001// Copyright 2019 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 "fiddle/examples.h"
4// HASH=db9dd91e0207c3941c09538555817b4b
5REG_FIDDLE(Bitmap_058, 256, 256, true, 0) {
6void draw(SkCanvas* canvas) {
7 SkBitmap bitmap;
8 SkDebugf("empty id %u\n", bitmap.getGenerationID());
9 bitmap.allocPixels(SkImageInfo::MakeN32(64, 64, kOpaque_SkAlphaType));
10 SkDebugf("alloc id %u\n", bitmap.getGenerationID());
11 bitmap.eraseColor(SK_ColorRED);
12 SkDebugf("erase id %u\n", bitmap.getGenerationID());
13}
14} // END FIDDLE