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

Unified Diff: media/gpu/vt_video_decode_accelerator_mac.h

Issue 2771923006: Add CVPixelBufferRef memory tracking (Closed)
Patch Set: Created 3 years, 9 months 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 | « gpu/command_buffer/service/texture_manager.cc ('k') | media/gpu/vt_video_decode_accelerator_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/vt_video_decode_accelerator_mac.h
diff --git a/media/gpu/vt_video_decode_accelerator_mac.h b/media/gpu/vt_video_decode_accelerator_mac.h
index 75dbce5eeb55045bc318878e59b0541005f37aee..9a69ef5525d955168e90472f0b07bad5ddcc77ac 100644
--- a/media/gpu/vt_video_decode_accelerator_mac.h
+++ b/media/gpu/vt_video_decode_accelerator_mac.h
@@ -20,6 +20,7 @@
#include "base/message_loop/message_loop.h"
#include "base/threading/thread.h"
#include "base/threading/thread_checker.h"
+#include "base/trace_event/memory_dump_provider.h"
#include "media/filters/h264_parser.h"
#include "media/gpu/gpu_video_decode_accelerator_helpers.h"
#include "media/gpu/media_gpu_export.h"
@@ -36,7 +37,8 @@ MEDIA_GPU_EXPORT bool InitializeVideoToolbox();
// VideoToolbox.framework implementation of the VideoDecodeAccelerator
// interface for Mac OS X (currently limited to 10.9+).
-class VTVideoDecodeAccelerator : public VideoDecodeAccelerator {
+class VTVideoDecodeAccelerator : public VideoDecodeAccelerator,
+ public base::trace_event::MemoryDumpProvider {
public:
explicit VTVideoDecodeAccelerator(
const MakeGLContextCurrentCallback& make_context_current_cb,
@@ -58,6 +60,10 @@ class VTVideoDecodeAccelerator : public VideoDecodeAccelerator {
const scoped_refptr<base::SingleThreadTaskRunner>& decode_task_runner)
override;
+ // MemoryDumpProvider implementation.
+ bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
+ base::trace_event::ProcessMemoryDump* pmd) override;
+
// Called by OutputThunk() when VideoToolbox finishes decoding a frame.
void Output(void* source_frame_refcon,
OSStatus status,
@@ -268,6 +274,9 @@ class VTVideoDecodeAccelerator : public VideoDecodeAccelerator {
bool missing_idr_logged_ = false;
H264POC poc_;
+ // Id number for this instance for memory dumps.
+ int memory_dump_id_ = 0;
+
//
// Shared state (set up and torn down on GPU thread).
//
« no previous file with comments | « gpu/command_buffer/service/texture_manager.cc ('k') | media/gpu/vt_video_decode_accelerator_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698