OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 #ifndef SkMemoryAllocatorDump_DEFINED |
| 9 #define SkMemoryAllocatorDump_DEFINED |
| 10 |
| 11 class SkProcessMemoryDump; |
| 12 |
| 13 // Base interface to be part of the memory tracing infrastructure. Skia classes |
| 14 // can implement this interface and register themselves (see |
| 15 // Platform::registerMemoryDumpProvider()) to dump stats for their allocators. |
| 16 class SK_API SkMemoryDumpProvider { |
| 17 public: |
| 18 virtual ~SkMemoryDumpProvider(); |
| 19 |
| 20 // Called by the MemoryDumpManager when generating memory dumps. Embedders |
| 21 // are expected to populate the SkProcessMemoryDump* argument and return |
| 22 // true on success or false if anything went wrong and the dump should be |
| 23 // considered invalid. |
| 24 virtual bool onMemoryDump(SkProcessMemoryDump*) = 0; |
| 25 }; |
| 26 |
| 27 #endif // SkMemoryDumpProvider_DEFINED |
OLD | NEW |