| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/renderer/render_view.h" | 5 #include "chrome/renderer/render_view.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 2481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2492 new media::FilterFactoryCollection(); | 2492 new media::FilterFactoryCollection(); |
| 2493 // Add in any custom filter factories first. | 2493 // Add in any custom filter factories first. |
| 2494 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 2494 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
| 2495 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { | 2495 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { |
| 2496 // Add the chrome specific audio renderer. | 2496 // Add the chrome specific audio renderer. |
| 2497 factory->AddFactory( | 2497 factory->AddFactory( |
| 2498 AudioRendererImpl::CreateFactory(audio_message_filter())); | 2498 AudioRendererImpl::CreateFactory(audio_message_filter())); |
| 2499 } | 2499 } |
| 2500 | 2500 |
| 2501 if (cmd_line->HasSwitch(switches::kEnableAcceleratedDecoding) && | 2501 if (cmd_line->HasSwitch(switches::kEnableAcceleratedDecoding) && |
| 2502 !cmd_line->HasSwitch(switches::kDisableAcceleratedCompositing)) { | 2502 cmd_line->HasSwitch(switches::kEnableAcceleratedCompositing)) { |
| 2503 // Add the hardware video decoder factory. | 2503 // Add the hardware video decoder factory. |
| 2504 // TODO(hclam): This assumes that ggl::Context is set to current | 2504 // TODO(hclam): This assumes that ggl::Context is set to current |
| 2505 // internally. I need to make it more explicit to get the context. | 2505 // internally. I need to make it more explicit to get the context. |
| 2506 bool ret = frame->view()->graphicsContext3D()->makeContextCurrent(); | 2506 bool ret = frame->view()->graphicsContext3D()->makeContextCurrent(); |
| 2507 CHECK(ret) << "Failed to switch context"; | 2507 CHECK(ret) << "Failed to switch context"; |
| 2508 | 2508 |
| 2509 factory->AddFactory(IpcVideoDecoder::CreateFactory( | 2509 factory->AddFactory(IpcVideoDecoder::CreateFactory( |
| 2510 MessageLoop::current(), ggl::GetCurrentContext())); | 2510 MessageLoop::current(), ggl::GetCurrentContext())); |
| 2511 } | 2511 } |
| 2512 | 2512 |
| (...skipping 3485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5998 } | 5998 } |
| 5999 | 5999 |
| 6000 void RenderView::OnAsyncFileOpened(base::PlatformFileError error_code, | 6000 void RenderView::OnAsyncFileOpened(base::PlatformFileError error_code, |
| 6001 IPC::PlatformFileForTransit file_for_transit, | 6001 IPC::PlatformFileForTransit file_for_transit, |
| 6002 int message_id) { | 6002 int message_id) { |
| 6003 pepper_delegate_.OnAsyncFileOpened( | 6003 pepper_delegate_.OnAsyncFileOpened( |
| 6004 error_code, | 6004 error_code, |
| 6005 IPC::PlatformFileForTransitToPlatformFile(file_for_transit), | 6005 IPC::PlatformFileForTransitToPlatformFile(file_for_transit), |
| 6006 message_id); | 6006 message_id); |
| 6007 } | 6007 } |
| OLD | NEW |