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

Side by Side Diff: content/browser/gpu/browser_gpu_memory_buffer_manager.cc

Issue 1431333002: Revert of Re-land: ui: Add custom stride support to GLImageMemory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « components/mus/gles2/mojo_gpu_memory_buffer.cc ('k') | content/common/child_process_messages.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/browser/gpu/browser_gpu_memory_buffer_manager.h" 5 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 // Allocate shared memory buffer. 539 // Allocate shared memory buffer.
540 auto insert_result = buffers.insert(std::make_pair( 540 auto insert_result = buffers.insert(std::make_pair(
541 new_id, BufferInfo(request->size, gfx::SHARED_MEMORY_BUFFER, 541 new_id, BufferInfo(request->size, gfx::SHARED_MEMORY_BUFFER,
542 request->format, request->usage, 0))); 542 request->format, request->usage, 0)));
543 DCHECK(insert_result.second); 543 DCHECK(insert_result.second);
544 544
545 gfx::GpuMemoryBufferHandle handle; 545 gfx::GpuMemoryBufferHandle handle;
546 handle.id = new_id; 546 handle.id = new_id;
547 handle.handle = request->handle.handle; 547 handle.handle = request->handle.handle;
548 handle.offset = request->handle.offset; 548 handle.offset = request->handle.offset;
549 handle.stride = request->handle.stride;
550 549
551 // Note: Unretained is safe as IO thread is stopped before manager is 550 // Note: Unretained is safe as IO thread is stopped before manager is
552 // destroyed. 551 // destroyed.
553 request->result = GpuMemoryBufferImplSharedMemory::CreateFromHandle( 552 request->result = GpuMemoryBufferImplSharedMemory::CreateFromHandle(
554 handle, request->size, request->format, request->usage, 553 handle, request->size, request->format, request->usage,
555 base::Bind( 554 base::Bind(
556 &GpuMemoryBufferDeleted, 555 &GpuMemoryBufferDeleted,
557 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), 556 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
558 base::Bind(&BrowserGpuMemoryBufferManager::DestroyGpuMemoryBufferOnIO, 557 base::Bind(&BrowserGpuMemoryBufferManager::DestroyGpuMemoryBufferOnIO,
559 base::Unretained(this), new_id, request->client_id))); 558 base::Unretained(this), new_id, request->client_id)));
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 return gpu_client_tracing_id_; 742 return gpu_client_tracing_id_;
744 } 743 }
745 744
746 // In normal cases, |client_id| is a child process id, so we can perform 745 // In normal cases, |client_id| is a child process id, so we can perform
747 // the standard conversion. 746 // the standard conversion.
748 return ChildProcessHostImpl::ChildProcessUniqueIdToTracingProcessId( 747 return ChildProcessHostImpl::ChildProcessUniqueIdToTracingProcessId(
749 client_id); 748 client_id);
750 } 749 }
751 750
752 } // namespace content 751 } // namespace content
OLDNEW
« no previous file with comments | « components/mus/gles2/mojo_gpu_memory_buffer.cc ('k') | content/common/child_process_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698