Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: content/gpu/gpu_main.cc

Issue 11198060: VDA implementation for Exynos, using V4L2 (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Added H264 parsing for frame boundaries. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stdlib.h> 5 #include <stdlib.h>
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
(...skipping 17 matching lines...) Expand all
28 #include "ui/gl/gl_implementation.h" 28 #include "ui/gl/gl_implementation.h"
29 #include "ui/gl/gl_surface.h" 29 #include "ui/gl/gl_surface.h"
30 #include "ui/gl/gl_switches.h" 30 #include "ui/gl/gl_switches.h"
31 #include "ui/gl/gpu_switching_manager.h" 31 #include "ui/gl/gpu_switching_manager.h"
32 32
33 #if defined(OS_WIN) 33 #if defined(OS_WIN)
34 #include "base/win/scoped_com_initializer.h" 34 #include "base/win/scoped_com_initializer.h"
35 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" 35 #include "content/common/gpu/media/dxva_video_decode_accelerator.h"
36 #include "sandbox/win/src/sandbox.h" 36 #include "sandbox/win/src/sandbox.h"
37 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) 37 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
38 #include "content/common/gpu/media/exynos_video_decode_accelerator.h"
38 #include "content/common/gpu/media/omx_video_decode_accelerator.h" 39 #include "content/common/gpu/media/omx_video_decode_accelerator.h"
39 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) 40 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
40 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" 41 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h"
41 #endif 42 #endif
42 43
43 #if defined(USE_X11) 44 #if defined(USE_X11)
44 #include "ui/base/x/x11_util.h" 45 #include "ui/base/x/x11_util.h"
45 #endif 46 #endif
46 47
47 #if defined(OS_LINUX) 48 #if defined(OS_LINUX)
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 TRACE_EVENT0("gpu", "Warm up HMAC"); 319 TRACE_EVENT0("gpu", "Warm up HMAC");
319 // Warm up the crypto subsystem, which needs to done pre-sandbox on all 320 // Warm up the crypto subsystem, which needs to done pre-sandbox on all
320 // platforms. 321 // platforms.
321 crypto::HMAC hmac(crypto::HMAC::SHA256); 322 crypto::HMAC hmac(crypto::HMAC::SHA256);
322 unsigned char key = '\0'; 323 unsigned char key = '\0';
323 bool ret = hmac.Init(&key, sizeof(key)); 324 bool ret = hmac.Init(&key, sizeof(key));
324 (void) ret; 325 (void) ret;
325 } 326 }
326 327
327 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) 328 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL)
328 OmxVideoDecodeAccelerator::PreSandboxInitialization(); 329 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseExynosVda))
330 ExynosVideoDecodeAccelerator::PreSandboxInitialization();
331 else
332 OmxVideoDecodeAccelerator::PreSandboxInitialization();
329 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) 333 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)
330 VaapiVideoDecodeAccelerator::PreSandboxInitialization(); 334 VaapiVideoDecodeAccelerator::PreSandboxInitialization();
331 #endif 335 #endif
332 336
333 #if defined(OS_LINUX) 337 #if defined(OS_LINUX)
334 // We special case Optimus since the vendor_id we see may not be Nvidia. 338 // We special case Optimus since the vendor_id we see may not be Nvidia.
335 bool uses_nvidia_driver = (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA. 339 bool uses_nvidia_driver = (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA.
336 gpu_info.driver_vendor == "NVIDIA") || 340 gpu_info.driver_vendor == "NVIDIA") ||
337 gpu_info.optimus; 341 gpu_info.optimus;
338 if (uses_nvidia_driver && should_initialize_gl_context) { 342 if (uses_nvidia_driver && should_initialize_gl_context) {
(...skipping 18 matching lines...) Expand all
357 TRACE_EVENT0("gpu", "Initialize DXVA"); 361 TRACE_EVENT0("gpu", "Initialize DXVA");
358 // Initialize H/W video decoding stuff which fails in the sandbox. 362 // Initialize H/W video decoding stuff which fails in the sandbox.
359 DXVAVideoDecodeAccelerator::PreSandboxInitialization(); 363 DXVAVideoDecodeAccelerator::PreSandboxInitialization();
360 } 364 }
361 #endif 365 #endif
362 } 366 }
363 367
364 } // namespace. 368 } // namespace.
365 369
366 } // namespace content 370 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698