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

Side by Side Diff: ui/gfx/font_render_params.h

Issue 1091773002: Apply automatic range checks to content enum types across IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply automatic range checks to content enum types across IPC. Created 5 years, 8 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 | « content/public/common/window_container_type.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef UI_GFX_FONT_RENDER_PARAMS_H_ 5 #ifndef UI_GFX_FONT_RENDER_PARAMS_H_
6 #define UI_GFX_FONT_RENDER_PARAMS_H_ 6 #define UI_GFX_FONT_RENDER_PARAMS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "third_party/skia/include/core/SkFontHost.h" 11 #include "third_party/skia/include/core/SkFontHost.h"
12 #include "ui/gfx/gfx_export.h" 12 #include "ui/gfx/gfx_export.h"
13 13
14 namespace gfx { 14 namespace gfx {
15 15
16 // A collection of parameters describing how text should be rendered on Linux. 16 // A collection of parameters describing how text should be rendered on Linux.
17 struct GFX_EXPORT FontRenderParams { 17 struct GFX_EXPORT FontRenderParams {
18 FontRenderParams(); 18 FontRenderParams();
19 ~FontRenderParams(); 19 ~FontRenderParams();
20 20
21 // Level of hinting to be applied. 21 // Level of hinting to be applied.
22 enum Hinting { 22 enum Hinting {
23 HINTING_NONE = 0, 23 HINTING_NONE = 0,
24 HINTING_SLIGHT, 24 HINTING_SLIGHT,
25 HINTING_MEDIUM, 25 HINTING_MEDIUM,
26 HINTING_FULL, 26 HINTING_FULL,
27
28 HINTING_MAX = HINTING_FULL,
27 }; 29 };
28 30
29 // Different subpixel orders to be used for subpixel rendering. 31 // Different subpixel orders to be used for subpixel rendering.
30 enum SubpixelRendering { 32 enum SubpixelRendering {
31 SUBPIXEL_RENDERING_NONE = 0, 33 SUBPIXEL_RENDERING_NONE = 0,
32 SUBPIXEL_RENDERING_RGB, 34 SUBPIXEL_RENDERING_RGB,
33 SUBPIXEL_RENDERING_BGR, 35 SUBPIXEL_RENDERING_BGR,
34 SUBPIXEL_RENDERING_VRGB, 36 SUBPIXEL_RENDERING_VRGB,
35 SUBPIXEL_RENDERING_VBGR, 37 SUBPIXEL_RENDERING_VBGR,
38
39 SUBPIXEL_RENDERING_MAX = SUBPIXEL_RENDERING_VBGR,
36 }; 40 };
37 41
38 // Antialiasing (grayscale if |subpixel_rendering| is SUBPIXEL_RENDERING_NONE 42 // Antialiasing (grayscale if |subpixel_rendering| is SUBPIXEL_RENDERING_NONE
39 // and RGBA otherwise). 43 // and RGBA otherwise).
40 bool antialiasing; 44 bool antialiasing;
41 45
42 // Should subpixel positioning (i.e. fractional X positions for glyphs) be 46 // Should subpixel positioning (i.e. fractional X positions for glyphs) be
43 // used? 47 // used?
44 // TODO(derat): Remove this; we don't set it in the browser and mostly ignore 48 // TODO(derat): Remove this; we don't set it in the browser and mostly ignore
45 // it in Blink: http://crbug.com/396659 49 // it in Blink: http://crbug.com/396659
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 112
109 // Sets the device scale factor for FontRenderParams to decide 113 // Sets the device scale factor for FontRenderParams to decide
110 // if it should enable subpixel positioning. 114 // if it should enable subpixel positioning.
111 GFX_EXPORT void SetFontRenderParamsDeviceScaleFactor( 115 GFX_EXPORT void SetFontRenderParamsDeviceScaleFactor(
112 float device_scale_factor); 116 float device_scale_factor);
113 #endif 117 #endif
114 118
115 } // namespace gfx 119 } // namespace gfx
116 120
117 #endif // UI_GFX_FONT_RENDER_PARAMS_H_ 121 #endif // UI_GFX_FONT_RENDER_PARAMS_H_
OLDNEW
« no previous file with comments | « content/public/common/window_container_type.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698