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

Unified Diff: ui/gfx/color_utils_unittest.cc

Issue 2682123003: Remove uses of skia::ReadPixels(PaintCanvas) (Closed)
Patch Set: more readpixels Created 3 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 | « ui/gfx/color_analysis_unittest.cc ('k') | ui/gfx/nine_image_painter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/color_utils_unittest.cc
diff --git a/ui/gfx/color_utils_unittest.cc b/ui/gfx/color_utils_unittest.cc
index 8e3df50936cf881db143dddad0515b2c48a84248..367029f9a0c7eb24e3e55284c172fbcf95afac9b 100644
--- a/ui/gfx/color_utils_unittest.cc
+++ b/ui/gfx/color_utils_unittest.cc
@@ -128,7 +128,7 @@ TEST(ColorUtils, CalculateBoringScore_SingleColor) {
// Fill all pixels in black.
canvas.FillRect(gfx::Rect(kSize), SK_ColorBLACK);
- SkBitmap bitmap = skia::ReadPixels(canvas.sk_canvas());
+ SkBitmap bitmap = canvas.ToBitmap();
// The thumbnail should deserve the highest boring score.
EXPECT_DOUBLE_EQ(1.0, CalculateBoringScore(bitmap));
}
@@ -143,7 +143,7 @@ TEST(ColorUtils, CalculateBoringScore_TwoColors) {
canvas.FillRect(gfx::Rect(0, 0, kSize.width() / 2, kSize.height()),
SK_ColorWHITE);
- SkBitmap bitmap = skia::ReadPixels(canvas.sk_canvas());
+ SkBitmap bitmap = canvas.ToBitmap();
ASSERT_EQ(kSize.width(), bitmap.width());
ASSERT_EQ(kSize.height(), bitmap.height());
// The thumbnail should be less boring because two colors are used.
« no previous file with comments | « ui/gfx/color_analysis_unittest.cc ('k') | ui/gfx/nine_image_painter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698