diff options
Diffstat (limited to 'chromium/gpu/command_buffer/client/cmd_buffer_helper.h')
-rw-r--r-- | chromium/gpu/command_buffer/client/cmd_buffer_helper.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/chromium/gpu/command_buffer/client/cmd_buffer_helper.h b/chromium/gpu/command_buffer/client/cmd_buffer_helper.h index b5febb3eb8b..8739316b536 100644 --- a/chromium/gpu/command_buffer/client/cmd_buffer_helper.h +++ b/chromium/gpu/command_buffer/client/cmd_buffer_helper.h @@ -14,6 +14,7 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/time/time.h" +#include "base/trace_event/memory_dump_provider.h" #include "build/build_config.h" #include "gpu/command_buffer/common/cmd_buffer_common.h" #include "gpu/command_buffer/common/command_buffer.h" @@ -48,10 +49,11 @@ const int kAutoFlushBig = 2; // 1/2 of the buffer // // helper.WaitForToken(token); // this doesn't return until the first two // // commands have been executed. -class GPU_EXPORT CommandBufferHelper { +class GPU_EXPORT CommandBufferHelper + : public base::trace_event::MemoryDumpProvider { public: explicit CommandBufferHelper(CommandBuffer* command_buffer); - virtual ~CommandBufferHelper(); + ~CommandBufferHelper() override; // Initializes the CommandBufferHelper. // Parameters: @@ -304,6 +306,10 @@ class GPU_EXPORT CommandBufferHelper { CalcImmediateEntries(0); } + // Overridden from base::trace_event::MemoryDumpProvider: + bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, + base::trace_event::ProcessMemoryDump* pmd) override; + private: // Returns the number of available entries (they may not be contiguous). int32 AvailableEntries() { @@ -323,6 +329,8 @@ class GPU_EXPORT CommandBufferHelper { void PeriodicFlushCheck(); #endif + int32 GetTotalFreeEntriesNoWaiting() const; + CommandBuffer* command_buffer_; int32 ring_buffer_id_; int32 ring_buffer_size_; |