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

Unified Diff: components/viz/display_compositor/host_shared_bitmap_manager.cc

Issue 2909873002: Add cc::SharedBitmap::shared_memory_handle() (Closed)
Patch Set: fix tests Created 3 years, 6 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
Index: components/viz/display_compositor/host_shared_bitmap_manager.cc
diff --git a/components/viz/display_compositor/host_shared_bitmap_manager.cc b/components/viz/display_compositor/host_shared_bitmap_manager.cc
index d781c9439cbe0cd1ae7d5c2b02fec0f63245f994..0b8b359a142958e8b062a97edbd87ef56cf985a4 100644
--- a/components/viz/display_compositor/host_shared_bitmap_manager.cc
+++ b/components/viz/display_compositor/host_shared_bitmap_manager.cc
@@ -51,6 +51,13 @@ class HostSharedBitmap : public cc::SharedBitmap {
manager_->FreeSharedMemoryFromMap(id());
}
+ // cc::SharedBitmap:
+ base::SharedMemoryHandle GetSharedMemoryHandle() const override {
+ if (!bitmap_data_->memory)
+ return base::SharedMemoryHandle();
+ return bitmap_data_->memory->handle();
+ }
+
private:
scoped_refptr<BitmapData> bitmap_data_;
HostSharedBitmapManager* manager_;
« no previous file with comments | « cc/test/test_shared_bitmap_manager.cc ('k') | components/viz/display_compositor/host_shared_bitmap_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698