| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/exo/shared_memory.h" | 5 #include "components/exo/shared_memory.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include "base/logging.h" | 9 #include "base/logging.h" |
| 8 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| 9 #include "components/exo/buffer.h" | 11 #include "components/exo/buffer.h" |
| 10 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" | 12 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" |
| 11 #include "third_party/khronos/GLES2/gl2.h" | 13 #include "third_party/khronos/GLES2/gl2.h" |
| 12 #include "ui/aura/env.h" | 14 #include "ui/aura/env.h" |
| 13 #include "ui/compositor/compositor.h" | 15 #include "ui/compositor/compositor.h" |
| 14 #include "ui/gfx/buffer_format_util.h" | 16 #include "ui/gfx/buffer_format_util.h" |
| 15 #include "ui/gfx/geometry/size.h" | 17 #include "ui/gfx/geometry/size.h" |
| 16 #include "ui/gfx/gpu_memory_buffer.h" | 18 #include "ui/gfx/gpu_memory_buffer.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 ->CreateGpuMemoryBufferFromHandle(handle, size, format); | 72 ->CreateGpuMemoryBufferFromHandle(handle, size, format); |
| 71 if (!gpu_memory_buffer) { | 73 if (!gpu_memory_buffer) { |
| 72 LOG(ERROR) << "Failed to create GpuMemoryBuffer from handle"; | 74 LOG(ERROR) << "Failed to create GpuMemoryBuffer from handle"; |
| 73 return nullptr; | 75 return nullptr; |
| 74 } | 76 } |
| 75 | 77 |
| 76 return make_scoped_ptr(new Buffer(gpu_memory_buffer.Pass(), GL_TEXTURE_2D)); | 78 return make_scoped_ptr(new Buffer(gpu_memory_buffer.Pass(), GL_TEXTURE_2D)); |
| 77 } | 79 } |
| 78 | 80 |
| 79 } // namespace exo | 81 } // namespace exo |
| OLD | NEW |