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

Side by Side Diff: content/child/child_thread_impl_browsertest.cc

Issue 1165823003: Re-land: content: Enable native GpuMemoryBuffers by default on MacOSX. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make sure native buffers are disabled when using mesa 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 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/memory/discardable_memory.h" 7 #include "base/memory/discardable_memory.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/child/child_discardable_shared_memory_manager.h" 10 #include "content/child/child_discardable_shared_memory_manager.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 public: 133 public:
134 // Overridden from BrowserTestBase: 134 // Overridden from BrowserTestBase:
135 void SetUpCommandLine(base::CommandLine* command_line) override { 135 void SetUpCommandLine(base::CommandLine* command_line) override {
136 ChildThreadImplBrowserTest::SetUpCommandLine(command_line); 136 ChildThreadImplBrowserTest::SetUpCommandLine(command_line);
137 NativeBufferFlag native_buffer_flag = ::testing::get<0>(GetParam()); 137 NativeBufferFlag native_buffer_flag = ::testing::get<0>(GetParam());
138 switch (native_buffer_flag) { 138 switch (native_buffer_flag) {
139 case kEnableNativeBuffers: 139 case kEnableNativeBuffers:
140 command_line->AppendSwitch(switches::kEnableNativeGpuMemoryBuffers); 140 command_line->AppendSwitch(switches::kEnableNativeGpuMemoryBuffers);
141 break; 141 break;
142 case kDisableNativeBuffers: 142 case kDisableNativeBuffers:
143 command_line->AppendSwitch(switches::kDisableNativeGpuMemoryBuffers);
143 break; 144 break;
144 } 145 }
145 } 146 }
146 }; 147 };
147 148
148 IN_PROC_BROWSER_TEST_P(ChildThreadImplGpuMemoryBufferBrowserTest, 149 IN_PROC_BROWSER_TEST_P(ChildThreadImplGpuMemoryBufferBrowserTest,
149 DISABLED_Map) { 150 DISABLED_Map) {
150 gfx::GpuMemoryBuffer::Format format = ::testing::get<1>(GetParam()); 151 gfx::GpuMemoryBuffer::Format format = ::testing::get<1>(GetParam());
151 gfx::Size buffer_size(4, 4); 152 gfx::Size buffer_size(4, 4);
152 153
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 kEnableNativeBuffers), 201 kEnableNativeBuffers),
201 // These formats are guaranteed to work on all platforms. 202 // These formats are guaranteed to work on all platforms.
202 ::testing::Values(gfx::GpuMemoryBuffer::R_8, 203 ::testing::Values(gfx::GpuMemoryBuffer::R_8,
203 gfx::GpuMemoryBuffer::RGBA_4444, 204 gfx::GpuMemoryBuffer::RGBA_4444,
204 gfx::GpuMemoryBuffer::RGBA_8888, 205 gfx::GpuMemoryBuffer::RGBA_8888,
205 gfx::GpuMemoryBuffer::BGRA_8888, 206 gfx::GpuMemoryBuffer::BGRA_8888,
206 gfx::GpuMemoryBuffer::YUV_420))); 207 gfx::GpuMemoryBuffer::YUV_420)));
207 208
208 } // namespace 209 } // namespace
209 } // namespace content 210 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/browser_gpu_memory_buffer_manager.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698