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

Side by Side Diff: gpu/config/gpu_driver_bug_list_unittest.cc

Issue 1147653002: Fix for 300ms scroll lag on 2013 Mac Pros once idle for 10seconds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove tracing 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
« no previous file with comments | « gpu/config/gpu_driver_bug_list_json.cc ('k') | ui/gl/gl_context_cgl.cc » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "gpu/config/gpu_control_list_jsons.h" 8 #include "gpu/config/gpu_control_list_jsons.h"
9 #include "gpu/config/gpu_driver_bug_list.h" 9 #include "gpu/config/gpu_driver_bug_list.h"
10 #include "gpu/config/gpu_driver_bug_workaround_type.h" 10 #include "gpu/config/gpu_driver_bug_workaround_type.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 bugs = list->MakeDecision(GpuControlList::kOsWin, "7.0", gpu_info); 198 bugs = list->MakeDecision(GpuControlList::kOsWin, "7.0", gpu_info);
199 EXPECT_EQ(1u, bugs.count(DISABLE_D3D11)); 199 EXPECT_EQ(1u, bugs.count(DISABLE_D3D11));
200 200
201 // test a higher driver version number 201 // test a higher driver version number
202 gpu_info.driver_version = "9.18.13.2723"; 202 gpu_info.driver_version = "9.18.13.2723";
203 bugs = list->MakeDecision(GpuControlList::kOsWin, "7.0", gpu_info); 203 bugs = list->MakeDecision(GpuControlList::kOsWin, "7.0", gpu_info);
204 EXPECT_EQ(0u, bugs.count(DISABLE_D3D11)); 204 EXPECT_EQ(0u, bugs.count(DISABLE_D3D11));
205 } 205 }
206 206
207 // Test that having two discrete graphics cards on Mac will not try to switch
208 // between them.
209 TEST_F(GpuDriverBugListTest, DualDiscreteGPUMac) {
210 scoped_ptr<GpuDriverBugList> list(GpuDriverBugList::Create());
211 std::string json;
212 EXPECT_TRUE(list->LoadList(kGpuDriverBugListJson, GpuControlList::kAllOs));
213
214 // Just a single (AMD) card - nothing should be forced.
215 GPUInfo gpu_info;
216 gpu_info.gpu.vendor_id = 0x1002;
217 std::set<int> bugs =
218 list->MakeDecision(GpuControlList::kOsMacosx, "10.9", gpu_info);
219 EXPECT_EQ(0u, bugs.count(FORCE_DISCRETE_GPU));
220
221 // Add an integrated (intel) card. This will always be secondary.
222 gpu_info.secondary_gpus.resize(1);
223 gpu_info.secondary_gpus.back().vendor_id = 0x8086;
224 bugs = list->MakeDecision(GpuControlList::kOsMacosx, "10.9", gpu_info);
225 EXPECT_EQ(0u, bugs.count(FORCE_DISCRETE_GPU));
226
227 // Add a secondary discrete GPU. Should force discrete.
228 gpu_info.secondary_gpus.back().vendor_id = 0x1002;
229 bugs = list->MakeDecision(GpuControlList::kOsMacosx, "10.9", gpu_info);
230 EXPECT_EQ(1u, bugs.count(FORCE_DISCRETE_GPU));
231
232 // No effect on other platforms.
233 bugs = list->MakeDecision(GpuControlList::kOsWin, "7.0", gpu_info);
234 EXPECT_EQ(0u, bugs.count(FORCE_DISCRETE_GPU));
235 }
236
207 } // namespace gpu 237 } // namespace gpu
208
OLDNEW
« no previous file with comments | « gpu/config/gpu_driver_bug_list_json.cc ('k') | ui/gl/gl_context_cgl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698