Chromium Code Reviews| 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 |