| 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_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 1787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1798 } | 1798 } |
| 1799 | 1799 |
| 1800 // static | 1800 // static |
| 1801 void RenderWidgetHostImpl::AcknowledgePostSubBuffer(int32 route_id, | 1801 void RenderWidgetHostImpl::AcknowledgePostSubBuffer(int32 route_id, |
| 1802 int gpu_host_id) { | 1802 int gpu_host_id) { |
| 1803 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); | 1803 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); |
| 1804 if (ui_shim) | 1804 if (ui_shim) |
| 1805 ui_shim->Send(new AcceleratedSurfaceMsg_PostSubBufferACK(route_id)); | 1805 ui_shim->Send(new AcceleratedSurfaceMsg_PostSubBufferACK(route_id)); |
| 1806 } | 1806 } |
| 1807 | 1807 |
| 1808 #if defined(USE_AURA) |
| 1809 // static |
| 1810 void RenderWidgetHostImpl::SendSurfaceDiscard( |
| 1811 uint64 surface_id, int32 route_id, int gpu_host_id) { |
| 1812 GpuProcessHostUIShim* ui_shim = GpuProcessHostUIShim::FromID(gpu_host_id); |
| 1813 if (ui_shim) |
| 1814 ui_shim->Send(new AcceleratedSurfaceMsg_DiscardSurface(route_id, |
| 1815 surface_id)); |
| 1816 } |
| 1817 #endif |
| 1818 |
| 1808 void RenderWidgetHostImpl::DelayedAutoResized() { | 1819 void RenderWidgetHostImpl::DelayedAutoResized() { |
| 1809 gfx::Size new_size = new_auto_size_; | 1820 gfx::Size new_size = new_auto_size_; |
| 1810 // Clear the new_auto_size_ since the empty value is used as a flag to | 1821 // Clear the new_auto_size_ since the empty value is used as a flag to |
| 1811 // indicate that no callback is in progress (i.e. without this line | 1822 // indicate that no callback is in progress (i.e. without this line |
| 1812 // DelayedAutoResized will not get called again). | 1823 // DelayedAutoResized will not get called again). |
| 1813 new_auto_size_.SetSize(0, 0); | 1824 new_auto_size_.SetSize(0, 0); |
| 1814 if (!should_auto_resize_) | 1825 if (!should_auto_resize_) |
| 1815 return; | 1826 return; |
| 1816 | 1827 |
| 1817 OnRenderAutoResized(new_size); | 1828 OnRenderAutoResized(new_size); |
| 1818 } | 1829 } |
| 1819 | 1830 |
| 1820 } // namespace content | 1831 } // namespace content |
| OLD | NEW |