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

Side by Side Diff: content/common/child_process_host_impl.cc

Issue 1151943003: Revert of Add PERSISTENT_MAP usage for GpuMemoryBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/common/child_process_host_impl.h" 5 #include "content/common/child_process_host_impl.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 uint32 height, 316 uint32 height,
317 gfx::GpuMemoryBuffer::Format format, 317 gfx::GpuMemoryBuffer::Format format,
318 gfx::GpuMemoryBuffer::Usage usage, 318 gfx::GpuMemoryBuffer::Usage usage,
319 gfx::GpuMemoryBufferHandle* handle) { 319 gfx::GpuMemoryBufferHandle* handle) {
320 // TODO(reveman): Add support for other types of GpuMemoryBuffers. 320 // TODO(reveman): Add support for other types of GpuMemoryBuffers.
321 321
322 // AllocateForChildProcess() will check if |width| and |height| are valid 322 // AllocateForChildProcess() will check if |width| and |height| are valid
323 // and handle failure in a controlled way when not. We just need to make 323 // and handle failure in a controlled way when not. We just need to make
324 // sure |format| and |usage| are supported here. 324 // sure |format| and |usage| are supported here.
325 if (GpuMemoryBufferImplSharedMemory::IsFormatSupported(format) && 325 if (GpuMemoryBufferImplSharedMemory::IsFormatSupported(format) &&
326 GpuMemoryBufferImplSharedMemory::IsUsageSupported(usage)) { 326 usage == gfx::GpuMemoryBuffer::MAP) {
327 *handle = GpuMemoryBufferImplSharedMemory::AllocateForChildProcess( 327 *handle = GpuMemoryBufferImplSharedMemory::AllocateForChildProcess(
328 g_next_gpu_memory_buffer_id.GetNext(), gfx::Size(width, height), format, 328 g_next_gpu_memory_buffer_id.GetNext(),
329 gfx::Size(width, height),
330 format,
329 peer_process_.Handle()); 331 peer_process_.Handle());
330 } 332 }
331 } 333 }
332 334
333 void ChildProcessHostImpl::OnDeletedGpuMemoryBuffer( 335 void ChildProcessHostImpl::OnDeletedGpuMemoryBuffer(
334 gfx::GpuMemoryBufferId id, 336 gfx::GpuMemoryBufferId id,
335 uint32 sync_point) { 337 uint32 sync_point) {
336 // Note: Nothing to do here as ownership of shared memory backed 338 // Note: Nothing to do here as ownership of shared memory backed
337 // GpuMemoryBuffers is passed with IPC. 339 // GpuMemoryBuffers is passed with IPC.
338 } 340 }
339 341
340 } // namespace content 342 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698