diff options
author | reed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-18 08:33:18 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-18 08:33:18 +0000 |
commit | 20259ae22b4aa41b63f80177b341b0c6b6c8d9fd (patch) | |
tree | 89cd907bb42d347749592946178da125ff0a3ac9 /skia/ext/image_operations_unittest.cc | |
parent | 1d33d766ef1f77c368751ac45e85575f23f83277 (diff) | |
download | chromium_src-20259ae22b4aa41b63f80177b341b0c6b6c8d9fd.zip chromium_src-20259ae22b4aa41b63f80177b341b0c6b6c8d9fd.tar.gz chromium_src-20259ae22b4aa41b63f80177b341b0c6b6c8d9fd.tar.bz2 |
stop calling deprecated setConfig
BUG=
Review URL: https://codereview.chromium.org/331283002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277985 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/ext/image_operations_unittest.cc')
-rw-r--r-- | skia/ext/image_operations_unittest.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/skia/ext/image_operations_unittest.cc b/skia/ext/image_operations_unittest.cc index da55e4f..9a3dcff 100644 --- a/skia/ext/image_operations_unittest.cc +++ b/skia/ext/image_operations_unittest.cc @@ -111,8 +111,7 @@ bool ColorsClose(uint32_t a, uint32_t b) { } void FillDataToBitmap(int w, int h, SkBitmap* bmp) { - bmp->setConfig(SkBitmap::kARGB_8888_Config, w, h); - bmp->allocPixels(); + bmp->allocN32Pixels(w, h); for (int y = 0; y < h; ++y) { for (int x = 0; x < w; ++x) { @@ -140,8 +139,7 @@ void DrawGridToBitmap(int w, int h, ASSERT_GT(grid_width, 0); ASSERT_NE(background_color, grid_color); - bmp->setConfig(SkBitmap::kARGB_8888_Config, w, h); - bmp->allocPixels(); + bmp->allocN32Pixels(w, h); for (int y = 0; y < h; ++y) { bool y_on_grid = ((y % grid_pitch) < grid_width); @@ -166,8 +164,7 @@ void DrawCheckerToBitmap(int w, int h, ASSERT_GT(rect_h, 0); ASSERT_NE(color1, color2); - bmp->setConfig(SkBitmap::kARGB_8888_Config, w, h); - bmp->allocPixels(); + bmp->allocN32Pixels(w, h); for (int y = 0; y < h; ++y) { bool y_bit = (((y / rect_h) & 0x1) == 0); @@ -464,8 +461,7 @@ TEST(ImageOperations, HalveSubset) { TEST(ImageOperations, InvalidParams) { // Make our source bitmap. SkBitmap src; - src.setConfig(SkBitmap::kA8_Config, 16, 34); - src.allocPixels(); + src.allocPixels(SkImageInfo::MakeA8(16, 34)); // Scale it, don't die. SkBitmap full_results = skia::ImageOperations::Resize( @@ -667,8 +663,7 @@ TEST(ImageOperations, ScaleUp) { const int dst_w = 9; const int dst_h = 9; SkBitmap src; - src.setConfig(SkBitmap::kARGB_8888_Config, src_w, src_h); - src.allocPixels(); + src.allocN32Pixels(src_w, src_h); for (int src_y = 0; src_y < src_h; ++src_y) { for (int src_x = 0; src_x < src_w; ++src_x) { |