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

Unified Diff: content/common/gpu/gpu_channel_manager.cc

Issue 1148813005: Fixing crash in GPU memory dump. Will investigate more correct solution in a separate CL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Did not revert correctly. Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/gpu_channel_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_channel_manager.cc
diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc
index 73dd502d99abdaff4ebc846c852ced0cc904214b..4cec7cb3c8114656a0138f24c144935a56bebb1f 100644
--- a/content/common/gpu/gpu_channel_manager.cc
+++ b/content/common/gpu/gpu_channel_manager.cc
@@ -4,14 +4,11 @@
#include "content/common/gpu/gpu_channel_manager.h"
-#include <algorithm>
#include "base/bind.h"
#include "base/command_line.h"
#include "base/location.h"
#include "base/single_thread_task_runner.h"
#include "base/thread_task_runner_handle.h"
-#include "base/trace_event/memory_dump_manager.h"
-#include "base/trace_event/process_memory_dump.h"
#include "content/common/gpu/gpu_channel.h"
#include "content/common/gpu/gpu_memory_buffer_factory.h"
#include "content/common/gpu/gpu_memory_manager.h"
@@ -115,8 +112,6 @@ GpuChannelManager::GpuChannelManager(
DCHECK(router_);
DCHECK(io_task_runner);
DCHECK(shutdown_event);
- base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
- this, io_task_runner_);
channel_->AddFilter(filter_.get());
}
@@ -348,23 +343,6 @@ gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() {
return default_offscreen_surface_.get();
}
-bool GpuChannelManager::OnMemoryDump(
- base::trace_event::ProcessMemoryDump* pmd) {
- for (const auto& channel : gpu_channels_) {
- auto dump_name = channel.second->GetChannelName();
- std::replace(dump_name.begin(), dump_name.end(), '.', '_');
-
- base::trace_event::MemoryAllocatorDump* dump = pmd->CreateAllocatorDump(
- base::StringPrintf("gl/%s", dump_name.c_str()));
-
- dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
- base::trace_event::MemoryAllocatorDump::kUnitsBytes,
- channel.second->GetMemoryUsage());
- }
-
- return true;
-}
-
void GpuChannelManager::OnRelinquishResources() {
relinquish_resources_pending_ = true;
CheckRelinquishGpuResources();
« no previous file with comments | « content/common/gpu/gpu_channel_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698