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

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

Issue 2909873002: Add cc::SharedBitmap::shared_memory_handle() (Closed)
Patch Set: 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
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..87febf9e95247c3174c4816e137513b8ef047499 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 shared_memory_handle() const override {
+ if (!bitmap_data_->memory)
danakj 2017/05/31 16:10:31 When can this be null?
hajimehoshi 2017/06/01 04:47:58 When this is created from HostSharedBitmapManager
+ return base::SharedMemoryHandle();
+ return bitmap_data_->memory->handle();
+ }
+
private:
scoped_refptr<BitmapData> bitmap_data_;
HostSharedBitmapManager* manager_;

Powered by Google App Engine
This is Rietveld 408576698