Chromium Code Reviews| Index: content/browser/renderer_host/render_widget_host_view_aura.cc |
| diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc |
| index 6850ebd13809f70a7a33f34ca13f2c8b5e943611..6162f71b7a297f23953466d85ff6f71eceae9417 100644 |
| --- a/content/browser/renderer_host/render_widget_host_view_aura.cc |
| +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc |
| @@ -660,6 +660,21 @@ void RenderWidgetHostViewAura::AcceleratedSurfaceRelease( |
| image_transport_clients_.erase(surface_handle); |
| } |
| +void RenderWidgetHostViewAura::AcceleratedSurfaceSuggestDiscard( |
| + uint64 surface_handle, int32 route_id, int gpu_host_id) { |
| + if (host_->IsVisible() && current_surface_ == surface_handle) |
| + return; |
|
piman
2012/05/04 00:03:49
The problem here is that it's racy. We may miss an
mmocny
2012/05/04 18:55:52
Very sorry, but I am still not understanding why t
|
| + |
| + AcceleratedSurfaceRelease(surface_handle); |
| + |
| + on_compositing_ended_callbacks_.push_back( |
|
piman
2012/05/04 00:03:49
on_compositing_ended_callbacks_ may not be used un
mmocny
2012/05/04 18:55:52
Once I stop scheduling a composite, Yes, I'll need
|
| + base::Bind(&RenderWidgetHostImpl::SendSurfaceDiscard, |
|
piman
2012/05/04 00:03:49
By the time that callback is called, we may be vis
mmocny
2012/05/04 18:55:52
Correct, thanks!
On 2012/05/04 00:03:49, piman wro
|
| + surface_handle, |
| + route_id, |
| + gpu_host_id)); |
| + host_->ScheduleComposite(); |
|
piman
2012/05/04 00:03:49
This shouldn't be needed. If we don't have a frame
|
| +} |
| + |
| void RenderWidgetHostViewAura::SetBackground(const SkBitmap& background) { |
| content::RenderWidgetHostViewBase::SetBackground(background); |
| host_->SetBackground(background); |