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

Issue 1166373008: views: Early out of painting Views with empty bounds. (Closed)

Created:
5 years, 6 months ago by danakj
Modified:
5 years, 6 months ago
Reviewers:
weiliangc, sky
CC:
chromium-reviews, enne (OOO), piman, sadrul, tdanderson+views_chromium.org, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

views: Early out of painting Views with empty bounds. They are empty so they aren't visible. Trying to paint a view with empty bounds actually leads to DCHECK fails when they try to use the empty size incorrectly. With slimming paint this could happen for the first frame when we paint /everything/ to try cache it all until invalidation. Instead, defer painting empty things until they actually have something to paint. This also means less wasted time painting subtrees that aren't visible. R=sky@chromium.org, weiliangc@chromium.org, sky, weiliangc BUG=498066 Committed: https://chromium.googlesource.com/chromium/src/+/980b6840952ecfd1d23dd30e536c020d5d9641be

Patch Set 1 #

Total comments: 2

Patch Set 2 : emptyview: size #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -0 lines) Patch
M ui/views/view.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/view_unittest.cc View 1 chunk +35 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (4 generated)
danakj
5 years, 6 months ago (2015-06-09 22:02:15 UTC) #1
weiliangc
LGTM https://codereview.chromium.org/1166373008/diff/1/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/1166373008/diff/1/ui/views/view.cc#newcode740 ui/views/view.cc:740: if (bounds().IsEmpty()) nit: We can use size() instead?
5 years, 6 months ago (2015-06-09 22:04:42 UTC) #2
danakj
https://codereview.chromium.org/1166373008/diff/1/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/1166373008/diff/1/ui/views/view.cc#newcode740 ui/views/view.cc:740: if (bounds().IsEmpty()) On 2015/06/09 22:04:42, weiliangc wrote: > nit: ...
5 years, 6 months ago (2015-06-09 22:05:15 UTC) #3
weiliangc
On 2015/06/09 at 22:05:15, danakj wrote: > https://codereview.chromium.org/1166373008/diff/1/ui/views/view.cc > File ui/views/view.cc (right): > > https://codereview.chromium.org/1166373008/diff/1/ui/views/view.cc#newcode740 ...
5 years, 6 months ago (2015-06-09 22:18:19 UTC) #4
sky
LGTM
5 years, 6 months ago (2015-06-09 22:25:07 UTC) #5
danakj
On Tue, Jun 9, 2015 at 3:18 PM, <weiliangc@chromium.org> wrote: > On 2015/06/09 at 22:05:15, ...
5 years, 6 months ago (2015-06-09 22:27:52 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1166373008/20001
5 years, 6 months ago (2015-06-09 22:30:31 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
5 years, 6 months ago (2015-06-10 00:31:31 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1166373008/20001
5 years, 6 months ago (2015-06-10 00:37:45 UTC) #13
danakj
5 years, 6 months ago (2015-06-10 01:01:38 UTC) #14
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
980b6840952ecfd1d23dd30e536c020d5d9641be (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698