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

Unified Diff: cc/resources/shared_bitmap.h

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: cc/resources/shared_bitmap.h
diff --git a/cc/resources/shared_bitmap.h b/cc/resources/shared_bitmap.h
index 464ac5c6d4c020ed3cab876bc69c50a303843171..0604e966c9b19901fac2ccf1e9d66e86751e4211 100644
--- a/cc/resources/shared_bitmap.h
+++ b/cc/resources/shared_bitmap.h
@@ -14,6 +14,12 @@
#include "gpu/command_buffer/common/mailbox.h"
#include "ui/gfx/geometry/size.h"
+namespace base {
+
danakj 2017/05/31 16:10:31 nit: remove whitespace
hajimehoshi 2017/06/01 04:47:58 Done.
+class SharedMemoryHandle;
+
danakj 2017/05/31 16:10:31 nit: remove whitespace
hajimehoshi 2017/06/01 04:47:58 Done.
+} // namespace base
danakj 2017/05/31 16:10:31 nit: no need for this comment on such a short bloc
hajimehoshi 2017/06/01 04:47:57 Done.
+
namespace cc {
typedef gpu::Mailbox SharedBitmapId;
@@ -30,6 +36,10 @@ class CC_EXPORT SharedBitmap {
const SharedBitmapId& id() { return id_; }
+ // Returns the shared memory's handle when the back end is base::SharedMemory.
+ // Otherwise, this returns an invalid handle.
+ virtual base::SharedMemoryHandle shared_memory_handle() const;
danakj 2017/05/31 16:10:31 Who will call this? You only implement this for th
hajimehoshi 2017/06/01 04:47:58 cc::ResourceProvider::Resource will call this. In
danakj 2017/06/01 13:25:49 Then why is there no override for ChildSharedBitma
danakj 2017/06/01 16:29:32 Can you make this pure virtual? That would force u
+
// Returns true if the size is valid and false otherwise.
static bool SizeInBytes(const gfx::Size& size, size_t* size_in_bytes);
// Dies with a CRASH() if the size can not be represented as a positive number
« no previous file with comments | « no previous file | cc/resources/shared_bitmap.cc » ('j') | components/viz/display_compositor/host_shared_bitmap_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698