1cb93a386Sopenharmony_ci// Copyright 2019 Google LLC. 2cb93a386Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. 3cb93a386Sopenharmony_ci#include "tools/fiddle/examples.h" 4cb93a386Sopenharmony_ci// HASH=9a00774be57d7308313b3a9073e6e696 5cb93a386Sopenharmony_ciREG_FIDDLE(Pixmap_const_SkImageInfo_const_star, 256, 256, true, 3) { 6cb93a386Sopenharmony_civoid draw(SkCanvas* canvas) { 7cb93a386Sopenharmony_ci SkDebugf("image alpha only = %s\n", image->isAlphaOnly() ? "true" : "false"); 8cb93a386Sopenharmony_ci SkPMColor pmColors = 0; 9cb93a386Sopenharmony_ci sk_sp<SkImage> copy = SkImage::MakeRasterCopy({SkImageInfo::MakeA8(1, 1), 10cb93a386Sopenharmony_ci (uint8_t*)&pmColors, 11cb93a386Sopenharmony_ci 1}); 12cb93a386Sopenharmony_ci SkDebugf("copy alpha only = %s\n", copy->isAlphaOnly() ? "true" : "false"); 13cb93a386Sopenharmony_ci} 14cb93a386Sopenharmony_ci} // END FIDDLE 15