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

Side by Side Diff: chrome/common/gpu_feature_flags.h

Issue 6672064: Move gpu_feature_flags from chrome\common to content\browser since it's only ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/gpu_feature_flags.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_COMMON_GPU_FEATURE_FLAGS_H__
6 #define CHROME_COMMON_GPU_FEATURE_FLAGS_H__
7 #pragma once
8
9 // Provides flags indicating which gpu features are blacklisted for the system
10 // on which chrome is currently running.
11
12 #include <string>
13
14 #include "base/basictypes.h"
15
16 class GpuFeatureFlags {
17 public:
18 enum GpuFeatureType {
19 kGpuFeatureAccelerated2dCanvas = 1 << 0,
20 kGpuFeatureAcceleratedCompositing = 1 << 1,
21 kGpuFeatureWebgl = 1 << 2,
22 kGpuFeatureMultisampling = 1 << 3,
23 kGpuFeatureAll = kGpuFeatureAccelerated2dCanvas |
24 kGpuFeatureAcceleratedCompositing |
25 kGpuFeatureWebgl |
26 kGpuFeatureMultisampling,
27 kGpuFeatureUnknown = 0
28 };
29
30 // All flags initialized to false, i.e., no feature is blacklisted.
31 GpuFeatureFlags();
32
33 // flags are OR combination of GpuFeatureType.
34 void set_flags(uint32 flags);
35
36 uint32 flags() const;
37
38 // Resets each flag by OR with the corresponding flag in "other".
39 void Combine(const GpuFeatureFlags& other);
40
41 // Maps string to GpuFeatureType; returns kGpuFeatureUnknown if none of the
42 // following is input (case-sensitive):
43 // "accelerated_2d_canvas"
44 // "accelerated_compositing"
45 // "webgl"
46 // "multisampling"
47 static GpuFeatureType StringToGpuFeatureType(
48 const std::string& feature_string);
49
50 private:
51 static const char kGpuFeatureNameAccelerated2dCanvas[];
52 static const char kGpuFeatureNameAcceleratedCompositing[];
53 static const char kGpuFeatureNameWebgl[];
54 static const char kGpuFeatureNameMultisampling[];
55 static const char kGpuFeatureNameAll[];
56
57 // If a bit is set to 1, corresponding feature is blacklisted.
58 uint32 flags_;
59 };
60
61 #endif // CHROME_COMMON_GPU_FEATURE_FLAGS_H__
62
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/gpu_feature_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698