[//cc] Remove PoolResource::SoftwareBacking::OnMemoryDump()
Both production overrides now have the same implementation, so that implementation can be inlined into the one caller of this method. Bug: 40064122 Change-Id: I8fed2e3fa200339d7821cac75aa792d5532f5699 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6179806 Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/main@{#1408879}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
f5c33278b0
commit
428cb9ce85
@ -174,18 +174,6 @@ class HudSoftwareBacking : public ResourcePool::SoftwareBacking {
|
||||
shared_image->UpdateDestructionSyncToken(mailbox_sync_token);
|
||||
}
|
||||
|
||||
void OnMemoryDump(
|
||||
base::trace_event::ProcessMemoryDump* pmd,
|
||||
const base::trace_event::MemoryAllocatorDumpGuid& buffer_dump_guid,
|
||||
uint64_t tracing_process_id,
|
||||
int importance) const override {
|
||||
if (!shared_image) {
|
||||
return;
|
||||
}
|
||||
|
||||
shared_image->OnMemoryDump(pmd, buffer_dump_guid, importance);
|
||||
}
|
||||
|
||||
raw_ptr<LayerTreeFrameSink> layer_tree_frame_sink;
|
||||
};
|
||||
|
||||
|
@ -41,14 +41,6 @@ class BitmapSoftwareBacking : public ResourcePool::SoftwareBacking {
|
||||
}
|
||||
}
|
||||
|
||||
void OnMemoryDump(
|
||||
base::trace_event::ProcessMemoryDump* pmd,
|
||||
const base::trace_event::MemoryAllocatorDumpGuid& buffer_dump_guid,
|
||||
uint64_t tracing_process_id,
|
||||
int importance) const override {
|
||||
shared_image->OnMemoryDump(pmd, buffer_dump_guid, importance);
|
||||
}
|
||||
|
||||
raw_ptr<LayerTreeFrameSink> frame_sink;
|
||||
std::unique_ptr<gpu::ClientSharedImage::ScopedMapping> mapping;
|
||||
};
|
||||
|
@ -657,9 +657,9 @@ void ResourcePool::PoolResource::OnMemoryDump(
|
||||
static_cast<int>(gpu::TracingImportance::kClientOwner);
|
||||
auto* dump_manager = base::trace_event::MemoryDumpManager::GetInstance();
|
||||
uint64_t tracing_process_id = dump_manager->GetTracingProcessId();
|
||||
if (software_backing_) {
|
||||
software_backing_->OnMemoryDump(pmd, dump->guid(), tracing_process_id,
|
||||
kImportance);
|
||||
if (software_backing_ && software_backing_->shared_image) {
|
||||
software_backing_->shared_image->OnMemoryDump(pmd, dump->guid(),
|
||||
kImportance);
|
||||
} else if (gpu_backing_) {
|
||||
gpu_backing_->OnMemoryDump(pmd, dump->guid(), tracing_process_id,
|
||||
kImportance);
|
||||
|
@ -103,18 +103,6 @@ class CC_EXPORT ResourcePool : public base::trace_event::MemoryDumpProvider {
|
||||
SoftwareBacking();
|
||||
virtual ~SoftwareBacking();
|
||||
|
||||
// Dumps information about the memory backing the SoftwareBacking to |pmd|.
|
||||
// The memory usage is attributed to |buffer_dump_guid|.
|
||||
// |tracing_process_id| uniquely identifies the process owning the memory.
|
||||
// |importance| is relevant only for the cases of co-ownership, the memory
|
||||
// gets attributed to the owner with the highest importance.
|
||||
// Called on the compositor thread.
|
||||
virtual void OnMemoryDump(
|
||||
base::trace_event::ProcessMemoryDump* pmd,
|
||||
const base::trace_event::MemoryAllocatorDumpGuid& buffer_dump_guid,
|
||||
uint64_t tracing_process_id,
|
||||
int importance) const = 0;
|
||||
|
||||
// Mailbox
|
||||
viz::SharedBitmapId shared_bitmap_id;
|
||||
|
||||
|
@ -1775,13 +1775,6 @@ TEST_F(TileManagerTilePriorityQueueTest, NoRasterTasksforSolidColorTiles) {
|
||||
|
||||
class TestSoftwareBacking : public ResourcePool::SoftwareBacking {
|
||||
public:
|
||||
// No tracing is done during these tests.
|
||||
void OnMemoryDump(
|
||||
base::trace_event::ProcessMemoryDump* pmd,
|
||||
const base::trace_event::MemoryAllocatorDumpGuid& buffer_dump_guid,
|
||||
uint64_t tracing_process_id,
|
||||
int importance) const override {}
|
||||
|
||||
std::unique_ptr<uint32_t[]> pixels;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user