Hal Canary | 83c2f70 | 2019-03-07 14:53:03 -0500 | [diff] [blame] | 1 | // 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 |
| 5 | REG_FIDDLE(Bitmap_019, 256, 256, true, 0) { |
| 6 | void 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 |