| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "cc/output/output_surface.h" | 5 #include "cc/output/output_surface.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 } | 84 } |
| 85 } | 85 } |
| 86 | 86 |
| 87 void setDiscardableMemoryBacking( | 87 void setDiscardableMemoryBacking( |
| 88 const char* dump_name, | 88 const char* dump_name, |
| 89 const SkDiscardableMemory& discardable_memory_object) override { | 89 const SkDiscardableMemory& discardable_memory_object) override { |
| 90 // We don't use this class for dumping discardable memory. | 90 // We don't use this class for dumping discardable memory. |
| 91 NOTREACHED(); | 91 NOTREACHED(); |
| 92 } | 92 } |
| 93 | 93 |
| 94 LevelOfDetail getRequestedDetails() const override { |
| 95 // TODO(ssid): Use MemoryDumpArgs to create light dumps when requested |
| 96 // (crbug.com/499731). |
| 97 return kObjectsBreakdowns_LevelOfDetail; |
| 98 } |
| 99 |
| 94 private: | 100 private: |
| 95 // Helper to create allocator dumps. | 101 // Helper to create allocator dumps. |
| 96 base::trace_event::MemoryAllocatorDump* GetOrCreateAllocatorDump( | 102 base::trace_event::MemoryAllocatorDump* GetOrCreateAllocatorDump( |
| 97 const char* dump_name) { | 103 const char* dump_name) { |
| 98 auto dump = pmd_->GetAllocatorDump(dump_name); | 104 auto dump = pmd_->GetAllocatorDump(dump_name); |
| 99 if (!dump) | 105 if (!dump) |
| 100 dump = pmd_->CreateAllocatorDump(dump_name); | 106 dump = pmd_->CreateAllocatorDump(dump_name); |
| 101 return dump; | 107 return dump; |
| 102 } | 108 } |
| 103 | 109 |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 ContextProvider::LostContextCallback()); | 363 ContextProvider::LostContextCallback()); |
| 358 context_provider_->SetMemoryPolicyChangedCallback( | 364 context_provider_->SetMemoryPolicyChangedCallback( |
| 359 ContextProvider::MemoryPolicyChangedCallback()); | 365 ContextProvider::MemoryPolicyChangedCallback()); |
| 360 } | 366 } |
| 361 context_provider_ = nullptr; | 367 context_provider_ = nullptr; |
| 362 client_ = nullptr; | 368 client_ = nullptr; |
| 363 weak_ptr_factory_.InvalidateWeakPtrs(); | 369 weak_ptr_factory_.InvalidateWeakPtrs(); |
| 364 } | 370 } |
| 365 | 371 |
| 366 } // namespace cc | 372 } // namespace cc |
| OLD | NEW |