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

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

Issue 43283002: Enable GLX/EGL backend switching while run HW video decode with libva. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 2 months 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
« AUTHORS ('K') | « content/content_common.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <dwmapi.h> 8 #include <dwmapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif 10 #endif
(...skipping 24 matching lines...) Expand all
35 #include "ui/gl/gl_switches.h" 35 #include "ui/gl/gl_switches.h"
36 #include "ui/gl/gpu_switching_manager.h" 36 #include "ui/gl/gpu_switching_manager.h"
37 37
38 #if defined(OS_WIN) 38 #if defined(OS_WIN)
39 #include "base/win/windows_version.h" 39 #include "base/win/windows_version.h"
40 #include "base/win/scoped_com_initializer.h" 40 #include "base/win/scoped_com_initializer.h"
41 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" 41 #include "content/common/gpu/media/dxva_video_decode_accelerator.h"
42 #include "sandbox/win/src/sandbox.h" 42 #include "sandbox/win/src/sandbox.h"
43 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11) 43 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11)
44 #include "content/common/gpu/media/exynos_video_decode_accelerator.h" 44 #include "content/common/gpu/media/exynos_video_decode_accelerator.h"
45 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11) 45 #elif defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11)
46 #include "content/common/gpu/media/vaapi_wrapper.h" 46 #include "content/common/gpu/media/vaapi_wrapper.h"
47 #endif 47 #endif
48 48
49 #if defined(USE_X11) 49 #if defined(USE_X11)
50 #include "ui/base/x/x11_util.h" 50 #include "ui/base/x/x11_util.h"
51 #endif 51 #endif
52 52
53 #if defined(OS_LINUX) 53 #if defined(OS_LINUX)
54 #include "content/public/common/sandbox_init.h" 54 #include "content/public/common/sandbox_init.h"
55 #endif 55 #endif
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 crypto::HMAC hmac(crypto::HMAC::SHA256); 353 crypto::HMAC hmac(crypto::HMAC::SHA256);
354 unsigned char key = '\0'; 354 unsigned char key = '\0';
355 if (!hmac.Init(&key, sizeof(key))) { 355 if (!hmac.Init(&key, sizeof(key))) {
356 LOG(ERROR) << "WarmUpSandbox() failed with crypto::HMAC::Init()"; 356 LOG(ERROR) << "WarmUpSandbox() failed with crypto::HMAC::Init()";
357 return false; 357 return false;
358 } 358 }
359 } 359 }
360 360
361 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11) 361 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11)
362 ExynosVideoDecodeAccelerator::PreSandboxInitialization(); 362 ExynosVideoDecodeAccelerator::PreSandboxInitialization();
363 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11) 363 #elif !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_WIN) && \
364 defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11)
364 VaapiWrapper::PreSandboxInitialization(); 365 VaapiWrapper::PreSandboxInitialization();
365 #endif 366 #endif
366 367
367 #if defined(OS_WIN) 368 #if defined(OS_WIN)
368 { 369 {
369 TRACE_EVENT0("gpu", "Preload setupapi.dll"); 370 TRACE_EVENT0("gpu", "Preload setupapi.dll");
370 // Preload this DLL because the sandbox prevents it from loading. 371 // Preload this DLL because the sandbox prevents it from loading.
371 if (LoadLibrary(L"setupapi.dll") == NULL) { 372 if (LoadLibrary(L"setupapi.dll") == NULL) {
372 LOG(ERROR) << "WarmUpSandbox() failed with loading setupapi.dll"; 373 LOG(ERROR) << "WarmUpSandbox() failed with loading setupapi.dll";
373 return false; 374 return false;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 return true; 450 return true;
450 } 451 }
451 452
452 return false; 453 return false;
453 } 454 }
454 #endif // defined(OS_WIN) 455 #endif // defined(OS_WIN)
455 456
456 } // namespace. 457 } // namespace.
457 458
458 } // namespace content 459 } // namespace content
OLDNEW
« AUTHORS ('K') | « content/content_common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698