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

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

Issue 1719113002: Fix GPU acceleration on Intel GMA* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix logic Created 4 years, 10 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_control_list.cc ('k') | no next file » | 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "gpu/config/gpu_control_list.h" 10 #include "gpu/config/gpu_control_list.h"
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 std::set<int> features = control_list->MakeDecision( 657 std::set<int> features = control_list->MakeDecision(
658 GpuControlList::kOsWin, kOsVersion, gpu_info); 658 GpuControlList::kOsWin, kOsVersion, gpu_info);
659 EXPECT_SINGLE_FEATURE(features, TEST_FEATURE_0); 659 EXPECT_SINGLE_FEATURE(features, TEST_FEATURE_0);
660 660
661 gpu_info.in_process_gpu = false; 661 gpu_info.in_process_gpu = false;
662 features = control_list->MakeDecision( 662 features = control_list->MakeDecision(
663 GpuControlList::kOsWin, kOsVersion, gpu_info); 663 GpuControlList::kOsWin, kOsVersion, gpu_info);
664 EXPECT_EMPTY_SET(features); 664 EXPECT_EMPTY_SET(features);
665 } 665 }
666 666
667 TEST_F(GpuControlListTest, SameGPUTwiceTest) {
668 const std::string json = LONG_STRING_CONST(
669 {
670 "name": "gpu control list",
671 "version": "0.1",
672 "entries": [
673 {
674 "id": 1,
675 "os": {
676 "type": "win"
677 },
678 "vendor_id": "0x8086",
679 "features": [
680 "test_feature_0"
681 ]
682 }
683 ]
684 }
685 );
686 GPUInfo gpu_info;
687 gpu_info.gpu.vendor_id = kIntelVendorId;
688 // Real case on Intel GMA* on Windows
689 gpu_info.secondary_gpus.push_back(gpu_info.gpu);
690
691 scoped_ptr<GpuControlList> control_list(Create());
692 EXPECT_TRUE(control_list->LoadList(json, GpuControlList::kAllOs));
693 std::set<int> features = control_list->MakeDecision(
694 GpuControlList::kOsWin, kOsVersion, gpu_info);
695 EXPECT_SINGLE_FEATURE(features, TEST_FEATURE_0);
696 EXPECT_FALSE(control_list->needs_more_info());
697 }
698
667 } // namespace gpu 699 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/config/gpu_control_list.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698