0

CommandBufferHelper should not implement MemoryDumpProvider

Currently, CommandBufferHelper implements MemoryDumpProvider. This
interface is never used, as the relevant function is directly called
from classes which hold CommandBufferHelpers.

In fact, calling OnMemoryDump generically via the MemoryDumpProvider
interface is risky, as there are locking concerns.

Removing this interface.

Bug: 529678
Change-Id: Ic60c4afaf697d07881a8b12343ca3f2a1d9a7608
Reviewed-on: https://chromium-review.googlesource.com/c/1336512
Reviewed-by: Chris Blume <cblume@chromium.org>
Commit-Queue: Eric Karl <ericrk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608645}
This commit is contained in:
Eric Karl
2018-11-16 03:21:53 +00:00
committed by Commit Bot
parent 5a98ab8d1f
commit 07e6711c3c

@@ -51,11 +51,10 @@ 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
: public base::trace_event::MemoryDumpProvider {
class GPU_EXPORT CommandBufferHelper {
public:
explicit CommandBufferHelper(CommandBuffer* command_buffer);
~CommandBufferHelper() override;
virtual ~CommandBufferHelper();
// Initializes the CommandBufferHelper.
// Parameters:
@@ -267,9 +266,8 @@ class GPU_EXPORT CommandBufferHelper
bool usable() const { return usable_; }
// Overridden from base::trace_event::MemoryDumpProvider:
bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
base::trace_event::ProcessMemoryDump* pmd) override;
base::trace_event::ProcessMemoryDump* pmd);
int32_t GetPutOffsetForTest() const { return put_; }