OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1534 | 1534 |
1535 void RenderWidgetHostViewAura::UnusedResourcesAreAvailable() { | 1535 void RenderWidgetHostViewAura::UnusedResourcesAreAvailable() { |
1536 if (pending_delegated_ack_count_) | 1536 if (pending_delegated_ack_count_) |
1537 return; | 1537 return; |
1538 | 1538 |
1539 SendReturnedDelegatedResources(last_output_surface_id_); | 1539 SendReturnedDelegatedResources(last_output_surface_id_); |
1540 } | 1540 } |
1541 | 1541 |
1542 void RenderWidgetHostViewAura::SendReturnedDelegatedResources( | 1542 void RenderWidgetHostViewAura::SendReturnedDelegatedResources( |
1543 uint32 output_surface_id) { | 1543 uint32 output_surface_id) { |
1544 DCHECK(resource_collection_); | |
danakj
2014/02/04 18:15:31
Oh you already did this :) Awesome.
| |
1545 | |
1544 cc::CompositorFrameAck ack; | 1546 cc::CompositorFrameAck ack; |
1545 if (resource_collection_) | 1547 resource_collection_->TakeUnusedResourcesForChildCompositor(&ack.resources); |
1546 resource_collection_->TakeUnusedResourcesForChildCompositor(&ack.resources); | |
1547 DCHECK(!ack.resources.empty()); | 1548 DCHECK(!ack.resources.empty()); |
1549 | |
1548 RenderWidgetHostImpl::SendReclaimCompositorResources( | 1550 RenderWidgetHostImpl::SendReclaimCompositorResources( |
1549 host_->GetRoutingID(), | 1551 host_->GetRoutingID(), |
1550 output_surface_id, | 1552 output_surface_id, |
1551 host_->GetProcess()->GetID(), | 1553 host_->GetProcess()->GetID(), |
1552 ack); | 1554 ack); |
1553 } | 1555 } |
1554 | 1556 |
1555 void RenderWidgetHostViewAura::EvictDelegatedFrame() { | 1557 void RenderWidgetHostViewAura::EvictDelegatedFrame() { |
1556 window_->layer()->SetShowPaintedContent(); | 1558 window_->layer()->SetShowPaintedContent(); |
1557 frame_provider_ = NULL; | 1559 frame_provider_ = NULL; |
(...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3576 RenderWidgetHost* widget) { | 3578 RenderWidgetHost* widget) { |
3577 return new RenderWidgetHostViewAura(widget); | 3579 return new RenderWidgetHostViewAura(widget); |
3578 } | 3580 } |
3579 | 3581 |
3580 // static | 3582 // static |
3581 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 3583 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
3582 GetScreenInfoForWindow(results, NULL); | 3584 GetScreenInfoForWindow(results, NULL); |
3583 } | 3585 } |
3584 | 3586 |
3585 } // namespace content | 3587 } // namespace content |
OLD | NEW |