Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: skia/ext/skia_memory_dump_provider.cc

Issue 1324453008: Implement the getRequestDetails api in chrome side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@skia_expose
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "skia_memory_dump_provider.h" 5 #include "skia_memory_dump_provider.h"
6 6
7 #include "base/trace_event/memory_allocator_dump.h" 7 #include "base/trace_event/memory_allocator_dump.h"
8 #include "base/trace_event/memory_dump_manager.h" 8 #include "base/trace_event/memory_dump_manager.h"
9 #include "base/trace_event/process_memory_dump.h" 9 #include "base/trace_event/process_memory_dump.h"
10 #include "skia/ext/SkTraceMemoryDump_chrome.h" 10 #include "skia/ext/SkTraceMemoryDump_chrome.h"
(...skipping 17 matching lines...) Expand all
28 base::trace_event::ProcessMemoryDump* process_memory_dump) { 28 base::trace_event::ProcessMemoryDump* process_memory_dump) {
29 base::trace_event::MemoryAllocatorDump* font_mad = 29 base::trace_event::MemoryAllocatorDump* font_mad =
30 process_memory_dump->CreateAllocatorDump("skia/sk_glyph_cache"); 30 process_memory_dump->CreateAllocatorDump("skia/sk_glyph_cache");
31 font_mad->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize, 31 font_mad->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
32 base::trace_event::MemoryAllocatorDump::kUnitsBytes, 32 base::trace_event::MemoryAllocatorDump::kUnitsBytes,
33 SkGraphics::GetFontCacheUsed()); 33 SkGraphics::GetFontCacheUsed());
34 font_mad->AddScalar(base::trace_event::MemoryAllocatorDump::kNameObjectsCount, 34 font_mad->AddScalar(base::trace_event::MemoryAllocatorDump::kNameObjectsCount,
35 base::trace_event::MemoryAllocatorDump::kUnitsObjects, 35 base::trace_event::MemoryAllocatorDump::kUnitsObjects,
36 SkGraphics::GetFontCacheCountUsed()); 36 SkGraphics::GetFontCacheCountUsed());
37 37
38 // TODO(ssid): Use MemoryDumpArgs to create light dumps when requested 38 SkTraceMemoryDump_Chrome skia_dumper(args, process_memory_dump);
39 // (crbug.com/499731).
40 SkTraceMemoryDump_Chrome skia_dumper(process_memory_dump);
41 SkGraphics::DumpMemoryStatistics(&skia_dumper); 39 SkGraphics::DumpMemoryStatistics(&skia_dumper);
42 40
43 return true; 41 return true;
44 } 42 }
45 43
46 } // namespace skia 44 } // namespace skia
OLDNEW
« skia/ext/SkTraceMemoryDump_chrome.h ('K') | « skia/ext/SkTraceMemoryDump_chrome.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698