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 <utility> | 10 #include <utility> |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 #include "third_party/icu/source/i18n/unicode/timezone.h" | 163 #include "third_party/icu/source/i18n/unicode/timezone.h" |
164 #include "third_party/skia/include/core/SkGraphics.h" | 164 #include "third_party/skia/include/core/SkGraphics.h" |
165 #include "ui/base/layout.h" | 165 #include "ui/base/layout.h" |
166 #include "ui/base/ui_base_switches.h" | 166 #include "ui/base/ui_base_switches.h" |
167 #include "ui/gl/gl_switches.h" | 167 #include "ui/gl/gl_switches.h" |
168 | 168 |
169 #if defined(OS_ANDROID) | 169 #if defined(OS_ANDROID) |
170 #include <cpu-features.h> | 170 #include <cpu-features.h> |
171 #include "content/renderer/android/synchronous_compositor_filter.h" | 171 #include "content/renderer/android/synchronous_compositor_filter.h" |
172 #include "content/renderer/android/synchronous_compositor_frame_sink.h" | 172 #include "content/renderer/android/synchronous_compositor_frame_sink.h" |
173 #include "content/renderer/media/android/renderer_demuxer_android.h" | |
174 #include "content/renderer/media/android/stream_texture_factory.h" | 173 #include "content/renderer/media/android/stream_texture_factory.h" |
175 #include "media/base/android/media_codec_util.h" | 174 #include "media/base/android/media_codec_util.h" |
176 #endif | 175 #endif |
177 | 176 |
178 #if defined(OS_MACOSX) | 177 #if defined(OS_MACOSX) |
179 #include "base/mac/mac_util.h" | 178 #include "base/mac/mac_util.h" |
180 #include "content/renderer/theme_helper_mac.h" | 179 #include "content/renderer/theme_helper_mac.h" |
181 #include "content/renderer/webscrollbarbehavior_impl_mac.h" | 180 #include "content/renderer/webscrollbarbehavior_impl_mac.h" |
182 #endif | 181 #endif |
183 | 182 |
(...skipping 1960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2144 } | 2143 } |
2145 return file_thread_->task_runner(); | 2144 return file_thread_->task_runner(); |
2146 } | 2145 } |
2147 | 2146 |
2148 scoped_refptr<base::SingleThreadTaskRunner> | 2147 scoped_refptr<base::SingleThreadTaskRunner> |
2149 RenderThreadImpl::GetMediaThreadTaskRunner() { | 2148 RenderThreadImpl::GetMediaThreadTaskRunner() { |
2150 DCHECK(message_loop()->task_runner()->BelongsToCurrentThread()); | 2149 DCHECK(message_loop()->task_runner()->BelongsToCurrentThread()); |
2151 if (!media_thread_) { | 2150 if (!media_thread_) { |
2152 media_thread_.reset(new base::Thread("Media")); | 2151 media_thread_.reset(new base::Thread("Media")); |
2153 media_thread_->Start(); | 2152 media_thread_->Start(); |
2154 | |
2155 #if defined(OS_ANDROID) | |
2156 renderer_demuxer_ = new RendererDemuxerAndroid(); | |
2157 AddFilter(renderer_demuxer_.get()); | |
2158 #endif | |
2159 } | 2153 } |
2160 return media_thread_->task_runner(); | 2154 return media_thread_->task_runner(); |
2161 } | 2155 } |
2162 | 2156 |
2163 base::TaskRunner* RenderThreadImpl::GetWorkerTaskRunner() { | 2157 base::TaskRunner* RenderThreadImpl::GetWorkerTaskRunner() { |
2164 return categorized_worker_pool_.get(); | 2158 return categorized_worker_pool_.get(); |
2165 } | 2159 } |
2166 | 2160 |
2167 scoped_refptr<ContextProviderCommandBuffer> | 2161 scoped_refptr<ContextProviderCommandBuffer> |
2168 RenderThreadImpl::SharedCompositorWorkerContextProvider() { | 2162 RenderThreadImpl::SharedCompositorWorkerContextProvider() { |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2315 if (blink::mainThreadIsolate()) { | 2309 if (blink::mainThreadIsolate()) { |
2316 blink::mainThreadIsolate()->MemoryPressureNotification( | 2310 blink::mainThreadIsolate()->MemoryPressureNotification( |
2317 v8::MemoryPressureLevel::kCritical); | 2311 v8::MemoryPressureLevel::kCritical); |
2318 blink::MemoryPressureNotificationToWorkerThreadIsolates( | 2312 blink::MemoryPressureNotificationToWorkerThreadIsolates( |
2319 v8::MemoryPressureLevel::kCritical); | 2313 v8::MemoryPressureLevel::kCritical); |
2320 } | 2314 } |
2321 } | 2315 } |
2322 | 2316 |
2323 | 2317 |
2324 } // namespace content | 2318 } // namespace content |
OLD | NEW |