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

Side by Side Diff: components/mus/gles2/mojo_gpu_memory_buffer.cc

Issue 1417363006: ui: Add support for creating GLImage instances from shared memory pools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@usage-rename
Patch Set: static_cast<off_t> to make windows build happy Created 5 years, 1 month 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
OLDNEW
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/mus/gles2/mojo_gpu_memory_buffer.h" 5 #include "components/mus/gles2/mojo_gpu_memory_buffer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "base/numerics/safe_conversions.h" 9 #include "base/numerics/safe_conversions.h"
10 #include "ui/gfx/buffer_format_util.h" 10 #include "ui/gfx/buffer_format_util.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 79 }
80 80
81 gfx::GpuMemoryBufferId MojoGpuMemoryBufferImpl::GetId() const { 81 gfx::GpuMemoryBufferId MojoGpuMemoryBufferImpl::GetId() const {
82 return gfx::GpuMemoryBufferId(0); 82 return gfx::GpuMemoryBufferId(0);
83 } 83 }
84 84
85 gfx::GpuMemoryBufferHandle MojoGpuMemoryBufferImpl::GetHandle() const { 85 gfx::GpuMemoryBufferHandle MojoGpuMemoryBufferImpl::GetHandle() const {
86 gfx::GpuMemoryBufferHandle handle; 86 gfx::GpuMemoryBufferHandle handle;
87 handle.type = gfx::SHARED_MEMORY_BUFFER; 87 handle.type = gfx::SHARED_MEMORY_BUFFER;
88 handle.handle = shared_memory_->handle(); 88 handle.handle = shared_memory_->handle();
89 handle.offset = 0;
89 return handle; 90 return handle;
90 } 91 }
91 92
92 ClientBuffer MojoGpuMemoryBufferImpl::AsClientBuffer() { 93 ClientBuffer MojoGpuMemoryBufferImpl::AsClientBuffer() {
93 return reinterpret_cast<ClientBuffer>(this); 94 return reinterpret_cast<ClientBuffer>(this);
94 } 95 }
95 96
96 } // namespace mus 97 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/gles2/command_buffer_local.cc ('k') | content/browser/renderer_host/media/video_capture_buffer_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698