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

Unified Diff: ui/gfx/skbitmap_operations_unittest.cc

Issue 12151002: Initialize memory, remove valgrind supression, add transparency test. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: clear -> erase, add comment. Created 7 years, 11 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 | « tools/valgrind/memcheck/suppressions.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/skbitmap_operations_unittest.cc
diff --git a/ui/gfx/skbitmap_operations_unittest.cc b/ui/gfx/skbitmap_operations_unittest.cc
index c6d0bd16a8ef8b1271e063954b103418eee29bc3..9b11d6d15763b4674f938d6fce6dce960178f289 100644
--- a/ui/gfx/skbitmap_operations_unittest.cc
+++ b/ui/gfx/skbitmap_operations_unittest.cc
@@ -534,11 +534,13 @@ TEST(SkBitmapOperationsTest, RotateImage) {
src.allocPixels();
SkCanvas canvas(src);
+ src.eraseARGB(0, 0, 0, 0);
SkRegion region;
region.setRect(0, 0, src_w / 2, src_h / 2);
canvas.setClipRegion(region);
- canvas.drawColor(SK_ColorRED, SkXfermode::kSrc_Mode);
+ // This region is a semi-transparent red to test non-opaque pixels.
+ canvas.drawColor(0x1FFF0000, SkXfermode::kSrc_Mode);
region.setRect(src_w / 2, 0, src_w, src_h / 2);
canvas.setClipRegion(region);
canvas.drawColor(SK_ColorBLUE, SkXfermode::kSrc_Mode);
« no previous file with comments | « tools/valgrind/memcheck/suppressions.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698