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

Unified Diff: chrome/browser/download/download_util.cc

Issue 11058003: No need to kClear_Mode a layer right after its created, as that will automatically (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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 | « no previous file | chrome/browser/ui/views/download/download_item_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_util.cc
===================================================================
--- chrome/browser/download/download_util.cc (revision 159972)
+++ chrome/browser/download/download_util.cc (working copy)
@@ -270,10 +270,8 @@
// Start at full opacity, then loop back and forth five times before ending
// at zero opacity.
- canvas->SaveLayerAlpha(GetOpacity(animation_progress), complete_bounds);
- canvas->sk_canvas()->drawARGB(0, 255, 255, 255, SkXfermode::kClear_Mode);
- canvas->DrawImageInt(*complete, complete_bounds.x(), complete_bounds.y());
- canvas->Restore();
+ canvas->DrawImageInt(*complete, complete_bounds.x(), complete_bounds.y(),
+ GetOpacity(animation_progress));
}
void PaintDownloadInterrupted(gfx::Canvas* canvas,
@@ -302,10 +300,8 @@
// Start at zero opacity, then loop back and forth five times before ending
// at full opacity.
- canvas->SaveLayerAlpha(GetOpacity(1.0 - animation_progress), complete_bounds);
- canvas->sk_canvas()->drawARGB(0, 255, 255, 255, SkXfermode::kClear_Mode);
- canvas->DrawImageInt(*complete, complete_bounds.x(), complete_bounds.y());
- canvas->Restore();
+ canvas->DrawImageInt(*complete, complete_bounds.x(), complete_bounds.y(),
+ GetOpacity(1.0 - animation_progress));
}
// Load a language dependent height so that the dangerous download confirmation
« no previous file with comments | « no previous file | chrome/browser/ui/views/download/download_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698