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

Side by Side 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, 8 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/common/buffer.h" 5 #include "gpu/command_buffer/common/buffer.h"
6 6
7 #include "base/logging.h"
8
7 namespace gpu { 9 namespace gpu {
8 10
9 Buffer::Buffer(scoped_ptr<base::SharedMemory> shared_memory, size_t size) 11 Buffer::Buffer(scoped_ptr<base::SharedMemory> shared_memory, size_t size)
10 : shared_memory_(shared_memory.Pass()), 12 : shared_memory_(shared_memory.Pass()),
11 memory_(shared_memory_->memory()), 13 memory_(shared_memory_->memory()),
12 size_(size) {} 14 size_(size) {
15 DCHECK(memory_) << "The memory must be mapped to create a Buffer";
16 }
13 17
14 Buffer::~Buffer() {} 18 Buffer::~Buffer() {}
15 19
16 } // namespace gpu 20 } // namespace gpu
OLDNEW
« 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