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

Unified Diff: cc/test/layer_tree_pixel_test.cc

Issue 192373004: use SkColorType instead of (deprecated) SkBitmap::Config for copyTo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 | « cc/test/layer_tree_json_parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_tree_pixel_test.cc
diff --git a/cc/test/layer_tree_pixel_test.cc b/cc/test/layer_tree_pixel_test.cc
index 7ae11c35d2e87ff532f63038898ed3accc2fd748..a282cc498d6126428afd3c770a6ce5fb65920d76 100644
--- a/cc/test/layer_tree_pixel_test.cc
+++ b/cc/test/layer_tree_pixel_test.cc
@@ -268,12 +268,8 @@ scoped_ptr<SkBitmap> LayerTreePixelTest::CopyTextureMailboxToBitmap(
gl->DeleteTextures(1, &texture_id);
scoped_ptr<SkBitmap> bitmap(new SkBitmap);
- bitmap->setConfig(SkBitmap::kARGB_8888_Config,
- size.width(),
- size.height());
- bitmap->allocPixels();
+ bitmap->allocN32Pixels(size.width(), size.height());
- scoped_ptr<SkAutoLockPixels> lock(new SkAutoLockPixels(*bitmap));
uint8* out_pixels = static_cast<uint8*>(bitmap->getPixels());
size_t row_bytes = size.width() * 4;
@@ -324,7 +320,7 @@ void LayerTreePixelTest::CopyBitmapToTextureMailboxAsTexture(
gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- DCHECK_EQ(SkBitmap::kARGB_8888_Config, bitmap.getConfig());
+ DCHECK_EQ(kPMColor_SkColorType, bitmap.colorType());
{
SkAutoLockPixels lock(bitmap);
« no previous file with comments | « cc/test/layer_tree_json_parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698