1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* vim: set ts=8 sts=4 et sw=4 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef GFXTEXTURESREPORTER_H_
8 #define GFXTEXTURESREPORTER_H_
10 #include "nsIMemoryReporter.h"
16 class GfxTexturesReporter MOZ_FINAL
: public MemoryUniReporter
20 : MemoryUniReporter("gfx-textures", KIND_OTHER
, UNITS_BYTES
,
21 "Memory used for storing GL textures.")
24 // There must be only one instance of this class, due to |sAmount|
25 // being static. Assert this.
26 static bool hasRun
= false;
33 // when memory being allocated is reported to a memory reporter
35 // when memory being freed is reported to a memory reporter
39 // When memory is used/freed for tile textures, call this method to update
40 // the value reported by this memory reporter.
41 static void UpdateAmount(MemoryUse action
, GLenum format
, GLenum type
,
45 int64_t Amount() MOZ_OVERRIDE
{ return sAmount
; }
47 static int64_t sAmount
;
53 #endif // GFXTEXTURESREPORTER_H_