| 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 | 293 |
| 294 if (!make_context_current_.Run()) | 294 if (!make_context_current_.Run()) |
| 295 return false; | 295 return false; |
| 296 | 296 |
| 297 if (!InitializeFBConfig()) { | 297 if (!InitializeFBConfig()) { |
| 298 DVLOG(1) << "Could not get a usable FBConfig"; | 298 DVLOG(1) << "Could not get a usable FBConfig"; |
| 299 return false; | 299 return false; |
| 300 } | 300 } |
| 301 | 301 |
| 302 vaapi_wrapper_ = VaapiWrapper::Create( | 302 vaapi_wrapper_ = VaapiWrapper::Create( |
| 303 VaapiWrapper::kDecode, | 303 profile, x_display_, |
| 304 profile, | |
| 305 x_display_, | |
| 306 base::Bind(&ReportToUMA, content::VaapiH264Decoder::VAAPI_ERROR)); | 304 base::Bind(&ReportToUMA, content::VaapiH264Decoder::VAAPI_ERROR)); |
| 307 | 305 |
| 308 if (!vaapi_wrapper_.get()) { | 306 if (!vaapi_wrapper_.get()) { |
| 309 DVLOG(1) << "Failed initializing VAAPI"; | 307 DVLOG(1) << "Failed initializing VAAPI"; |
| 310 return false; | 308 return false; |
| 311 } | 309 } |
| 312 | 310 |
| 313 decoder_.reset( | 311 decoder_.reset( |
| 314 new VaapiH264Decoder( | 312 new VaapiH264Decoder( |
| 315 vaapi_wrapper_.get(), | 313 vaapi_wrapper_.get(), |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 DCHECK_EQ(message_loop_, base::MessageLoop::current()); | 912 DCHECK_EQ(message_loop_, base::MessageLoop::current()); |
| 915 Cleanup(); | 913 Cleanup(); |
| 916 delete this; | 914 delete this; |
| 917 } | 915 } |
| 918 | 916 |
| 919 bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() { | 917 bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() { |
| 920 return false; | 918 return false; |
| 921 } | 919 } |
| 922 | 920 |
| 923 } // namespace content | 921 } // namespace content |
| OLD | NEW |