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

Unified Diff: gpu/command_buffer/common/buffer.h

Issue 2535213002: [WIP] Add SharedMemoryTracker to dump base::SharedMemory usage
Patch Set: (rebase) 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 | « gpu/command_buffer/client/transfer_buffer.cc ('k') | gpu/command_buffer/common/buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/common/buffer.h
diff --git a/gpu/command_buffer/common/buffer.h b/gpu/command_buffer/common/buffer.h
index d4de9175471160c9cd478e690978d50b0d207764..90b60e5dbc6a585050c4204389fcd0055068491a 100644
--- a/gpu/command_buffer/common/buffer.h
+++ b/gpu/command_buffer/common/buffer.h
@@ -25,7 +25,7 @@ namespace gpu {
class GPU_EXPORT BufferBacking {
public:
virtual ~BufferBacking() {}
- virtual bool is_shared() const;
+ virtual base::SharedMemory* shared_memory();
virtual void* GetMemory() const = 0;
virtual size_t GetSize() const = 0;
};
@@ -35,10 +35,9 @@ class GPU_EXPORT SharedMemoryBufferBacking : public BufferBacking {
SharedMemoryBufferBacking(std::unique_ptr<base::SharedMemory> shared_memory,
size_t size);
~SharedMemoryBufferBacking() override;
- bool is_shared() const override;
+ base::SharedMemory* shared_memory() override;
void* GetMemory() const override;
size_t GetSize() const override;
- base::SharedMemory* shared_memory() { return shared_memory_.get(); }
private:
std::unique_ptr<base::SharedMemory> shared_memory_;
« no previous file with comments | « gpu/command_buffer/client/transfer_buffer.cc ('k') | gpu/command_buffer/common/buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698