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

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

Issue 11574049: Only collect GL/D3D context specific GPUInfo in GPU process (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years 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 | Annotate | Revision Log
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 "content/gpu/gpu_info_collector.h" 5 #include "content/gpu/gpu_info_collector.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/string_piece.h" 9 #include "base/string_piece.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
(...skipping 24 matching lines...) Expand all
35 base::SplitString(sub_string, '.', &pieces); 35 base::SplitString(sub_string, '.', &pieces);
36 if (pieces.size() < 2) 36 if (pieces.size() < 2)
37 return "0"; 37 return "0";
38 return pieces[0] + "." + pieces[1]; 38 return pieces[0] + "." + pieces[1];
39 } 39 }
40 40
41 } 41 }
42 42
43 namespace gpu_info_collector { 43 namespace gpu_info_collector {
44 44
45 bool CollectGraphicsInfo(content::GPUInfo* gpu_info) { 45 bool CollectContextGraphicsInfo(content::GPUInfo* gpu_info) {
46 // can_lose_context must be false to enable accelerated Canvas2D 46 // can_lose_context must be false to enable accelerated Canvas2D
47 gpu_info->can_lose_context = false; 47 gpu_info->can_lose_context = false;
48 gpu_info->finalized = true; 48 gpu_info->finalized = true;
49 return CollectGraphicsInfoGL(gpu_info); 49 return CollectGraphicsInfoGL(gpu_info);
50 } 50 }
51 51
52 bool CollectPreliminaryGraphicsInfo(content::GPUInfo* gpu_info) { 52 bool CollectBasicGraphicsInfo(content::GPUInfo* gpu_info) {
53 gpu_info->can_lose_context = false; 53 gpu_info->can_lose_context = false;
54 // Create a short-lived context on the UI thread to collect the GL strings. 54 // Create a short-lived context on the UI thread to collect the GL strings.
55 return CollectGraphicsInfoGL(gpu_info); 55 return CollectGraphicsInfoGL(gpu_info);
56 } 56 }
57 57
58 bool CollectVideoCardInfo(content::GPUInfo* gpu_info) {
59 return true;
60 }
61
62 bool CollectDriverInfoGL(content::GPUInfo* gpu_info) { 58 bool CollectDriverInfoGL(content::GPUInfo* gpu_info) {
63 gpu_info->driver_version = GetDriverVersionFromString( 59 gpu_info->driver_version = GetDriverVersionFromString(
64 gpu_info->gl_version_string); 60 gpu_info->gl_version_string);
65 return true; 61 return true;
66 } 62 }
67 63
64 void MergeGPUInfo(content::GPUInfo* basic_gpu_info,
65 const content::GPUInfo& context_gpu_info) {
66 MergeGPUInfoGL(basic_gpu_info, context_gpu_info);
67 }
68
68 } // namespace gpu_info_collector 69 } // namespace gpu_info_collector
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698