mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1492930 - Part 2. Expose the external image ID for surfaces' memory reporting. r=nical
This commit is contained in:
parent
3aedcdc649
commit
64e9e7e583
@ -420,7 +420,7 @@ public:
|
||||
void AddUserData(UserDataKey *key, void *userData, void (*destroy)(void*)) {
|
||||
mUserData.Add(key, userData, destroy);
|
||||
}
|
||||
void *GetUserData(UserDataKey *key) {
|
||||
void *GetUserData(UserDataKey *key) const {
|
||||
return mUserData.Get(key);
|
||||
}
|
||||
void RemoveUserData(UserDataKey *key) {
|
||||
@ -587,7 +587,8 @@ public:
|
||||
virtual void AddSizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
|
||||
size_t& aHeapSizeOut,
|
||||
size_t& aNonHeapSizeOut,
|
||||
size_t& aExtHandlesOut) const
|
||||
size_t& aExtHandlesOut,
|
||||
uint64_t& aExtIdOut) const
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,8 @@ void
|
||||
SourceSurfaceAlignedRawData::AddSizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
|
||||
size_t& aHeapSizeOut,
|
||||
size_t& aNonHeapSizeOut,
|
||||
size_t& aExtHandlesOut) const
|
||||
size_t& aExtHandlesOut,
|
||||
uint64_t& aExtIdOut) const
|
||||
{
|
||||
aHeapSizeOut += mArray.HeapSizeOfExcludingThis(aMallocSizeOf);
|
||||
}
|
||||
|
@ -131,7 +131,8 @@ public:
|
||||
void AddSizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
|
||||
size_t& aHeapSizeOut,
|
||||
size_t& aNonHeapSizeOut,
|
||||
size_t& aExtHandlesOut) const override;
|
||||
size_t& aExtHandlesOut,
|
||||
uint64_t& aExtIdOut) const override;
|
||||
|
||||
virtual bool Map(MapType, MappedSurface *aMappedSurface) override
|
||||
{
|
||||
|
@ -97,7 +97,8 @@ void
|
||||
SourceSurfaceSharedData::AddSizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
|
||||
size_t& aHeapSizeOut,
|
||||
size_t& aNonHeapSizeOut,
|
||||
size_t& aExtHandlesOut) const
|
||||
size_t& aExtHandlesOut,
|
||||
uint64_t& aExtIdOut) const
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
if (mBuf) {
|
||||
@ -106,6 +107,10 @@ SourceSurfaceSharedData::AddSizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
|
||||
if (!mClosed) {
|
||||
++aExtHandlesOut;
|
||||
}
|
||||
Maybe<wr::ExternalImageId> extId = SharedSurfacesChild::GetExternalId(this);
|
||||
if (extId) {
|
||||
aExtIdOut = wr::AsUint64(extId.ref());
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t*
|
||||
|
@ -175,7 +175,8 @@ public:
|
||||
void AddSizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
|
||||
size_t& aHeapSizeOut,
|
||||
size_t& aNonHeapSizeOut,
|
||||
size_t& aExtHandlesOut) const override;
|
||||
size_t& aExtHandlesOut,
|
||||
uint64_t& aExtIdOut) const override;
|
||||
|
||||
bool OnHeap() const override
|
||||
{
|
||||
|
@ -42,7 +42,8 @@ void
|
||||
SourceSurfaceVolatileData::AddSizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
|
||||
size_t& aHeapSizeOut,
|
||||
size_t& aNonHeapSizeOut,
|
||||
size_t& aExtHandlesOut) const
|
||||
size_t& aExtHandlesOut,
|
||||
uint64_t& aExtIdOut) const
|
||||
{
|
||||
if (mVBuf) {
|
||||
aHeapSizeOut += mVBuf->HeapSizeOfExcludingThis(aMallocSizeOf);
|
||||
|
@ -53,7 +53,8 @@ public:
|
||||
void AddSizeOfExcludingThis(MallocSizeOf aMallocSizeOf,
|
||||
size_t& aHeapSizeOut,
|
||||
size_t& aNonHeapSizeOut,
|
||||
size_t& aExtHandlesOut) const override;
|
||||
size_t& aExtHandlesOut,
|
||||
uint64_t& aExtIdOut) const override;
|
||||
|
||||
bool OnHeap() const override
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user