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

Unified Diff: ui/views/controls/image_view.cc

Issue 60683003: A number of paint optimizations to improve overall paint times. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove SetImageByResourceID and use BackedBySameObjectAs Created 7 years, 1 month 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 | « chrome/browser/ui/views/status_bubble_views.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/image_view.cc
diff --git a/ui/views/controls/image_view.cc b/ui/views/controls/image_view.cc
index 489f970aa5f8b2b24a738a7216ba2c464c0061e5..fc44a84cfbffba6eb0b8b640e2208315ab25b649 100644
--- a/ui/views/controls/image_view.cc
+++ b/ui/views/controls/image_view.cc
@@ -24,6 +24,9 @@ ImageView::~ImageView() {
}
void ImageView::SetImage(const gfx::ImageSkia& img) {
+ if (image_.BackedBySameObjectAs(img))
+ return;
+
gfx::Size pref_size(GetPreferredSize());
image_ = img;
if (pref_size != GetPreferredSize())
« no previous file with comments | « chrome/browser/ui/views/status_bubble_views.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698