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

Issue 13926009: Avoid sending empty OnRepaint msgs and propagate window damage correctly (Closed)

Created:
7 years, 8 months ago by jamesr
Modified:
7 years, 8 months ago
Reviewers:
piman
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, apatrick_chromium
Visibility:
Public.

Description

Avoid sending empty OnRepaint msgs and propagate window damage correctly This fixes two issues related to OnRepaint (window damage) messages: 1.) In the case of a renderer-resized widget, the browser's information about the size of the widget could be out of date. If the browser widget was asked to paint in compositing mode before it received the proper size it could send a ViewMsg_OnRepaint with 0x0 size and then set repaint_ack_pending_, expecting the renderer to reply. The renderer wasn't actually replying with a frame since damaging a 0x0 rect doesn't actually require painting anything. This suppresses sending the OnRepaint message if the browser's size is 0x0. Either the size will at some point become 0x0, triggering a repaint, or the user will never see it. 2.) In compositing mode on the renderer side we weren't plumbing the OnRepaint window damage rect properly in to the compositor. Thus the compositor could end up not producing a frame after receiving an OnRepaint message, confusing the browser rate limiting logic greatly. BUG=230766 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=194510

Patch Set 1 #

Total comments: 2

Patch Set 2 : treat OnRepaint(0x0) as OnRepaint(size_) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -7 lines) Patch
M content/browser/renderer_host/render_widget_host_impl.cc View 1 6 chunks +16 lines, -1 line 0 comments Download
M content/common/gpu/image_transport_surface.cc View 2 chunks +3 lines, -0 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.h View 2 chunks +2 lines, -0 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/render_widget.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_widget.cc View 1 1 chunk +9 lines, -5 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
jamesr
This appears to work but of course since this is a race I could just ...
7 years, 8 months ago (2013-04-16 21:47:29 UTC) #1
piman
LGTM, I think this is good stuff. I have one question. https://codereview.chromium.org/13926009/diff/1/content/renderer/render_widget.cc File content/renderer/render_widget.cc (right): ...
7 years, 8 months ago (2013-04-16 22:04:05 UTC) #2
jamesr
On 2013/04/16 22:04:05, piman wrote: > LGTM, I think this is good stuff. I have ...
7 years, 8 months ago (2013-04-16 22:11:23 UTC) #3
piman
On Tue, Apr 16, 2013 at 3:11 PM, <jamesr@chromium.org> wrote: > On 2013/04/16 22:04:05, piman ...
7 years, 8 months ago (2013-04-16 22:17:59 UTC) #4
jamesr
yeah setNeedsRedraw is a bit of a mess. I'll try to track down why it ...
7 years, 8 months ago (2013-04-16 22:21:56 UTC) #5
jamesr
On 2013/04/16 22:21:56, jamesr wrote: > https://codereview.chromium.org/13926009/diff/1/content/renderer/render_widget.cc#newcode1879 > content/renderer/render_widget.cc:1879: DCHECK(!size_to_paint.IsEmpty()); > I'm hitting this on ...
7 years, 8 months ago (2013-04-16 22:37:28 UTC) #6
jamesr
Patch set 2 damages the whole widget on a OnRepaint(0x0) and adds an async trace ...
7 years, 8 months ago (2013-04-16 22:44:59 UTC) #7
piman
lgtm
7 years, 8 months ago (2013-04-16 23:11:20 UTC) #8
jamesr
7 years, 8 months ago (2013-04-17 01:46:35 UTC) #9
Message was sent while issue was closed.
Committed patchset #2 manually as r194510 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698