[//cc] Fold ResourcePool::Backing subclass destructors into base class
Next step in eliminating these subclasses. Bug: 40064122 Change-Id: I266f519da3d9cb1387680d9931014b8edaaf0930 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6226047 Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/main@{#1416674}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
58407203b2
commit
29a386fbdd
@ -39,10 +39,7 @@ using base::trace_event::MemoryDumpLevelOfDetail;
|
||||
namespace cc {
|
||||
|
||||
ResourcePool::Backing::Backing() = default;
|
||||
ResourcePool::Backing::~Backing() = default;
|
||||
|
||||
ResourcePool::GpuBacking::GpuBacking() = default;
|
||||
ResourcePool::GpuBacking::~GpuBacking() {
|
||||
ResourcePool::Backing::~Backing() {
|
||||
if (!shared_image) {
|
||||
return;
|
||||
}
|
||||
@ -51,14 +48,9 @@ ResourcePool::GpuBacking::~GpuBacking() {
|
||||
} else if (mailbox_sync_token.HasData()) {
|
||||
shared_image->UpdateDestructionSyncToken(mailbox_sync_token);
|
||||
}
|
||||
}
|
||||
|
||||
ResourcePool::SoftwareBacking::SoftwareBacking() = default;
|
||||
ResourcePool::SoftwareBacking::~SoftwareBacking() {
|
||||
DCHECK(shared_image);
|
||||
|
||||
shared_image->UpdateDestructionSyncToken(mailbox_sync_token);
|
||||
shared_image.reset();
|
||||
|
||||
// DestroySharedImage is a DeferredRequest, so it doesn't trigger IPC
|
||||
// itself. We need a flush here to trigger IPC. Without the flush, there
|
||||
// will be memory regressions in tiles.
|
||||
@ -67,6 +59,12 @@ ResourcePool::SoftwareBacking::~SoftwareBacking() {
|
||||
}
|
||||
}
|
||||
|
||||
ResourcePool::GpuBacking::GpuBacking() = default;
|
||||
ResourcePool::GpuBacking::~GpuBacking() = default;
|
||||
|
||||
ResourcePool::SoftwareBacking::SoftwareBacking() = default;
|
||||
ResourcePool::SoftwareBacking::~SoftwareBacking() = default;
|
||||
|
||||
namespace {
|
||||
|
||||
// Process-unique number for each resource pool.
|
||||
|
Reference in New Issue
Block a user