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

Unified Diff: content/common/gpu/media/vt_video_decode_accelerator.cc

Issue 773673002: Add UMA to track software fallback in VTVideoDecodeAccelerator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/media/vt_stubs_header.fragment ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0cfc6b3e60ee54db67489cd668320fc9198a9b25 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"
@@ -318,7 +319,8 @@ bool VTVideoDecodeAccelerator::ConfigureDecoder() {
base::ScopedCFTypeRef<CFMutableDictionaryRef> image_config(
BuildImageConfig(coded_dimensions));
- // TODO(sandersd): Does the old session need to be flushed first?
+ if (!FinishDelayedFrames())
Pawel Osciak 2014/12/02 01:21:51 This is I think not related to this CL?
sandersd (OOO until July 31) 2014/12/02 01:25:31 Done.
+ return false;
session_.reset();
status = VTDecompressionSessionCreate(
kCFAllocatorDefault,
@@ -332,6 +334,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.UsingHardware",
+ CFBooleanGetValue(using_hardware));
+ }
+
return true;
}
« no previous file with comments | « content/common/gpu/media/vt_stubs_header.fragment ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698