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

Unified Diff: third_party/WebKit/Source/platform/fonts/FontRenderStyle.h

Issue 1931393002: Introduce typeface cache in blink::FontCache (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wip: others Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/fonts/FontRenderStyle.h
diff --git a/third_party/WebKit/Source/platform/fonts/FontRenderStyle.h b/third_party/WebKit/Source/platform/fonts/FontRenderStyle.h
index f00af63ecbf9c2da7b56de9de16f7b525eddd1dd..7e70f6caf20b738a46eae5d41ca591492f500e96 100644
--- a/third_party/WebKit/Source/platform/fonts/FontRenderStyle.h
+++ b/third_party/WebKit/Source/platform/fonts/FontRenderStyle.h
@@ -32,11 +32,19 @@
#include "wtf/Allocator.h"
+#include "platform/PlatformExport.h"
+#include "SkTypeface.h"
+#include "SkPaint.h"
+
+namespace WTF {
+class String;
+}
+
namespace blink {
// FontRenderStyle describes the user's preferences for rendering a font at a
// given size.
-struct FontRenderStyle {
+struct PLATFORM_EXPORT FontRenderStyle {
DISALLOW_NEW();
enum {
NoPreference = 2,
@@ -62,6 +70,15 @@ struct FontRenderStyle {
&& useSubpixelPositioning == a.useSubpixelPositioning;
}
+ static void setHinting(SkPaint::Hinting);
+ static void setAutoHint(bool);
+ static void setUseBitmaps(bool);
+ static void setAntiAlias(bool);
+ static void setSubpixelRendering(bool);
+
+ void apply(SkPaint*, float deviceScaleFactor = 1.0) const;
+ void querySystemForRenderStyle(WTF::String family, float textSize, SkTypeface::Style);
+
// Each of the use* members below can take one of three values:
// 0: off
// 1: on

Powered by Google App Engine
This is Rietveld 408576698