| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "components/mus/gles2/gpu_memory_buffer_impl.h" |
| 6 |
| 7 namespace mus { |
| 8 |
| 9 GpuMemoryBufferImpl::GpuMemoryBufferImpl(gfx::GpuMemoryBufferId id, |
| 10 const gfx::Size& size, |
| 11 gfx::BufferFormat format) |
| 12 : id_(id), size_(size), format_(format), mapped_(false) {} |
| 13 |
| 14 GpuMemoryBufferImpl::~GpuMemoryBufferImpl() { |
| 15 DCHECK(!mapped_); |
| 16 } |
| 17 |
| 18 // static |
| 19 GpuMemoryBufferImpl* GpuMemoryBufferImpl::FromClientBuffer( |
| 20 ClientBuffer buffer) { |
| 21 return reinterpret_cast<GpuMemoryBufferImpl*>(buffer); |
| 22 } |
| 23 |
| 24 gfx::Size GpuMemoryBufferImpl::GetSize() const { |
| 25 return size_; |
| 26 } |
| 27 |
| 28 gfx::BufferFormat GpuMemoryBufferImpl::GetFormat() const { |
| 29 return format_; |
| 30 } |
| 31 |
| 32 gfx::GpuMemoryBufferId GpuMemoryBufferImpl::GetId() const { |
| 33 return id_; |
| 34 } |
| 35 |
| 36 ClientBuffer GpuMemoryBufferImpl::AsClientBuffer() { |
| 37 return reinterpret_cast<ClientBuffer>(this); |
| 38 } |
| 39 |
| 40 #if defined(USE_OZONE) |
| 41 scoped_refptr<ui::NativePixmap> GpuMemoryBufferImpl::GetNativePixmap() { |
| 42 return scoped_refptr<ui::NativePixmap>(); |
| 43 } |
| 44 #endif |
| 45 |
| 46 } // namespace mus |
| OLD | NEW |