blob: 01ca9158d263e9857b3309fcc47fefd2d1ffdb86 [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=211ec89418011aa6e54aa2cc9567e003
5REG_FIDDLE(Bitmap_019, 256, 256, true, 0) {
6void draw(SkCanvas* canvas) {
7 SkBitmap bitmap;
8 SkDebugf("empty bitmap does %shave pixels\n", bitmap.isNull() ? "not " : "");
9 bitmap.setInfo(SkImageInfo::MakeA8(8, 8));
10 SkDebugf("bitmap with dimensions does %shave pixels\n", bitmap.isNull() ? "not " : "");
11 bitmap.allocPixels();
12 SkDebugf("allocated bitmap does %shave pixels\n", bitmap.isNull() ? "not " : "");
13}
14} // END FIDDLE