| Index: content/common/gpu/media/vt_video_decode_accelerator.cc
|
| diff --git a/content/common/gpu/media/vt_video_decode_accelerator.cc b/content/common/gpu/media/vt_video_decode_accelerator.cc
|
| index d4ad116c39304c12eca8c2894220897269aa7b20..b0a9d7edf5acefdc6eba5d53fc1467e43c426ced 100644
|
| --- a/content/common/gpu/media/vt_video_decode_accelerator.cc
|
| +++ b/content/common/gpu/media/vt_video_decode_accelerator.cc
|
| @@ -12,6 +12,7 @@
|
| #include "base/command_line.h"
|
| #include "base/logging.h"
|
| #include "base/mac/mac_logging.h"
|
| +#include "base/metrics/histogram_macros.h"
|
| #include "base/sys_byteorder.h"
|
| #include "base/thread_task_runner_handle.h"
|
| #include "content/common/gpu/media/vt_video_decode_accelerator.h"
|
| @@ -334,6 +335,18 @@ bool VTVideoDecodeAccelerator::ConfigureDecoder() {
|
| return false;
|
| }
|
|
|
| + // Report whether hardware decode is being used.
|
| + base::ScopedCFTypeRef<CFBooleanRef> using_hardware;
|
| + if (VTSessionCopyProperty(
|
| + session_,
|
| + // kVTDecompressionPropertyKey_UsingHardwareAcceleratedVideoDecoder
|
| + CFSTR("UsingHardwareAcceleratedVideoDecoder"),
|
| + kCFAllocatorDefault,
|
| + using_hardware.InitializeInto()) == 0) {
|
| + UMA_HISTOGRAM_BOOLEAN("Media.VTVDA.HardwareAccelerated",
|
| + CFBooleanGetValue(using_hardware));
|
| + }
|
| +
|
| return true;
|
| }
|
|
|
|
|