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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/debug/trace_event.h" | 6 #include "base/debug/trace_event.h" |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 base::AutoLock auto_lock(lock_); | 104 base::AutoLock auto_lock(lock_); |
| 105 DCHECK_EQ(state_, kUninitialized); | 105 DCHECK_EQ(state_, kUninitialized); |
| 106 DVLOG(2) << "Initializing VAVDA, profile: " << profile; | 106 DVLOG(2) << "Initializing VAVDA, profile: " << profile; |
| 107 | 107 |
| 108 #if defined(USE_X11) | 108 #if defined(USE_X11) |
| 109 if (gfx::GetGLImplementation() != gfx::kGLImplementationDesktopGL) { | 109 if (gfx::GetGLImplementation() != gfx::kGLImplementationDesktopGL) { |
| 110 DVLOG(1) << "HW video decode acceleration not available without " | 110 DVLOG(1) << "HW video decode acceleration not available without " |
| 111 "DesktopGL (GLX)."; | 111 "DesktopGL (GLX)."; |
| 112 return false; | 112 return false; |
| 113 } | 113 } |
| 114 #elif defined(USE_OZONE) | |
| 115 if (gfx::GetGLImplementation() != gfx::kGLImplementationEGLGLES2) { | |
| 116 DVLOG(1) << "HW video decode acceleration not available without " | |
| 117 "EGLGLES2."; | |
|
Pawel Osciak
2014/12/26 00:38:56
s/ "EGLGLES2.";/<< "EGLGLES2.";/
llandwerlin-old
2014/12/26 02:50:02
Done.
| |
| 118 return false; | |
| 119 } | |
| 114 #endif // USE_X11 | 120 #endif // USE_X11 |
| 115 | 121 |
| 116 vaapi_wrapper_ = VaapiWrapper::Create( | 122 vaapi_wrapper_ = VaapiWrapper::Create( |
| 117 VaapiWrapper::kDecode, | 123 VaapiWrapper::kDecode, |
| 118 profile, | 124 profile, |
| 119 base::Bind(&ReportToUMA, content::VaapiH264Decoder::VAAPI_ERROR)); | 125 base::Bind(&ReportToUMA, content::VaapiH264Decoder::VAAPI_ERROR)); |
| 120 | 126 |
| 121 if (!vaapi_wrapper_.get()) { | 127 if (!vaapi_wrapper_.get()) { |
| 122 LOG(ERROR) << "Failed initializing VAAPI"; | 128 LOG(ERROR) << "Failed initializing VAAPI"; |
| 123 return false; | 129 return false; |
| (...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 726 DCHECK_EQ(message_loop_, base::MessageLoop::current()); | 732 DCHECK_EQ(message_loop_, base::MessageLoop::current()); |
| 727 Cleanup(); | 733 Cleanup(); |
| 728 delete this; | 734 delete this; |
| 729 } | 735 } |
| 730 | 736 |
| 731 bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() { | 737 bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() { |
| 732 return false; | 738 return false; |
| 733 } | 739 } |
| 734 | 740 |
| 735 } // namespace content | 741 } // namespace content |
| OLD | NEW |