Chromium Code Reviews| 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_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 2389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2400 // Add the chrome specific audio renderer, using audio_source_provider | 2400 // Add the chrome specific audio renderer, using audio_source_provider |
| 2401 // as the sink. | 2401 // as the sink. |
| 2402 media::AudioRendererImpl* audio_renderer = | 2402 media::AudioRendererImpl* audio_renderer = |
| 2403 new media::AudioRendererImpl(audio_source_provider); | 2403 new media::AudioRendererImpl(audio_source_provider); |
| 2404 collection->AddAudioRenderer(audio_renderer); | 2404 collection->AddAudioRenderer(audio_renderer); |
| 2405 } | 2405 } |
| 2406 | 2406 |
| 2407 // Accelerated video decode is not enabled by default on Linux. | 2407 // Accelerated video decode is not enabled by default on Linux. |
| 2408 // crbug.com/137247 | 2408 // crbug.com/137247 |
| 2409 bool use_accelerated_video_decode = false; | 2409 bool use_accelerated_video_decode = false; |
| 2410 #if defined(OS_CHROMEOS) || defined(OS_WIN) | 2410 #if defined(OS_CHROMEOS) |
| 2411 use_accelerated_video_decode = true; | 2411 use_accelerated_video_decode = true; |
| 2412 #endif | 2412 #elif defined(OS_WIN) |
|
Ami GONE FROM CHROMIUM
2012/08/13 19:38:28
This isn't necessary (false is the default value a
ananta
2012/08/13 19:43:59
I added the #else to prevent the CommandLine switc
Ami GONE FROM CHROMIUM
2012/08/13 19:51:47
Did you miss that there's an &= in there?
ananta
2012/08/13 19:52:12
Removed the #elif OS_WIN check here. The &= expres
| |
| 2413 use_accelerated_video_decode = false; | |
| 2414 #else | |
| 2413 use_accelerated_video_decode &= !CommandLine::ForCurrentProcess()->HasSwitch( | 2415 use_accelerated_video_decode &= !CommandLine::ForCurrentProcess()->HasSwitch( |
| 2414 switches::kDisableAcceleratedVideoDecode); | 2416 switches::kDisableAcceleratedVideoDecode); |
| 2417 #endif | |
| 2415 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> context3d = | 2418 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> context3d = |
| 2416 use_accelerated_video_decode ? | 2419 use_accelerated_video_decode ? |
| 2417 RenderThreadImpl::current()->GetGpuVDAContext3D() : | 2420 RenderThreadImpl::current()->GetGpuVDAContext3D() : |
| 2418 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl>(); | 2421 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl>(); |
| 2419 if (context3d) { | 2422 if (context3d) { |
| 2420 MessageLoop* factories_loop = | 2423 MessageLoop* factories_loop = |
| 2421 RenderThreadImpl::current()->compositor_thread() ? | 2424 RenderThreadImpl::current()->compositor_thread() ? |
| 2422 RenderThreadImpl::current()->compositor_thread()->GetWebThread() | 2425 RenderThreadImpl::current()->compositor_thread()->GetWebThread() |
| 2423 ->message_loop() : | 2426 ->message_loop() : |
| 2424 MessageLoop::current(); | 2427 MessageLoop::current(); |
| (...skipping 3350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5775 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5778 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5776 return !!RenderThreadImpl::current()->compositor_thread(); | 5779 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5777 } | 5780 } |
| 5778 | 5781 |
| 5779 void RenderViewImpl::OnJavaBridgeInit() { | 5782 void RenderViewImpl::OnJavaBridgeInit() { |
| 5780 DCHECK(!java_bridge_dispatcher_); | 5783 DCHECK(!java_bridge_dispatcher_); |
| 5781 #if defined(ENABLE_JAVA_BRIDGE) | 5784 #if defined(ENABLE_JAVA_BRIDGE) |
| 5782 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5785 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
| 5783 #endif | 5786 #endif |
| 5784 } | 5787 } |
| OLD | NEW |