| OLD | NEW |
| 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 "mojo/services/gles2/mojo_buffer_backing.h" | 5 #include "services/gles2/mojo_buffer_backing.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace mojo { | 9 namespace mojo { |
| 10 namespace gles2 { | 10 namespace gles2 { |
| 11 | 11 |
| 12 MojoBufferBacking::MojoBufferBacking(mojo::ScopedSharedBufferHandle handle, | 12 MojoBufferBacking::MojoBufferBacking(mojo::ScopedSharedBufferHandle handle, |
| 13 void* memory, | 13 void* memory, |
| 14 size_t size) | 14 size_t size) |
| 15 : handle_(handle.Pass()), memory_(memory), size_(size) {} | 15 : handle_(handle.Pass()), memory_(memory), size_(size) {} |
| (...skipping 11 matching lines...) Expand all Loading... |
| 27 return scoped_ptr<BufferBacking>(); | 27 return scoped_ptr<BufferBacking>(); |
| 28 DCHECK(memory); | 28 DCHECK(memory); |
| 29 return scoped_ptr<BufferBacking>( | 29 return scoped_ptr<BufferBacking>( |
| 30 new MojoBufferBacking(handle.Pass(), memory, size)); | 30 new MojoBufferBacking(handle.Pass(), memory, size)); |
| 31 } | 31 } |
| 32 void* MojoBufferBacking::GetMemory() const { return memory_; } | 32 void* MojoBufferBacking::GetMemory() const { return memory_; } |
| 33 size_t MojoBufferBacking::GetSize() const { return size_; } | 33 size_t MojoBufferBacking::GetSize() const { return size_; } |
| 34 | 34 |
| 35 } // namespace gles2 | 35 } // namespace gles2 |
| 36 } // namespace mojo | 36 } // namespace mojo |
| OLD | NEW |