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 9a91c9c0f1400ac5f61045a74f3dc5309f7e8164..1de1ce1c3a741f7708d7daf0ee5599e874810af4 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" |
@@ -332,6 +333,18 @@ bool VTVideoDecodeAccelerator::ConfigureDecoder() { |
return false; |
} |
+ // Report whether hardware decode is being used. |
+ base::ScopedCFTypeRef<CFBooleanRef> using_hardware; |
+ if (VTSessionCopyProperty( |
DaleCurtis
2014/12/02 18:20:22
Does clang-format bless this alignment? It looks o
sandersd (OOO until July 31)
2014/12/02 18:28:28
Done.
|
+ session_, |
+ // kVTDecompressionPropertyKey_UsingHardwareAcceleratedVideoDecoder |
+ CFSTR("UsingHardwareAcceleratedVideoDecoder"), |
+ kCFAllocatorDefault, |
+ using_hardware.InitializeInto()) == 0) { |
+ UMA_HISTOGRAM_BOOLEAN("Media.VTVDA.UsingHardware", |
DaleCurtis
2014/12/02 18:20:22
Don't you need to log this for some of the other f
sandersd (OOO until July 31)
2014/12/02 18:28:29
This is the only path with internal software fallb
DaleCurtis
2014/12/02 18:29:59
Ahhhh, as posciak@ noted, you definitely need a be
|
+ CFBooleanGetValue(using_hardware)); |
+ } |
+ |
return true; |
} |