summaryrefslogtreecommitdiffstats
path: root/ppapi/shared_impl/ppapi_preferences.cc
blob: a3ac41353ed7ae2d0b53dd70d003e330e79bb999 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ppapi/shared_impl/ppapi_preferences.h"

namespace ppapi {

Preferences::Preferences()
    : default_font_size(0),
      default_fixed_font_size(0),
      number_of_cpu_cores(0),
      is_3d_supported(true),
      is_stage3d_supported(false),
      is_stage3d_baseline_supported(false) {
}

Preferences::Preferences(const webkit_glue::WebPreferences& prefs)
    : standard_font_family_map(prefs.standard_font_family_map),
      fixed_font_family_map(prefs.fixed_font_family_map),
      serif_font_family_map(prefs.serif_font_family_map),
      sans_serif_font_family_map(prefs.sans_serif_font_family_map),
      default_font_size(prefs.default_font_size),
      default_fixed_font_size(prefs.default_fixed_font_size),
      number_of_cpu_cores(prefs.number_of_cpu_cores),
      is_3d_supported(prefs.flash_3d_enabled),
      is_stage3d_supported(prefs.flash_stage3d_enabled),
      is_stage3d_baseline_supported(prefs.flash_stage3d_baseline_enabled),
      // This determines both if webgl is supported (experimental_webgl_enabled)
      // and if it runs in hardware
      // (accelerated_compositing_for_plugins_enabled)
      is_webgl_supported(prefs.experimental_webgl_enabled &&
                         prefs.accelerated_compositing_for_plugins_enabled) {
}

Preferences::~Preferences() {
}

}  // namespace ppapi