| Index: components/mus/gles2/mojo_gpu_memory_buffer.cc
|
| diff --git a/components/view_manager/gles2/mojo_gpu_memory_buffer.cc b/components/mus/gles2/mojo_gpu_memory_buffer.cc
|
| similarity index 90%
|
| rename from components/view_manager/gles2/mojo_gpu_memory_buffer.cc
|
| rename to components/mus/gles2/mojo_gpu_memory_buffer.cc
|
| index 300b1c4663021bbe4bd92a3b656389e622d3ddb0..c5aaef12edb8d3510961a045aad2c5ffdc8a0229 100644
|
| --- a/components/view_manager/gles2/mojo_gpu_memory_buffer.cc
|
| +++ b/components/mus/gles2/mojo_gpu_memory_buffer.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "components/view_manager/gles2/mojo_gpu_memory_buffer.h"
|
| +#include "components/mus/gles2/mojo_gpu_memory_buffer.h"
|
|
|
| #include "base/logging.h"
|
| #include "base/memory/shared_memory.h"
|
| @@ -20,8 +20,7 @@ MojoGpuMemoryBufferImpl::MojoGpuMemoryBufferImpl(
|
| shared_memory_(shared_memory.Pass()),
|
| mapped_(false) {}
|
|
|
| -MojoGpuMemoryBufferImpl::~MojoGpuMemoryBufferImpl() {
|
| -}
|
| +MojoGpuMemoryBufferImpl::~MojoGpuMemoryBufferImpl() {}
|
|
|
| scoped_ptr<gfx::GpuMemoryBuffer> MojoGpuMemoryBufferImpl::Create(
|
| const gfx::Size& size,
|
| @@ -50,8 +49,8 @@ bool MojoGpuMemoryBufferImpl::Map(void** data) {
|
| return false;
|
| mapped_ = true;
|
| size_t offset = 0;
|
| - int num_planes = static_cast<int>(
|
| - gfx::NumberOfPlanesForBufferFormat(format_));
|
| + int num_planes =
|
| + static_cast<int>(gfx::NumberOfPlanesForBufferFormat(format_));
|
| for (int i = 0; i < num_planes; ++i) {
|
| data[i] = reinterpret_cast<uint8*>(shared_memory_->memory()) + offset;
|
| offset +=
|
| @@ -76,8 +75,8 @@ gfx::BufferFormat MojoGpuMemoryBufferImpl::GetFormat() const {
|
| }
|
|
|
| void MojoGpuMemoryBufferImpl::GetStride(int* stride) const {
|
| - int num_planes = static_cast<int>(
|
| - gfx::NumberOfPlanesForBufferFormat(format_));
|
| + int num_planes =
|
| + static_cast<int>(gfx::NumberOfPlanesForBufferFormat(format_));
|
| for (int i = 0; i < num_planes; ++i)
|
| stride[i] = base::checked_cast<int>(
|
| gfx::RowSizeForBufferFormat(size_.width(), format_, i));
|
|
|