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

Unified Diff: cc/resources/shared_bitmap.h

Issue 2775423003: Add ownership edges between HostSharedBitmap and shared memory
Patch Set: Fix comments Created 3 years, 9 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 | « base/trace_event/process_memory_dump.cc ('k') | 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..faacae9124b0d7d9783a1ac05c39fe5ed1af3751 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 {
+
+class SharedMemory;
+
+} // namespace base
+
namespace cc {
typedef gpu::Mailbox SharedBitmapId;
@@ -22,12 +28,16 @@ GetSharedBitmapGUIDForTracing(const SharedBitmapId& bitmap_id);
class CC_EXPORT SharedBitmap {
public:
- SharedBitmap(uint8_t* pixels, const SharedBitmapId& id);
+ SharedBitmap(uint8_t* pixels,
+ base::SharedMemory* shared_memory,
+ const SharedBitmapId& id);
virtual ~SharedBitmap();
uint8_t* pixels() { return pixels_; }
+ base::SharedMemory* shared_memory() const { return shared_memory_; }
+
const SharedBitmapId& id() { return id_; }
// Returns true if the size is valid and false otherwise.
@@ -45,6 +55,7 @@ class CC_EXPORT SharedBitmap {
private:
uint8_t* pixels_;
+ base::SharedMemory* shared_memory_;
SharedBitmapId id_;
DISALLOW_COPY_AND_ASSIGN(SharedBitmap);
« no previous file with comments | « base/trace_event/process_memory_dump.cc ('k') | cc/resources/shared_bitmap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698