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

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

Issue 2575803002: Bug fix: TranferBufferManager's SharedMemory memory usage reporting was wrong (Closed)
Patch Set: Created 4 years 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/common/buffer.h ('k') | gpu/command_buffer/service/transfer_buffer_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/common/buffer.cc
diff --git a/gpu/command_buffer/common/buffer.cc b/gpu/command_buffer/common/buffer.cc
index 8b48b4a45655d194d9359de186953b2c8f601d23..13b606c3286734c4ad04723fd5248239b27143f1 100644
--- a/gpu/command_buffer/common/buffer.cc
+++ b/gpu/command_buffer/common/buffer.cc
@@ -13,6 +13,11 @@
#include "base/strings/stringprintf.h"
namespace gpu {
+
+bool BufferBacking::is_shared() const {
+ return false;
+}
+
SharedMemoryBufferBacking::SharedMemoryBufferBacking(
std::unique_ptr<base::SharedMemory> shared_memory,
size_t size)
@@ -20,6 +25,10 @@ SharedMemoryBufferBacking::SharedMemoryBufferBacking(
SharedMemoryBufferBacking::~SharedMemoryBufferBacking() {}
+bool SharedMemoryBufferBacking::is_shared() const {
+ return true;
+}
+
void* SharedMemoryBufferBacking::GetMemory() const {
return shared_memory_->memory();
}
« no previous file with comments | « gpu/command_buffer/common/buffer.h ('k') | gpu/command_buffer/service/transfer_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698