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

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

Issue 1063603003: Remove obsolete for_web_contents parameter in FontRenderParamsQuery. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove obsolete for_web_contents parameter in FontRenderParamsQuery. 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/browser/renderer_host/sandbox_ipc_linux.cc ('k') | ui/gfx/font_render_params.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 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
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 SubpixelRendering subpixel_rendering; 60 SubpixelRendering subpixel_rendering;
61 61
62 static SkFontHost::LCDOrder SubpixelRenderingToSkiaLCDOrder( 62 static SkFontHost::LCDOrder SubpixelRenderingToSkiaLCDOrder(
63 SubpixelRendering subpixel_rendering); 63 SubpixelRendering subpixel_rendering);
64 static SkFontHost::LCDOrientation SubpixelRenderingToSkiaLCDOrientation( 64 static SkFontHost::LCDOrientation SubpixelRenderingToSkiaLCDOrientation(
65 SubpixelRendering subpixel_rendering); 65 SubpixelRendering subpixel_rendering);
66 }; 66 };
67 67
68 // A query used to determine the appropriate FontRenderParams. 68 // A query used to determine the appropriate FontRenderParams.
69 struct GFX_EXPORT FontRenderParamsQuery { 69 struct GFX_EXPORT FontRenderParamsQuery {
70 explicit FontRenderParamsQuery(bool for_web_contents); 70 FontRenderParamsQuery();
71 ~FontRenderParamsQuery(); 71 ~FontRenderParamsQuery();
72 72
73 bool is_empty() const { 73 bool is_empty() const {
74 return families.empty() && pixel_size <= 0 && point_size <= 0 && style < 0; 74 return families.empty() && pixel_size <= 0 && point_size <= 0 && style < 0;
75 } 75 }
76 76
77 // True if rendering text for the web.
78 // TODO(derat): Remove this once FontRenderParams::subpixel_positioning is
79 // gone: http://crbug.com/396659
80 bool for_web_contents;
81
82 // Requested font families, or empty if unset. 77 // Requested font families, or empty if unset.
83 std::vector<std::string> families; 78 std::vector<std::string> families;
84 79
85 // Font size in pixels or points, or 0 if unset. 80 // Font size in pixels or points, or 0 if unset.
86 int pixel_size; 81 int pixel_size;
87 int point_size; 82 int point_size;
88 83
89 // gfx::Font::FontStyle bit field, or -1 if unset. 84 // gfx::Font::FontStyle bit field, or -1 if unset.
90 int style; 85 int style;
91 86
(...skipping 21 matching lines...) Expand all
113 108
114 // Sets the device scale factor for FontRenderParams to decide 109 // Sets the device scale factor for FontRenderParams to decide
115 // if it should enable subpixel positioning. 110 // if it should enable subpixel positioning.
116 GFX_EXPORT void SetFontRenderParamsDeviceScaleFactor( 111 GFX_EXPORT void SetFontRenderParamsDeviceScaleFactor(
117 float device_scale_factor); 112 float device_scale_factor);
118 #endif 113 #endif
119 114
120 } // namespace gfx 115 } // namespace gfx
121 116
122 #endif // UI_GFX_FONT_RENDER_PARAMS_H_ 117 #endif // UI_GFX_FONT_RENDER_PARAMS_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/sandbox_ipc_linux.cc ('k') | ui/gfx/font_render_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698