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_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 } | 1012 } |
1013 | 1013 |
1014 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> | 1014 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> |
1015 RenderThreadImpl::CreateOffscreenContext3d() { | 1015 RenderThreadImpl::CreateOffscreenContext3d() { |
1016 blink::WebGraphicsContext3D::Attributes attributes; | 1016 blink::WebGraphicsContext3D::Attributes attributes; |
1017 attributes.shareResources = true; | 1017 attributes.shareResources = true; |
1018 attributes.depth = false; | 1018 attributes.depth = false; |
1019 attributes.stencil = false; | 1019 attributes.stencil = false; |
1020 attributes.antialias = false; | 1020 attributes.antialias = false; |
1021 attributes.noAutomaticFlushes = true; | 1021 attributes.noAutomaticFlushes = true; |
| 1022 attributes.loseContextWhenOutOfMemory = true; |
1022 | 1023 |
1023 scoped_refptr<GpuChannelHost> gpu_channel_host(EstablishGpuChannelSync( | 1024 scoped_refptr<GpuChannelHost> gpu_channel_host(EstablishGpuChannelSync( |
1024 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)); | 1025 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE)); |
1025 return make_scoped_ptr( | 1026 return make_scoped_ptr( |
1026 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( | 1027 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( |
1027 gpu_channel_host.get(), | 1028 gpu_channel_host.get(), |
1028 attributes, | 1029 attributes, |
1029 GURL("chrome://gpu/RenderThreadImpl::CreateOffscreenContext3d"), | 1030 GURL("chrome://gpu/RenderThreadImpl::CreateOffscreenContext3d"), |
1030 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(), | 1031 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(), |
1031 NULL)); | 1032 NULL)); |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1522 hidden_widget_count_--; | 1523 hidden_widget_count_--; |
1523 | 1524 |
1524 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1525 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
1525 return; | 1526 return; |
1526 } | 1527 } |
1527 | 1528 |
1528 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1529 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
1529 } | 1530 } |
1530 | 1531 |
1531 } // namespace content | 1532 } // namespace content |
OLD | NEW |