| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009 The Android Open Source Project | 2 * Copyright 2009 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkFontLCDConfig.h" | 8 #include "SkFontLCDConfig.h" |
| 9 | 9 |
| 10 static SkFontLCDConfig::LCDOrientation gLCDOrientation = SkFontLCDConfig::kHoriz
ontal_LCDOrientation; | 10 static SkFontLCDConfig::LCDOrientation gLCDOrientation = SkFontLCDConfig::kHoriz
ontal_LCDOrientation; |
| 11 static SkFontLCDConfig::LCDOrder gLCDOrder = SkFontLCDConfig::kRGB_LCDOrder; | 11 static SkFontLCDConfig::LCDOrder gLCDOrder = SkFontLCDConfig::kRGB_LCDOrder; |
| 12 | 12 |
| 13 SkFontLCDConfig::LCDOrientation SkFontLCDConfig::GetSubpixelOrientation() { | 13 SkFontLCDConfig::LCDOrientation SkFontLCDConfig::GetSubpixelOrientation() { |
| 14 return gLCDOrientation; | 14 return gLCDOrientation; |
| 15 } | 15 } |
| 16 | 16 |
| 17 void SkFontLCDConfig::SetSubpixelOrientation(LCDOrientation orientation) { | 17 void SkFontLCDConfig::SetSubpixelOrientation(LCDOrientation orientation) { |
| 18 gLCDOrientation = orientation; | 18 gLCDOrientation = orientation; |
| 19 } | 19 } |
| 20 | 20 |
| 21 SkFontLCDConfig::LCDOrder SkFontLCDConfig::GetSubpixelOrder() { | 21 SkFontLCDConfig::LCDOrder SkFontLCDConfig::GetSubpixelOrder() { |
| 22 return gLCDOrder; | 22 return gLCDOrder; |
| 23 } | 23 } |
| 24 | 24 |
| 25 void SkFontLCDConfig::SetSubpixelOrder(LCDOrder order) { | 25 void SkFontLCDConfig::SetSubpixelOrder(LCDOrder order) { |
| 26 gLCDOrder = order; | 26 gLCDOrder = order; |
| 27 } | 27 } |
| 28 | |
| 29 /////////////////////////////////////////////////////////////////////////////// | |
| 30 // Legacy wrappers : remove from SkFontHost when webkit switches to new API | |
| 31 | |
| 32 #include "SkFontHost.h" | |
| 33 | |
| 34 SkFontHost::LCDOrientation SkFontHost::GetSubpixelOrientation() { | |
| 35 return (SkFontHost::LCDOrientation)SkFontLCDConfig::GetSubpixelOrientation()
; | |
| 36 } | |
| 37 | |
| 38 void SkFontHost::SetSubpixelOrientation(LCDOrientation orientation) { | |
| 39 SkFontLCDConfig::SetSubpixelOrientation((SkFontLCDConfig::LCDOrientation)ori
entation); | |
| 40 } | |
| 41 | |
| 42 SkFontHost::LCDOrder SkFontHost::GetSubpixelOrder() { | |
| 43 return (SkFontHost::LCDOrder)SkFontLCDConfig::GetSubpixelOrder(); | |
| 44 } | |
| 45 | |
| 46 void SkFontHost::SetSubpixelOrder(LCDOrder order) { | |
| 47 SkFontLCDConfig::SetSubpixelOrder((SkFontLCDConfig::LCDOrder)order); | |
| 48 } | |
| OLD | NEW |