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

Unified Diff: services/ui/public/cpp/bitmap/child_shared_bitmap_manager.cc

Issue 2535213002: [WIP] Add SharedMemoryTracker to dump base::SharedMemory usage
Patch Set: (rebase) Created 3 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 | « media/video/gpu_memory_buffer_video_frame_pool.cc ('k') | ui/gfx/gpu_memory_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/public/cpp/bitmap/child_shared_bitmap_manager.cc
diff --git a/services/ui/public/cpp/bitmap/child_shared_bitmap_manager.cc b/services/ui/public/cpp/bitmap/child_shared_bitmap_manager.cc
index 92fc4300b1891aba9d4cc158ca79d771fb9723b3..08fbcdcc00108b7549502012034352487d12ffd3 100644
--- a/services/ui/public/cpp/bitmap/child_shared_bitmap_manager.cc
+++ b/services/ui/public/cpp/bitmap/child_shared_bitmap_manager.cc
@@ -31,6 +31,8 @@ class ChildSharedBitmap : public cc::SharedBitmap {
: cc::SharedBitmap(static_cast<uint8_t*>(shared_memory->memory()), id),
shared_bitmap_manager_ptr_(shared_bitmap_manager_ptr) {}
+ // TODO(hajimehoshi): shared bitmpa is not reffered in this case?
+
ChildSharedBitmap(
const scoped_refptr<cc::mojom::ThreadSafeSharedBitmapManagerAssociatedPtr>
shared_bitmap_manager_ptr,
@@ -46,6 +48,10 @@ class ChildSharedBitmap : public cc::SharedBitmap {
(*shared_bitmap_manager_ptr_)->DidDeleteSharedBitmap(id());
}
+ base::SharedMemory* GetSharedMemory() const override {
+ return shared_memory_holder_.get();
+ }
+
private:
scoped_refptr<cc::mojom::ThreadSafeSharedBitmapManagerAssociatedPtr>
shared_bitmap_manager_ptr_;
« no previous file with comments | « media/video/gpu_memory_buffer_video_frame_pool.cc ('k') | ui/gfx/gpu_memory_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698