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..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 |