mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 756601 - Record memory usage for gfxQuartzSurface. r=jrmuizel
This commit is contained in:
parent
99faba83a1
commit
cea9782bd9
@ -34,6 +34,9 @@ gfxQuartzSurface::gfxQuartzSurface(const gfxSize& desiredSize, gfxImageFormat fo
|
||||
CGContextRetain(mCGContext);
|
||||
|
||||
Init(surf);
|
||||
if (mSurfaceValid) {
|
||||
RecordMemoryUsed(mSize.height * 4 + sizeof(gfxQuartzSurface));
|
||||
}
|
||||
}
|
||||
|
||||
gfxQuartzSurface::gfxQuartzSurface(CGContextRef context,
|
||||
@ -56,6 +59,9 @@ gfxQuartzSurface::gfxQuartzSurface(CGContextRef context,
|
||||
CGContextRetain(mCGContext);
|
||||
|
||||
Init(surf);
|
||||
if (mSurfaceValid) {
|
||||
RecordMemoryUsed(mSize.height * 4 + sizeof(gfxQuartzSurface));
|
||||
}
|
||||
}
|
||||
|
||||
gfxQuartzSurface::gfxQuartzSurface(CGContextRef context,
|
||||
@ -76,6 +82,9 @@ gfxQuartzSurface::gfxQuartzSurface(CGContextRef context,
|
||||
CGContextRetain(mCGContext);
|
||||
|
||||
Init(surf);
|
||||
if (mSurfaceValid) {
|
||||
RecordMemoryUsed(mSize.height * 4 + sizeof(gfxQuartzSurface));
|
||||
}
|
||||
}
|
||||
|
||||
gfxQuartzSurface::gfxQuartzSurface(cairo_surface_t *csurf,
|
||||
@ -111,6 +120,9 @@ gfxQuartzSurface::gfxQuartzSurface(unsigned char *data,
|
||||
CGContextRetain(mCGContext);
|
||||
|
||||
Init(surf);
|
||||
if (mSurfaceValid) {
|
||||
RecordMemoryUsed(mSize.height * stride + sizeof(gfxQuartzSurface));
|
||||
}
|
||||
}
|
||||
|
||||
already_AddRefed<gfxASurface>
|
||||
|
Loading…
Reference in New Issue
Block a user