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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/config/gpu_driver_bug_list_unittest.cc
diff --git a/gpu/config/gpu_driver_bug_list_unittest.cc b/gpu/config/gpu_driver_bug_list_unittest.cc
index 1e4090b6084b0f7152218c4be87dc9bd6e8167ac..6d93674b3d7bf01bf34be730eacb63eb39e3c2d0 100644
--- a/gpu/config/gpu_driver_bug_list_unittest.cc
+++ b/gpu/config/gpu_driver_bug_list_unittest.cc
@@ -204,5 +204,34 @@ TEST_F(GpuDriverBugListTest, NVIDIANumberingScheme) {
EXPECT_EQ(0u, bugs.count(DISABLE_D3D11));
}
-} // namespace gpu
+// Test that having two discrete graphics cards on Mac will not try to switch
+// between them.
+TEST_F(GpuDriverBugListTest, DualDiscreteGPUMac) {
+ scoped_ptr<GpuDriverBugList> list(GpuDriverBugList::Create());
+ std::string json;
+ EXPECT_TRUE(list->LoadList(kGpuDriverBugListJson, GpuControlList::kAllOs));
+ // Just a single (AMD) card - nothing should be forced.
+ GPUInfo gpu_info;
+ gpu_info.gpu.vendor_id = 0x1002;
+ std::set<int> bugs =
+ list->MakeDecision(GpuControlList::kOsMacosx, "10.9", gpu_info);
+ EXPECT_EQ(0u, bugs.count(FORCE_DISCRETE_GPU));
+
+ // Add an integrated (intel) card. This will always be secondary.
+ gpu_info.secondary_gpus.resize(1);
+ gpu_info.secondary_gpus.back().vendor_id = 0x8086;
+ bugs = list->MakeDecision(GpuControlList::kOsMacosx, "10.9", gpu_info);
+ EXPECT_EQ(0u, bugs.count(FORCE_DISCRETE_GPU));
+
+ // Add a secondary discrete GPU. Should force discrete.
+ gpu_info.secondary_gpus.back().vendor_id = 0x1002;
+ bugs = list->MakeDecision(GpuControlList::kOsMacosx, "10.9", gpu_info);
+ EXPECT_EQ(1u, bugs.count(FORCE_DISCRETE_GPU));
+
+ // No effect on other platforms.
+ bugs = list->MakeDecision(GpuControlList::kOsWin, "7.0", gpu_info);
+ EXPECT_EQ(0u, bugs.count(FORCE_DISCRETE_GPU));
+}
+
+} // namespace gpu
« 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