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

Unified Diff: chrome/browser/ui/views/tabs/tab_renderer_data.h

Issue 6599017: Don't repaint tab when TabRenderData hasn't changed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 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 | « chrome/browser/ui/views/tabs/base_tab_strip.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab_renderer_data.h
diff --git a/chrome/browser/ui/views/tabs/tab_renderer_data.h b/chrome/browser/ui/views/tabs/tab_renderer_data.h
index ce6b3383b66ce61afc5e2809124edefa32a4412c..43962dfdffce15bfd2219219a9c91a50fc2f4464 100644
--- a/chrome/browser/ui/views/tabs/tab_renderer_data.h
+++ b/chrome/browser/ui/views/tabs/tab_renderer_data.h
@@ -41,6 +41,24 @@ struct TabRendererData {
crashed_status == base::TERMINATION_STATUS_ABNORMAL_TERMINATION);
}
+ // Returns true if the TabRendererData is same as given |data|. Two favicons
+ // are considered equals if two SkBitmaps point to the same SkPixelRef object.
+ bool Equals(const TabRendererData& data) {
+ return
+ favicon.pixelRef() &&
+ favicon.pixelRef() == data.favicon.pixelRef() &&
+ favicon.pixelRefOffset() == data.favicon.pixelRefOffset() &&
oshima 2011/02/26 00:18:29 Brett, I'm assuming that chrome does not change th
brettw 2011/02/26 03:26:04 Good question. This is *probably* OK but I'm not s
+ network_state == data.network_state &&
+ title == data.title &&
+ loading == data.loading &&
+ crashed_status == data.crashed_status &&
+ off_the_record == data.off_the_record &&
+ show_icon == data.show_icon &&
+ mini == data.mini &&
+ blocked == data.blocked &&
+ app == data.app;
+ }
+
SkBitmap favicon;
NetworkState network_state;
string16 title;
« no previous file with comments | « chrome/browser/ui/views/tabs/base_tab_strip.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698