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/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.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 2040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2051 // We keep the MappedMemoryReclaimLimit the same as the upload limit | 2051 // We keep the MappedMemoryReclaimLimit the same as the upload limit |
2052 // to avoid unnecessarily stalling the compositor thread. | 2052 // to avoid unnecessarily stalling the compositor thread. |
2053 limits.mapped_memory_reclaim_limit = | 2053 limits.mapped_memory_reclaim_limit = |
2054 max_transfer_buffer_usage_mb * kBytesPerMegabyte; | 2054 max_transfer_buffer_usage_mb * kBytesPerMegabyte; |
2055 #endif | 2055 #endif |
2056 limits.command_buffer_size = 64 * 1024; | 2056 limits.command_buffer_size = 64 * 1024; |
2057 limits.start_transfer_buffer_size = 64 * 1024; | 2057 limits.start_transfer_buffer_size = 64 * 1024; |
2058 limits.min_transfer_buffer_size = 64 * 1024; | 2058 limits.min_transfer_buffer_size = 64 * 1024; |
2059 | 2059 |
2060 return make_scoped_ptr(new WebGraphicsContext3DCommandBufferImpl( | 2060 return make_scoped_ptr(new WebGraphicsContext3DCommandBufferImpl( |
2061 0, GetURLForGraphicsContext3D(), gpu_channel_host, attributes, | 2061 0, GetURLForGraphicsContext3D().spec(), gpu_channel_host, attributes, |
2062 lose_context_when_out_of_memory, limits, NULL)); | 2062 lose_context_when_out_of_memory, limits, NULL)); |
2063 } | 2063 } |
2064 | 2064 |
2065 void RenderWidget::RegisterRenderFrameProxy(RenderFrameProxy* proxy) { | 2065 void RenderWidget::RegisterRenderFrameProxy(RenderFrameProxy* proxy) { |
2066 render_frame_proxies_.AddObserver(proxy); | 2066 render_frame_proxies_.AddObserver(proxy); |
2067 } | 2067 } |
2068 | 2068 |
2069 void RenderWidget::UnregisterRenderFrameProxy(RenderFrameProxy* proxy) { | 2069 void RenderWidget::UnregisterRenderFrameProxy(RenderFrameProxy* proxy) { |
2070 render_frame_proxies_.RemoveObserver(proxy); | 2070 render_frame_proxies_.RemoveObserver(proxy); |
2071 } | 2071 } |
2072 | 2072 |
(...skipping 14 matching lines...) Expand all Loading... |
2087 video_hole_frames_.RemoveObserver(frame); | 2087 video_hole_frames_.RemoveObserver(frame); |
2088 } | 2088 } |
2089 #endif // defined(VIDEO_HOLE) | 2089 #endif // defined(VIDEO_HOLE) |
2090 | 2090 |
2091 void RenderWidget::OnWaitNextFrameForTests(int routing_id) { | 2091 void RenderWidget::OnWaitNextFrameForTests(int routing_id) { |
2092 QueueMessage(new ViewHostMsg_WaitForNextFrameForTests_ACK(routing_id), | 2092 QueueMessage(new ViewHostMsg_WaitForNextFrameForTests_ACK(routing_id), |
2093 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE); | 2093 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE); |
2094 } | 2094 } |
2095 | 2095 |
2096 } // namespace content | 2096 } // namespace content |
OLD | NEW |