OLD | NEW |
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 "content/browser/gpu/gpu_driver_bug_list.h" | 5 #include "gpu/config/gpu_driver_bug_list.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "gpu/command_buffer/service/gpu_driver_bug_workaround_type.h" | 9 #include "gpu/config/gpu_driver_bug_workaround_type.h" |
10 | 10 |
11 namespace content { | 11 namespace gpu { |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 struct DriverBugInfo { | 15 struct DriverBugInfo { |
16 int feature_type; | 16 int feature_type; |
17 std::string feature_name; | 17 std::string feature_name; |
18 }; | 18 }; |
19 | 19 |
20 } // namespace anonymous | 20 } // namespace anonymous |
21 | 21 |
22 GpuDriverBugList::GpuDriverBugList() | 22 GpuDriverBugList::GpuDriverBugList() |
23 : GpuControlList() { | 23 : GpuControlList() { |
24 } | 24 } |
25 | 25 |
26 GpuDriverBugList::~GpuDriverBugList() { | 26 GpuDriverBugList::~GpuDriverBugList() { |
27 } | 27 } |
28 | 28 |
29 // static | 29 // static |
30 GpuDriverBugList* GpuDriverBugList::Create() { | 30 GpuDriverBugList* GpuDriverBugList::Create() { |
31 GpuDriverBugList* list = new GpuDriverBugList(); | 31 GpuDriverBugList* list = new GpuDriverBugList(); |
32 | 32 |
33 const DriverBugInfo kFeatureList[] = { | 33 const DriverBugInfo kFeatureList[] = { |
34 #define GPU_OP(type, name) { gpu::type, #name }, | 34 #define GPU_OP(type, name) { type, #name }, |
35 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) | 35 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) |
36 #undef GPU_OP | 36 #undef GPU_OP |
37 }; | 37 }; |
38 DCHECK_EQ(static_cast<int>(arraysize(kFeatureList)), | 38 DCHECK_EQ(static_cast<int>(arraysize(kFeatureList)), |
39 gpu::NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES); | 39 NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES); |
40 for (int i = 0; i < gpu::NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES; ++i) { | 40 for (int i = 0; i < NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES; ++i) { |
41 list->AddSupportedFeature(kFeatureList[i].feature_name, | 41 list->AddSupportedFeature(kFeatureList[i].feature_name, |
42 kFeatureList[i].feature_type); | 42 kFeatureList[i].feature_type); |
43 } | 43 } |
44 return list; | 44 return list; |
45 } | 45 } |
46 | 46 |
47 } // namespace content | 47 } // namespace gpu |
48 | 48 |
OLD | NEW |