| Index: include/utils/SkMemoryDumpProvider.h
|
| diff --git a/include/utils/SkMemoryDumpProvider.h b/include/utils/SkMemoryDumpProvider.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0ab6c61490754291ce0bdd80a7b22090fe73dea8
|
| --- /dev/null
|
| +++ b/include/utils/SkMemoryDumpProvider.h
|
| @@ -0,0 +1,27 @@
|
| +/*
|
| + * Copyright (C) 2014 Google Inc. All rights reserved.
|
| + *
|
| + * Use of this source code is governed by a BSD-style license that can be
|
| + * found in the LICENSE file.
|
| + */
|
| +
|
| +#ifndef SkMemoryAllocatorDump_DEFINED
|
| +#define SkMemoryAllocatorDump_DEFINED
|
| +
|
| +class SkProcessMemoryDump;
|
| +
|
| +// Base interface to be part of the memory tracing infrastructure. Skia classes
|
| +// can implement this interface and register themselves (see
|
| +// Platform::registerMemoryDumpProvider()) to dump stats for their allocators.
|
| +class SK_API SkMemoryDumpProvider {
|
| + public:
|
| + virtual ~SkMemoryDumpProvider();
|
| +
|
| + // Called by the MemoryDumpManager when generating memory dumps. Embedders
|
| + // are expected to populate the SkProcessMemoryDump* argument and return
|
| + // true on success or false if anything went wrong and the dump should be
|
| + // considered invalid.
|
| + virtual bool onMemoryDump(SkProcessMemoryDump*) = 0;
|
| +};
|
| +
|
| +#endif // SkMemoryDumpProvider_DEFINED
|
|
|