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

Unified Diff: cc/test/layer_tree_pixel_test.cc

Issue 197883017: SkColorType instead of (deprecated) SkBitmap::Config (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
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());
enne (OOO) 2014/03/18 19:43:03 Is this the same check?
reed1 2014/03/21 20:49:01 Yes. In SkColorType world, we now have two explici
{
SkAutoLockPixels lock(bitmap);

Powered by Google App Engine
This is Rietveld 408576698