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

Unified Diff: content/browser/gpu/browser_gpu_memory_buffer_manager.cc

Issue 1139903005: Add PERSISTENT_MAP usage for GpuMemoryBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: persistentmap: rebase 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/gpu/browser_gpu_memory_buffer_manager.cc
diff --git a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
index 70184a0f48aeb2218554e36f37314ed2ba6854ac..2db48f15e027e76a46d8921c8512252461bd9623 100644
--- a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
+++ b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
@@ -99,8 +99,9 @@ BrowserGpuMemoryBufferManager::AllocateGpuMemoryBufferCommon(
// by factory.
if (!gpu_memory_buffer_factory_host_->IsGpuMemoryBufferConfigurationSupported(
format, usage)) {
- DCHECK(GpuMemoryBufferImplSharedMemory::IsFormatSupported(format));
- DCHECK_EQ(usage, gfx::GpuMemoryBuffer::MAP);
+ DCHECK(GpuMemoryBufferImplSharedMemory::IsFormatSupported(format))
+ << format;
+ DCHECK(GpuMemoryBufferImplSharedMemory::IsUsageSupported(usage)) << usage;
return GpuMemoryBufferImplSharedMemory::Create(
g_next_gpu_memory_buffer_id.GetNext(), size, format);
}
@@ -142,8 +143,8 @@ void BrowserGpuMemoryBufferManager::AllocateGpuMemoryBufferForChildProcess(
format, usage)) {
// Early out if we cannot fallback to shared memory buffer.
if (!GpuMemoryBufferImplSharedMemory::IsFormatSupported(format) ||
- !GpuMemoryBufferImplSharedMemory::IsSizeValidForFormat(size, format) ||
- usage != gfx::GpuMemoryBuffer::MAP) {
+ !GpuMemoryBufferImplSharedMemory::IsUsageSupported(usage) ||
+ !GpuMemoryBufferImplSharedMemory::IsSizeValidForFormat(size, format)) {
callback.Run(gfx::GpuMemoryBufferHandle());
return;
}
« no previous file with comments | « content/browser/gpu/browser_gpu_channel_host_factory.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698