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

Side by Side Diff: services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.cc

Issue 2691393002: Fix auto raw pointer deduction on linux (Closed)
Patch Set: rebase Created 3 years, 9 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
« no previous file with comments | « sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc ('k') | services/ui/ws/server_window.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.h" 5 #include "services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 void ClientGpuMemoryBufferManager::TearDownThread() { 60 void ClientGpuMemoryBufferManager::TearDownThread() {
61 weak_ptr_factory_.InvalidateWeakPtrs(); 61 weak_ptr_factory_.InvalidateWeakPtrs();
62 DisconnectGpuOnThread(); 62 DisconnectGpuOnThread();
63 } 63 }
64 64
65 void ClientGpuMemoryBufferManager::DisconnectGpuOnThread() { 65 void ClientGpuMemoryBufferManager::DisconnectGpuOnThread() {
66 if (!gpu_.is_bound()) 66 if (!gpu_.is_bound())
67 return; 67 return;
68 gpu_.reset(); 68 gpu_.reset();
69 for (auto& waiter : pending_allocation_waiters_) 69 for (auto* waiter : pending_allocation_waiters_)
70 waiter->Signal(); 70 waiter->Signal();
71 pending_allocation_waiters_.clear(); 71 pending_allocation_waiters_.clear();
72 } 72 }
73 73
74 void ClientGpuMemoryBufferManager::AllocateGpuMemoryBufferOnThread( 74 void ClientGpuMemoryBufferManager::AllocateGpuMemoryBufferOnThread(
75 const gfx::Size& size, 75 const gfx::Size& size,
76 gfx::BufferFormat format, 76 gfx::BufferFormat format,
77 gfx::BufferUsage usage, 77 gfx::BufferUsage usage,
78 gfx::GpuMemoryBufferHandle* handle, 78 gfx::GpuMemoryBufferHandle* handle,
79 base::WaitableEvent* wait) { 79 base::WaitableEvent* wait) {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } 162 }
163 163
164 void ClientGpuMemoryBufferManager::SetDestructionSyncToken( 164 void ClientGpuMemoryBufferManager::SetDestructionSyncToken(
165 gfx::GpuMemoryBuffer* buffer, 165 gfx::GpuMemoryBuffer* buffer,
166 const gpu::SyncToken& sync_token) { 166 const gpu::SyncToken& sync_token) {
167 static_cast<gpu::GpuMemoryBufferImpl*>(buffer)->set_destruction_sync_token( 167 static_cast<gpu::GpuMemoryBufferImpl*>(buffer)->set_destruction_sync_token(
168 sync_token); 168 sync_token);
169 } 169 }
170 170
171 } // namespace ui 171 } // namespace ui
OLDNEW
« no previous file with comments | « sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc ('k') | services/ui/ws/server_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698