Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: tests/ImageDecodingTest.cpp

Issue 162643002: replace setConfig+allocPixels with single call (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/ImageCacheTest.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageDecodingTest.cpp
diff --git a/tests/ImageDecodingTest.cpp b/tests/ImageDecodingTest.cpp
index 2e0225a26195bdcaf1d39a9c143f6818ea53f349..7b2f988ffc9e806a91badeaa833fcbc4feb6852d 100644
--- a/tests/ImageDecodingTest.cpp
+++ b/tests/ImageDecodingTest.cpp
@@ -168,8 +168,7 @@ static void test_unpremul(skiatest::Reporter* reporter) {
static SkMemoryStream* create_image_stream(SkImageEncoder::Type type) {
SkBitmap bm;
const int size = 50;
- bm.setConfig(SkBitmap::kARGB_8888_Config, size, size);
- bm.allocPixels();
+ bm.allocN32Pixels(size, size);
SkCanvas canvas(bm);
SkPoint points[2] = {
{ SkIntToScalar(0), SkIntToScalar(0) },
@@ -363,7 +362,7 @@ DEF_TEST(ImprovedBitmapFactory, reporter) {
SkStream::NewFromFile(path.c_str()));
if (sk_exists(path.c_str())) {
SkBitmap bm;
- SkAssertResult(bm.setConfig(SkBitmap::kARGB_8888_Config, 1, 1));
+ SkAssertResult(bm.setConfig(SkImageInfo::MakeN32Premul(1, 1)));
REPORTER_ASSERT(reporter,
NULL != install_pixel_ref(&bm, stream.detach(), 1, true));
SkAutoLockPixels alp(bm);
« no previous file with comments | « tests/ImageCacheTest.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698