| 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 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 | 931 |
| 932 if (!offscreen_compositor_contexts_.get() || | 932 if (!offscreen_compositor_contexts_.get() || |
| 933 offscreen_compositor_contexts_->DestroyedOnMainThread()) { | 933 offscreen_compositor_contexts_->DestroyedOnMainThread()) { |
| 934 offscreen_compositor_contexts_ = ContextProviderCommandBuffer::Create( | 934 offscreen_compositor_contexts_ = ContextProviderCommandBuffer::Create( |
| 935 CreateOffscreenContext3d(), | 935 CreateOffscreenContext3d(), |
| 936 "Compositor-Offscreen"); | 936 "Compositor-Offscreen"); |
| 937 } | 937 } |
| 938 return offscreen_compositor_contexts_; | 938 return offscreen_compositor_contexts_; |
| 939 } | 939 } |
| 940 | 940 |
| 941 scoped_refptr<cc::ContextProvider> | 941 scoped_refptr<webkit::gpu::ContextProviderWebContext> |
| 942 RenderThreadImpl::SharedMainThreadContextProvider() { | 942 RenderThreadImpl::SharedMainThreadContextProvider() { |
| 943 DCHECK(IsMainThread()); | 943 DCHECK(IsMainThread()); |
| 944 #if defined(OS_ANDROID) | 944 #if defined(OS_ANDROID) |
| 945 if (SynchronousCompositorFactory* factory = | 945 if (SynchronousCompositorFactory* factory = |
| 946 SynchronousCompositorFactory::GetInstance()) | 946 SynchronousCompositorFactory::GetInstance()) |
| 947 return factory->GetOffscreenContextProviderForMainThread(); | 947 return factory->GetOffscreenContextProviderForMainThread(); |
| 948 #endif | 948 #endif |
| 949 | 949 |
| 950 if (!shared_main_thread_contexts_ || | 950 if (!shared_main_thread_contexts_ || |
| 951 shared_main_thread_contexts_->DestroyedOnMainThread()) { | 951 shared_main_thread_contexts_->DestroyedOnMainThread()) { |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1392 hidden_widget_count_--; | 1392 hidden_widget_count_--; |
| 1393 | 1393 |
| 1394 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1394 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
| 1395 return; | 1395 return; |
| 1396 } | 1396 } |
| 1397 | 1397 |
| 1398 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1398 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
| 1399 } | 1399 } |
| 1400 | 1400 |
| 1401 } // namespace content | 1401 } // namespace content |
| OLD | NEW |