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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1779 } | 1779 } |
1780 | 1780 |
1781 //////////////////////////////////////////////////////////////////////////////// | 1781 //////////////////////////////////////////////////////////////////////////////// |
1782 // RenderWidgetHostViewAura, ImageTransportFactoryObserver implementation: | 1782 // RenderWidgetHostViewAura, ImageTransportFactoryObserver implementation: |
1783 | 1783 |
1784 void RenderWidgetHostViewAura::OnLostResources() { | 1784 void RenderWidgetHostViewAura::OnLostResources() { |
1785 current_surface_ = NULL; | 1785 current_surface_ = NULL; |
1786 UpdateExternalTexture(); | 1786 UpdateExternalTexture(); |
1787 locks_pending_commit_.clear(); | 1787 locks_pending_commit_.clear(); |
1788 | 1788 |
| 1789 // Make sure all ImageTransportClients are deleted now that the context those |
| 1790 // are using is becoming invalid. This sends pending ACKs and needs to happen |
| 1791 // after calling UpdateExternalTexture() which syncs with the impl thread. |
| 1792 RunCompositingDidCommitCallbacks(); |
| 1793 |
1789 DCHECK(!shared_surface_handle_.is_null()); | 1794 DCHECK(!shared_surface_handle_.is_null()); |
1790 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); | 1795 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); |
1791 factory->DestroySharedSurfaceHandle(shared_surface_handle_); | 1796 factory->DestroySharedSurfaceHandle(shared_surface_handle_); |
1792 shared_surface_handle_ = factory->CreateSharedSurfaceHandle(); | 1797 shared_surface_handle_ = factory->CreateSharedSurfaceHandle(); |
1793 host_->CompositingSurfaceUpdated(); | 1798 host_->CompositingSurfaceUpdated(); |
1794 host_->ScheduleComposite(); | 1799 host_->ScheduleComposite(); |
1795 } | 1800 } |
1796 | 1801 |
1797 //////////////////////////////////////////////////////////////////////////////// | 1802 //////////////////////////////////////////////////////////////////////////////// |
1798 // RenderWidgetHostViewAura, private: | 1803 // RenderWidgetHostViewAura, private: |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1991 RenderWidgetHost* widget) { | 1996 RenderWidgetHost* widget) { |
1992 return new RenderWidgetHostViewAura(widget); | 1997 return new RenderWidgetHostViewAura(widget); |
1993 } | 1998 } |
1994 | 1999 |
1995 // static | 2000 // static |
1996 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 2001 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
1997 GetScreenInfoForWindow(results, NULL); | 2002 GetScreenInfoForWindow(results, NULL); |
1998 } | 2003 } |
1999 | 2004 |
2000 } // namespace content | 2005 } // namespace content |
OLD | NEW |