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

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

Issue 534043002: Add bits to indicate which parts of GPUInfo are collected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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_info_collector.cc ('k') | gpu/config/gpu_info_collector_linux.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "gpu/config/gpu_info_collector.h" 5 #include "gpu/config/gpu_info_collector.h"
6 6
7 #include "base/android/build_info.h" 7 #include "base/android/build_info.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 } 83 }
84 84
85 namespace gpu { 85 namespace gpu {
86 86
87 CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info) { 87 CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info) {
88 return CollectBasicGraphicsInfo(gpu_info); 88 return CollectBasicGraphicsInfo(gpu_info);
89 } 89 }
90 90
91 GpuIDResult CollectGpuID(uint32* vendor_id, uint32* device_id) { 91 CollectInfoResult CollectGpuID(uint32* vendor_id, uint32* device_id) {
92 DCHECK(vendor_id && device_id); 92 DCHECK(vendor_id && device_id);
93 *vendor_id = 0; 93 *vendor_id = 0;
94 *device_id = 0; 94 *device_id = 0;
95 return kGpuIDNotSupported; 95 return kCollectInfoNonFatalFailure;
96 } 96 }
97 97
98 CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info) { 98 CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info) {
99 gpu_info->can_lose_context = false; 99 gpu_info->can_lose_context = false;
100 gpu_info->finalized = true;
101 100
102 gpu_info->machine_model_name = 101 gpu_info->machine_model_name =
103 base::android::BuildInfo::GetInstance()->model(); 102 base::android::BuildInfo::GetInstance()->model();
104 103
105 // Create a short-lived context on the UI thread to collect the GL strings. 104 // Create a short-lived context on the UI thread to collect the GL strings.
106 // Make sure we restore the existing context if there is one. 105 // Make sure we restore the existing context if there is one.
107 ScopedRestoreNonOwnedEGLContext restore_context; 106 ScopedRestoreNonOwnedEGLContext restore_context;
108 return CollectGraphicsInfoGL(gpu_info); 107 CollectInfoResult result = CollectGraphicsInfoGL(gpu_info);
108 gpu_info->basic_info_state = result;
109 gpu_info->context_info_state = result;
110 return result;
109 } 111 }
110 112
111 CollectInfoResult CollectDriverInfoGL(GPUInfo* gpu_info) { 113 CollectInfoResult CollectDriverInfoGL(GPUInfo* gpu_info) {
112 gpu_info->driver_version = GetDriverVersionFromString( 114 gpu_info->driver_version = GetDriverVersionFromString(
113 gpu_info->gl_version); 115 gpu_info->gl_version);
114 gpu_info->gpu.vendor_string = gpu_info->gl_vendor; 116 gpu_info->gpu.vendor_string = gpu_info->gl_vendor;
115 gpu_info->gpu.device_string = gpu_info->gl_renderer; 117 gpu_info->gpu.device_string = gpu_info->gl_renderer;
116 return kCollectInfoSuccess; 118 return kCollectInfoSuccess;
117 } 119 }
118 120
119 void MergeGPUInfo(GPUInfo* basic_gpu_info, 121 void MergeGPUInfo(GPUInfo* basic_gpu_info,
120 const GPUInfo& context_gpu_info) { 122 const GPUInfo& context_gpu_info) {
121 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); 123 MergeGPUInfoGL(basic_gpu_info, context_gpu_info);
122 } 124 }
123 125
124 } // namespace gpu 126 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/config/gpu_info_collector.cc ('k') | gpu/config/gpu_info_collector_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698