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

Unified Diff: cc/test/test_shared_bitmap_manager.cc

Issue 2775423003: Add ownership edges between HostSharedBitmap and shared memory
Patch Set: Fix comments Created 3 years, 9 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 | « cc/resources/shared_bitmap.cc ('k') | content/child/child_shared_bitmap_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/test_shared_bitmap_manager.cc
diff --git a/cc/test/test_shared_bitmap_manager.cc b/cc/test/test_shared_bitmap_manager.cc
index 604f669af5bbb643ef9aa3a94cf17182e62eed36..479beb625ec684065ac4d4fdd1d8539a024d6695 100644
--- a/cc/test/test_shared_bitmap_manager.cc
+++ b/cc/test/test_shared_bitmap_manager.cc
@@ -16,7 +16,9 @@ class OwnedSharedBitmap : public SharedBitmap {
public:
OwnedSharedBitmap(std::unique_ptr<base::SharedMemory> shared_memory,
const SharedBitmapId& id)
- : SharedBitmap(static_cast<uint8_t*>(shared_memory->memory()), id),
+ : SharedBitmap(static_cast<uint8_t*>(shared_memory->memory()),
+ shared_memory.get(),
+ id),
shared_memory_(std::move(shared_memory)) {}
~OwnedSharedBitmap() override {}
@@ -48,7 +50,7 @@ std::unique_ptr<SharedBitmap> TestSharedBitmapManager::GetSharedBitmapFromId(
if (bitmap_map_.find(id) == bitmap_map_.end())
return nullptr;
uint8_t* pixels = static_cast<uint8_t*>(bitmap_map_[id]->memory());
- return base::MakeUnique<SharedBitmap>(pixels, id);
+ return base::MakeUnique<SharedBitmap>(pixels, bitmap_map_[id], id);
}
} // namespace cc
« no previous file with comments | « cc/resources/shared_bitmap.cc ('k') | content/child/child_shared_bitmap_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698