blob: 037010e8587578b3d2d92fe6595efc2da31c22cd [file] [log] [blame]
scroggodb7dc092015-12-18 06:56:01 -08001/*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
Mike Kleinc0bd9f92019-04-23 12:05:21 -05008#include "include/core/SkBitmap.h"
9#include "include/core/SkImage.h"
10#include "include/core/SkImageInfo.h"
11#include "tests/Test.h"
scroggodb7dc092015-12-18 06:56:01 -080012
13DEF_TEST(ImageFrom565Bitmap, r) {
14 SkBitmap bm;
15 bm.allocPixels(SkImageInfo::Make(
16 5, 7, kRGB_565_SkColorType, kOpaque_SkAlphaType));
scroggodb7dc092015-12-18 06:56:01 -080017 bm.eraseColor(SK_ColorBLACK);
reed9ce9d672016-03-17 10:51:11 -070018 REPORTER_ASSERT(r, SkImage::MakeFromBitmap(bm) != nullptr);
scroggodb7dc092015-12-18 06:56:01 -080019}