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

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

Issue 211703003: GPU: 'Pass' SharedMemory when possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@GPU_ref_count_buffer
Patch Set: Rebase. Created 6 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 | « gpu/command_buffer/common/buffer.h ('k') | gpu/command_buffer/service/command_buffer_service.h » ('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 f0ddbd0c873e732ebb6a55059d80d929e69bd2ea..5ba4e51ec01d0d3b88ea07967a5fe6d86ef48210 100644
--- a/gpu/command_buffer/common/buffer.cc
+++ b/gpu/command_buffer/common/buffer.cc
@@ -4,12 +4,16 @@
#include "gpu/command_buffer/common/buffer.h"
+#include "base/logging.h"
+
namespace gpu {
Buffer::Buffer(scoped_ptr<base::SharedMemory> shared_memory, size_t size)
: shared_memory_(shared_memory.Pass()),
memory_(shared_memory_->memory()),
- size_(size) {}
+ size_(size) {
+ DCHECK(memory_) << "The memory must be mapped to create a Buffer";
+}
Buffer::~Buffer() {}
« no previous file with comments | « gpu/command_buffer/common/buffer.h ('k') | gpu/command_buffer/service/command_buffer_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698