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

Unified Diff: cc/resources/shared_bitmap.h

Issue 2909873002: Add cc::SharedBitmap::shared_memory_handle() (Closed)
Patch Set: Address on reviews 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 | « no previous file | cc/resources/shared_bitmap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/shared_bitmap.h
diff --git a/cc/resources/shared_bitmap.h b/cc/resources/shared_bitmap.h
index 464ac5c6d4c020ed3cab876bc69c50a303843171..d21561e862712c1539c62a2756ceadb007ab76e7 100644
--- a/cc/resources/shared_bitmap.h
+++ b/cc/resources/shared_bitmap.h
@@ -14,6 +14,10 @@
#include "gpu/command_buffer/common/mailbox.h"
#include "ui/gfx/geometry/size.h"
+namespace base {
+class SharedMemoryHandle;
+}
+
namespace cc {
typedef gpu::Mailbox SharedBitmapId;
@@ -30,6 +34,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/06/06 16:03:47 virtual functions should be CamelCase. I also didn
hajimehoshi 2017/06/07 07:17:35 Done.
+
// 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698