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

Unified Diff: trunk/include/core/SkDeviceProperties.h

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 | « no previous file | trunk/include/core/SkFontHost.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/include/core/SkDeviceProperties.h
===================================================================
--- trunk/include/core/SkDeviceProperties.h (revision 8103)
+++ trunk/include/core/SkDeviceProperties.h (working copy)
@@ -10,8 +10,8 @@
#define SK_GAMMA_EXPONENT (0.0f)
#endif
-//TODO: get everyone to stop using SkFontHost::SetSubpixel* and remove this import.
-#include "SkFontHost.h"
+//TODO: get everyone to stop using SkFontLCDConfig::SetSubpixel* and remove this import.
+#include "SkFontLCDConfig.h"
struct SkDeviceProperties {
struct Geometry {
@@ -60,25 +60,25 @@
}
private:
- //TODO: get everyone to stop using SkFontHost::SetSubpixel* and replace these calls with constants.
- static Orientation fromOldOrientation(SkFontHost::LCDOrientation orientation) {
+ //TODO: get everyone to stop using SkFontLCDConfig::SetSubpixel* and replace these calls with constants.
+ static Orientation fromOldOrientation(SkFontLCDConfig::LCDOrientation orientation) {
switch (orientation) {
- case SkFontHost::kHorizontal_LCDOrientation: return kHorizontal_Orientation;
- case SkFontHost::kVertical_LCDOrientation: return kVertical_Orientation;
+ case SkFontLCDConfig::kHorizontal_LCDOrientation: return kHorizontal_Orientation;
+ case SkFontLCDConfig::kVertical_LCDOrientation: return kVertical_Orientation;
default: return kUnknown_Orientation;
}
}
- static Layout fromOldLayout(SkFontHost::LCDOrder order) {
+ static Layout fromOldLayout(SkFontLCDConfig::LCDOrder order) {
switch (order) {
- case SkFontHost::kRGB_LCDOrder: return kRGB_Layout;
- case SkFontHost::kBGR_LCDOrder: return kBGR_Layout;
+ case SkFontLCDConfig::kRGB_LCDOrder: return kRGB_Layout;
+ case SkFontLCDConfig::kBGR_LCDOrder: return kBGR_Layout;
default: return kUnknown_Layout;
}
}
public:
static Geometry MakeDefault() {
- Orientation orientation = fromOldOrientation(SkFontHost::GetSubpixelOrientation()); //kHorizontal_Orientation
- Layout layout = fromOldLayout(SkFontHost::GetSubpixelOrder()); //kRGB_Layout
+ Orientation orientation = fromOldOrientation(SkFontLCDConfig::GetSubpixelOrientation()); //kHorizontal_Orientation
+ Layout layout = fromOldLayout(SkFontLCDConfig::GetSubpixelOrder()); //kRGB_Layout
Geometry ret = { SkToU8(orientation | layout) };
return ret;
}
« no previous file with comments | « no previous file | trunk/include/core/SkFontHost.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698