skia2/tests/ImageFrom565Bitmap.cpp
Mike Reed 4edb5d219e hide lockpixels api behind flag
guarded by SK_SUPPORT_OBSOLETE_LOCKPIXELS

needs https://codereview.chromium.org/2820873002/# to land first
Bug: skia:6481
Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09

Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09
Reviewed-on: https://skia-review.googlesource.com/13580
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-17 15:33:36 +00:00

20 lines
480 B
C++

/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkBitmap.h"
#include "SkImageInfo.h"
#include "SkImage.h"
#include "Test.h"
DEF_TEST(ImageFrom565Bitmap, r) {
SkBitmap bm;
bm.allocPixels(SkImageInfo::Make(
5, 7, kRGB_565_SkColorType, kOpaque_SkAlphaType));
bm.eraseColor(SK_ColorBLACK);
REPORTER_ASSERT(r, SkImage::MakeFromBitmap(bm) != nullptr);
}