| 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 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 | 942 |
| 943 if (!offscreen_compositor_contexts_.get() || | 943 if (!offscreen_compositor_contexts_.get() || |
| 944 offscreen_compositor_contexts_->DestroyedOnMainThread()) { | 944 offscreen_compositor_contexts_->DestroyedOnMainThread()) { |
| 945 offscreen_compositor_contexts_ = ContextProviderCommandBuffer::Create( | 945 offscreen_compositor_contexts_ = ContextProviderCommandBuffer::Create( |
| 946 CreateOffscreenContext3d(), | 946 CreateOffscreenContext3d(), |
| 947 "Compositor-Offscreen"); | 947 "Compositor-Offscreen"); |
| 948 } | 948 } |
| 949 return offscreen_compositor_contexts_; | 949 return offscreen_compositor_contexts_; |
| 950 } | 950 } |
| 951 | 951 |
| 952 scoped_refptr<webkit::gpu::ContextProviderWebContext> | 952 scoped_refptr<cc::ContextProvider> |
| 953 RenderThreadImpl::SharedMainThreadContextProvider() { | 953 RenderThreadImpl::SharedMainThreadContextProvider() { |
| 954 DCHECK(IsMainThread()); | 954 DCHECK(IsMainThread()); |
| 955 #if defined(OS_ANDROID) | 955 #if defined(OS_ANDROID) |
| 956 if (SynchronousCompositorFactory* factory = | 956 if (SynchronousCompositorFactory* factory = |
| 957 SynchronousCompositorFactory::GetInstance()) | 957 SynchronousCompositorFactory::GetInstance()) |
| 958 return factory->GetOffscreenContextProviderForMainThread(); | 958 return factory->GetOffscreenContextProviderForMainThread(); |
| 959 #endif | 959 #endif |
| 960 | 960 |
| 961 if (!shared_main_thread_contexts_ || | 961 if (!shared_main_thread_contexts_ || |
| 962 shared_main_thread_contexts_->DestroyedOnMainThread()) { | 962 shared_main_thread_contexts_->DestroyedOnMainThread()) { |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1396 hidden_widget_count_--; | 1396 hidden_widget_count_--; |
| 1397 | 1397 |
| 1398 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1398 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
| 1399 return; | 1399 return; |
| 1400 } | 1400 } |
| 1401 | 1401 |
| 1402 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1402 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
| 1403 } | 1403 } |
| 1404 | 1404 |
| 1405 } // namespace content | 1405 } // namespace content |
| OLD | NEW |