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

Unified Diff: ui/views/view.cc

Issue 1166373008: views: Early out of painting Views with empty bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: emptyview: size Created 5 years, 6 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 | ui/views/view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index 0b6efdf1086b52cf535a4b253d5fb92f70749d9c..d0882c9a9e0cdd4dfec303a927f323be021fe5f3 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -737,6 +737,8 @@ void View::SchedulePaintInRect(const gfx::Rect& rect) {
void View::Paint(const ui::PaintContext& parent_context) {
if (!visible_)
return;
+ if (size().IsEmpty())
+ return;
gfx::Vector2d offset_to_parent;
if (!layer()) {
« no previous file with comments | « no previous file | ui/views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698