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

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

Issue 1251783002: Mac Overlays: Wire up overlays on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@part22
Patch Set: Leave widget type unchanged Created 5 years, 5 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 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/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 {gfx::GpuMemoryBuffer::RGBA_8888, gfx::GpuMemoryBuffer::PERSISTENT_MAP}, 98 {gfx::GpuMemoryBuffer::RGBA_8888, gfx::GpuMemoryBuffer::PERSISTENT_MAP},
99 {gfx::GpuMemoryBuffer::BGRA_8888, gfx::GpuMemoryBuffer::MAP}, 99 {gfx::GpuMemoryBuffer::BGRA_8888, gfx::GpuMemoryBuffer::MAP},
100 {gfx::GpuMemoryBuffer::BGRA_8888, 100 {gfx::GpuMemoryBuffer::BGRA_8888,
101 gfx::GpuMemoryBuffer::PERSISTENT_MAP}}; 101 gfx::GpuMemoryBuffer::PERSISTENT_MAP}};
102 for (auto& configuration : kNativeConfigurations) { 102 for (auto& configuration : kNativeConfigurations) {
103 if (IsGpuMemoryBufferFactoryConfigurationSupported(type, configuration)) 103 if (IsGpuMemoryBufferFactoryConfigurationSupported(type, configuration))
104 configurations.push_back(configuration); 104 configurations.push_back(configuration);
105 } 105 }
106 } 106 }
107 107
108 #if defined(USE_OZONE) 108 #if defined(USE_OZONE) || defined(OS_MACOSX)
109 const GpuMemoryBufferFactory::Configuration kScanoutConfigurations[] = { 109 const GpuMemoryBufferFactory::Configuration kScanoutConfigurations[] = {
110 {gfx::GpuMemoryBuffer::BGRA_8888, gfx::GpuMemoryBuffer::SCANOUT}, 110 {gfx::GpuMemoryBuffer::BGRA_8888, gfx::GpuMemoryBuffer::SCANOUT},
111 {gfx::GpuMemoryBuffer::RGBX_8888, gfx::GpuMemoryBuffer::SCANOUT}}; 111 {gfx::GpuMemoryBuffer::RGBX_8888, gfx::GpuMemoryBuffer::SCANOUT}};
112 for (auto& configuration : kScanoutConfigurations) { 112 for (auto& configuration : kScanoutConfigurations) {
113 if (IsGpuMemoryBufferFactoryConfigurationSupported(type, configuration)) 113 if (IsGpuMemoryBufferFactoryConfigurationSupported(type, configuration))
114 configurations.push_back(configuration); 114 configurations.push_back(configuration);
115 } 115 }
116 #endif 116 #endif
117 117
118 return configurations; 118 return configurations;
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 } 560 }
561 561
562 GpuProcessHost* host = GpuProcessHost::FromID(buffer_it->second.gpu_host_id); 562 GpuProcessHost* host = GpuProcessHost::FromID(buffer_it->second.gpu_host_id);
563 if (host) 563 if (host)
564 host->DestroyGpuMemoryBuffer(id, client_id, sync_point); 564 host->DestroyGpuMemoryBuffer(id, client_id, sync_point);
565 565
566 buffers.erase(buffer_it); 566 buffers.erase(buffer_it);
567 } 567 }
568 568
569 } // namespace content 569 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698