1cb93a386Sopenharmony_ci/* 2cb93a386Sopenharmony_ci * Copyright 2015 Google Inc. 3cb93a386Sopenharmony_ci * 4cb93a386Sopenharmony_ci * Use of this source code is governed by a BSD-style license that can be 5cb93a386Sopenharmony_ci * found in the LICENSE file. 6cb93a386Sopenharmony_ci */ 7cb93a386Sopenharmony_ci 8cb93a386Sopenharmony_ci#include "include/core/SkBitmap.h" 9cb93a386Sopenharmony_ci#include "include/core/SkImage.h" 10cb93a386Sopenharmony_ci#include "include/core/SkImageInfo.h" 11cb93a386Sopenharmony_ci#include "tests/Test.h" 12cb93a386Sopenharmony_ci 13cb93a386Sopenharmony_ciDEF_TEST(ImageFrom565Bitmap, r) { 14cb93a386Sopenharmony_ci SkBitmap bm; 15cb93a386Sopenharmony_ci bm.allocPixels(SkImageInfo::Make( 16cb93a386Sopenharmony_ci 5, 7, kRGB_565_SkColorType, kOpaque_SkAlphaType)); 17cb93a386Sopenharmony_ci bm.eraseColor(SK_ColorBLACK); 18cb93a386Sopenharmony_ci REPORTER_ASSERT(r, bm.asImage() != nullptr); 19cb93a386Sopenharmony_ci} 20