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 2247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2258 // We keep the MappedMemoryReclaimLimit the same as the upload limit | 2258 // We keep the MappedMemoryReclaimLimit the same as the upload limit |
2259 // to avoid unnecessarily stalling the compositor thread. | 2259 // to avoid unnecessarily stalling the compositor thread. |
2260 limits.mapped_memory_reclaim_limit = | 2260 limits.mapped_memory_reclaim_limit = |
2261 max_transfer_buffer_usage_mb * kBytesPerMegabyte; | 2261 max_transfer_buffer_usage_mb * kBytesPerMegabyte; |
2262 #endif | 2262 #endif |
2263 limits.command_buffer_size = 64 * 1024; | 2263 limits.command_buffer_size = 64 * 1024; |
2264 limits.start_transfer_buffer_size = 64 * 1024; | 2264 limits.start_transfer_buffer_size = 64 * 1024; |
2265 limits.min_transfer_buffer_size = 64 * 1024; | 2265 limits.min_transfer_buffer_size = 64 * 1024; |
2266 | 2266 |
2267 return make_scoped_ptr(new WebGraphicsContext3DCommandBufferImpl( | 2267 return make_scoped_ptr(new WebGraphicsContext3DCommandBufferImpl( |
2268 0, GetURLForGraphicsContext3D(), gpu_channel_host, attributes, | 2268 0, GetURLForGraphicsContext3D().spec(), gpu_channel_host, attributes, |
2269 lose_context_when_out_of_memory, limits, NULL)); | 2269 lose_context_when_out_of_memory, limits, NULL)); |
2270 } | 2270 } |
2271 | 2271 |
2272 void RenderWidget::RegisterRenderFrameProxy(RenderFrameProxy* proxy) { | 2272 void RenderWidget::RegisterRenderFrameProxy(RenderFrameProxy* proxy) { |
2273 render_frame_proxies_.AddObserver(proxy); | 2273 render_frame_proxies_.AddObserver(proxy); |
2274 } | 2274 } |
2275 | 2275 |
2276 void RenderWidget::UnregisterRenderFrameProxy(RenderFrameProxy* proxy) { | 2276 void RenderWidget::UnregisterRenderFrameProxy(RenderFrameProxy* proxy) { |
2277 render_frame_proxies_.RemoveObserver(proxy); | 2277 render_frame_proxies_.RemoveObserver(proxy); |
2278 } | 2278 } |
2279 | 2279 |
(...skipping 14 matching lines...) Expand all Loading... |
2294 video_hole_frames_.RemoveObserver(frame); | 2294 video_hole_frames_.RemoveObserver(frame); |
2295 } | 2295 } |
2296 #endif // defined(VIDEO_HOLE) | 2296 #endif // defined(VIDEO_HOLE) |
2297 | 2297 |
2298 void RenderWidget::OnWaitNextFrameForTests(int routing_id) { | 2298 void RenderWidget::OnWaitNextFrameForTests(int routing_id) { |
2299 QueueMessage(new ViewHostMsg_WaitForNextFrameForTests_ACK(routing_id), | 2299 QueueMessage(new ViewHostMsg_WaitForNextFrameForTests_ACK(routing_id), |
2300 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE); | 2300 MESSAGE_DELIVERY_POLICY_WITH_VISUAL_STATE); |
2301 } | 2301 } |
2302 | 2302 |
2303 } // namespace content | 2303 } // namespace content |
OLD | NEW |