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

Unified Diff: trunk/src/core/SkFontHost.cpp

Issue 12623011: add (temp) SkFontLCDConfig class to hold LCD getters/setters. This will allow (Closed) Base URL: http://skia.googlecode.com/svn/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/include/core/SkFontLCDConfig.h ('k') | trunk/src/ports/SkFontHost_fontconfig.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/core/SkFontHost.cpp
===================================================================
--- trunk/src/core/SkFontHost.cpp (revision 8103)
+++ trunk/src/core/SkFontHost.cpp (working copy)
@@ -1,4 +1,3 @@
-
/*
* Copyright 2009 The Android Open Source Project
*
@@ -6,32 +5,46 @@
* found in the LICENSE file.
*/
+#include "SkFontLCDConfig.h"
-#include "SkFontHost.h"
+static SkFontLCDConfig::LCDOrientation gLCDOrientation = SkFontLCDConfig::kHorizontal_LCDOrientation;
+static SkFontLCDConfig::LCDOrder gLCDOrder = SkFontLCDConfig::kRGB_LCDOrder;
-static SkFontHost::LCDOrientation gLCDOrientation = SkFontHost::kHorizontal_LCDOrientation;
-static SkFontHost::LCDOrder gLCDOrder = SkFontHost::kRGB_LCDOrder;
-
-// static
-SkFontHost::LCDOrientation SkFontHost::GetSubpixelOrientation()
-{
+SkFontLCDConfig::LCDOrientation SkFontLCDConfig::GetSubpixelOrientation() {
return gLCDOrientation;
}
-// static
-void SkFontHost::SetSubpixelOrientation(LCDOrientation orientation)
-{
+void SkFontLCDConfig::SetSubpixelOrientation(LCDOrientation orientation) {
gLCDOrientation = orientation;
}
-// static
-SkFontHost::LCDOrder SkFontHost::GetSubpixelOrder()
-{
+SkFontLCDConfig::LCDOrder SkFontLCDConfig::GetSubpixelOrder() {
return gLCDOrder;
}
-// static
-void SkFontHost::SetSubpixelOrder(LCDOrder order)
-{
+void SkFontLCDConfig::SetSubpixelOrder(LCDOrder order) {
gLCDOrder = order;
}
+
+///////////////////////////////////////////////////////////////////////////////
+// Legacy wrappers : remove from SkFontHost when webkit switches to new API
+
+#include "SkFontHost.h"
+
+SkFontHost::LCDOrientation SkFontHost::GetSubpixelOrientation() {
+ return (SkFontHost::LCDOrientation)SkFontLCDConfig::GetSubpixelOrientation();
+}
+
+void SkFontHost::SetSubpixelOrientation(LCDOrientation orientation) {
+ SkFontLCDConfig::SetSubpixelOrientation((SkFontLCDConfig::LCDOrientation)orientation);
+}
+
+SkFontHost::LCDOrder SkFontHost::GetSubpixelOrder() {
+ return (SkFontHost::LCDOrder)SkFontLCDConfig::GetSubpixelOrder();
+}
+
+void SkFontHost::SetSubpixelOrder(LCDOrder order) {
+ SkFontLCDConfig::SetSubpixelOrder((SkFontLCDConfig::LCDOrder)order);
+}
+
+
« no previous file with comments | « trunk/include/core/SkFontLCDConfig.h ('k') | trunk/src/ports/SkFontHost_fontconfig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698