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

Side by Side Diff: gpu/ipc/client/gpu_memory_buffer_impl.cc

Issue 2042553002: Mac CoreAnimation compositor in the browser process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lock_directly
Patch Set: Created 4 years, 6 months 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 2013 The Chromium Authors. All rights reserved. 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 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 "gpu/ipc/client/gpu_memory_buffer_impl.h" 5 #include "gpu/ipc/client/gpu_memory_buffer_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h" 9 #include "gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h"
10 10
(...skipping 19 matching lines...) Expand all
30 size_(size), 30 size_(size),
31 format_(format), 31 format_(format),
32 callback_(callback), 32 callback_(callback),
33 mapped_(false) {} 33 mapped_(false) {}
34 34
35 GpuMemoryBufferImpl::~GpuMemoryBufferImpl() { 35 GpuMemoryBufferImpl::~GpuMemoryBufferImpl() {
36 DCHECK(!mapped_); 36 DCHECK(!mapped_);
37 callback_.Run(destruction_sync_token_); 37 callback_.Run(destruction_sync_token_);
38 } 38 }
39 39
40 void* GpuMemoryBufferImpl::GetIOSurface() {
41 return nullptr;
42 }
43
40 // static 44 // static
41 std::unique_ptr<GpuMemoryBufferImpl> GpuMemoryBufferImpl::CreateFromHandle( 45 std::unique_ptr<GpuMemoryBufferImpl> GpuMemoryBufferImpl::CreateFromHandle(
42 const gfx::GpuMemoryBufferHandle& handle, 46 const gfx::GpuMemoryBufferHandle& handle,
43 const gfx::Size& size, 47 const gfx::Size& size,
44 gfx::BufferFormat format, 48 gfx::BufferFormat format,
45 gfx::BufferUsage usage, 49 gfx::BufferUsage usage,
46 const DestructionCallback& callback) { 50 const DestructionCallback& callback) {
47 switch (handle.type) { 51 switch (handle.type) {
48 case gfx::SHARED_MEMORY_BUFFER: 52 case gfx::SHARED_MEMORY_BUFFER:
49 return GpuMemoryBufferImplSharedMemory::CreateFromHandle( 53 return GpuMemoryBufferImplSharedMemory::CreateFromHandle(
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 89
86 gfx::GpuMemoryBufferId GpuMemoryBufferImpl::GetId() const { 90 gfx::GpuMemoryBufferId GpuMemoryBufferImpl::GetId() const {
87 return id_; 91 return id_;
88 } 92 }
89 93
90 ClientBuffer GpuMemoryBufferImpl::AsClientBuffer() { 94 ClientBuffer GpuMemoryBufferImpl::AsClientBuffer() {
91 return reinterpret_cast<ClientBuffer>(this); 95 return reinterpret_cast<ClientBuffer>(this);
92 } 96 }
93 97
94 } // namespace gpu 98 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/client/gpu_memory_buffer_impl.h ('k') | gpu/ipc/client/gpu_memory_buffer_impl_io_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698