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

Issue 13560016: [Aura] Fix for a flash of black frame when resizing with the new resize logic. (Closed)

Created:
7 years, 8 months ago by slavi
Modified:
7 years, 8 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, jam, penghuang+watch_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, James Su
Visibility:
Public.

Description

[Aura] Fix for a flash of black frame when resizing with the new resize logic. BUG=124671, 161008 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=192950

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -0 lines) Patch
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 chunk +1 line, -0 lines 1 comment Download

Messages

Total messages: 7 (0 generated)
slavi
7 years, 8 months ago (2013-04-08 18:29:25 UTC) #1
Ben Goodger (Google)
lgtm
7 years, 8 months ago (2013-04-08 21:20:06 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skaslev@chromium.org/13560016/1
7 years, 8 months ago (2013-04-08 21:23:00 UTC) #3
commit-bot: I haz the power
Change committed as 192950
7 years, 8 months ago (2013-04-08 23:39:05 UTC) #4
piman
https://chromiumcodereview.appspot.com/13560016/diff/1/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://chromiumcodereview.appspot.com/13560016/diff/1/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode761 content/browser/renderer_host/render_widget_host_view_aura.cc:761: previous_damage_.op(RectToSkIRect(gfx::Rect(size)), SkRegion::kUnion_Op); Why is this needed? When we resize, ...
7 years, 8 months ago (2013-04-09 00:11:49 UTC) #5
slavi
On 2013/04/09 00:11:49, piman wrote: > https://chromiumcodereview.appspot.com/13560016/diff/1/content/browser/renderer_host/render_widget_host_view_aura.cc > File content/browser/renderer_host/render_widget_host_view_aura.cc (right): > > https://chromiumcodereview.appspot.com/13560016/diff/1/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode761 > ...
7 years, 8 months ago (2013-04-09 00:24:14 UTC) #6
piman
7 years, 8 months ago (2013-04-09 00:37:49 UTC) #7
On Mon, Apr 8, 2013 at 5:24 PM, <skaslev@chromium.org> wrote:

> On 2013/04/09 00:11:49, piman wrote:
>
> https://chromiumcodereview.**appspot.com/13560016/diff/1/**
>
content/browser/renderer_host/**render_widget_host_view_aura.**cc<https://chromiumcodereview.appspot.com/13560016/diff/1/content/browser/renderer_host/render_widget_host_view_aura.cc>
>
>> File content/browser/renderer_host/**render_widget_host_view_aura.**cc
>> (right):
>>
>
>
> https://chromiumcodereview.**appspot.com/13560016/diff/1/**
> content/browser/renderer_host/**render_widget_host_view_aura.**
>
cc#newcode761<https://chromiumcodereview.appspot.com/13560016/diff/1/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode761>
>
>> content/browser/renderer_host/**render_widget_host_view_aura.**cc:761:
>> previous_damage_.op(**RectToSkIRect(gfx::Rect(size))**,
>> SkRegion::kUnion_Op);
>> Why is this needed?
>> When we resize, the new frame should have full damage. We DCHECK for it.
>> So
>>
> the
>
>> previous damage should not have any effect.
>>
>
> Here's a sketch of the issue: After resize, the content_layer get's
> resized and
> cleared. If I haven't received a new frame in SwapSoftwareFrame, in
> OnPaint only
> the previous_damage_ will be painted, since it doesn't know that the
> content_layer just got cleared and the whole frame should be repainted.
>

Hmm, I think the problem is here.
We can't choose to only paint previous_damage_, because the layer can cause
any arbitrary invalidation. I should have paid more attention to that on
the previous CL. OnPaint will be called with the proper clip rect set, so
that it's perfectly fine to paint the entire bitmap (Skia will clip
correctly and do the minimal amount of work). Also, it's not quite right to
reset previous_damage_ in OnPaint - OnPaint can be called multiple times
for a given renderer frame.

Also, I think there's confusion about what previous_damage_ means.
previous_damage_ is used for GL partial swaps, which assumes
double-buffering, so that we can copy to the new front buffer only the area
that was changed between 2 frames ago and the previous frame, that hasn't
change between the previous frame and the new one - i.e. for the case of a
constant damage rect, copying nothing.
You're implementing something different for software - that's fine - but
you shouldn't be modifying the behavior of the GL partial swaps. I'm not
sure SetSize isn't called redundantly, for example.


>
> The issue was very apparent with the new faster resize logic by Carlos --
> the
> first frame after resize was always black (or almost black). This patch
> fixes
> the issue.
>
>
https://codereview.chromium.**org/13560016/<https://codereview.chromium.org/1...
>

Powered by Google App Engine
This is Rietveld 408576698