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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « trunk/include/core/SkFontLCDConfig.h ('k') | trunk/src/ports/SkFontHost_fontconfig.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1
2 /* 1 /*
3 * Copyright 2009 The Android Open Source Project 2 * Copyright 2009 The Android Open Source Project
4 * 3 *
5 * 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
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
8 7
8 #include "SkFontLCDConfig.h"
9
10 static SkFontLCDConfig::LCDOrientation gLCDOrientation = SkFontLCDConfig::kHoriz ontal_LCDOrientation;
11 static SkFontLCDConfig::LCDOrder gLCDOrder = SkFontLCDConfig::kRGB_LCDOrder;
12
13 SkFontLCDConfig::LCDOrientation SkFontLCDConfig::GetSubpixelOrientation() {
14 return gLCDOrientation;
15 }
16
17 void SkFontLCDConfig::SetSubpixelOrientation(LCDOrientation orientation) {
18 gLCDOrientation = orientation;
19 }
20
21 SkFontLCDConfig::LCDOrder SkFontLCDConfig::GetSubpixelOrder() {
22 return gLCDOrder;
23 }
24
25 void SkFontLCDConfig::SetSubpixelOrder(LCDOrder order) {
26 gLCDOrder = order;
27 }
28
29 ///////////////////////////////////////////////////////////////////////////////
30 // Legacy wrappers : remove from SkFontHost when webkit switches to new API
9 31
10 #include "SkFontHost.h" 32 #include "SkFontHost.h"
11 33
12 static SkFontHost::LCDOrientation gLCDOrientation = SkFontHost::kHorizontal_LCDO rientation; 34 SkFontHost::LCDOrientation SkFontHost::GetSubpixelOrientation() {
13 static SkFontHost::LCDOrder gLCDOrder = SkFontHost::kRGB_LCDOrder; 35 return (SkFontHost::LCDOrientation)SkFontLCDConfig::GetSubpixelOrientation() ;
14
15 // static
16 SkFontHost::LCDOrientation SkFontHost::GetSubpixelOrientation()
17 {
18 return gLCDOrientation;
19 } 36 }
20 37
21 // static 38 void SkFontHost::SetSubpixelOrientation(LCDOrientation orientation) {
22 void SkFontHost::SetSubpixelOrientation(LCDOrientation orientation) 39 SkFontLCDConfig::SetSubpixelOrientation((SkFontLCDConfig::LCDOrientation)ori entation);
23 {
24 gLCDOrientation = orientation;
25 } 40 }
26 41
27 // static 42 SkFontHost::LCDOrder SkFontHost::GetSubpixelOrder() {
28 SkFontHost::LCDOrder SkFontHost::GetSubpixelOrder() 43 return (SkFontHost::LCDOrder)SkFontLCDConfig::GetSubpixelOrder();
29 {
30 return gLCDOrder;
31 } 44 }
32 45
33 // static 46 void SkFontHost::SetSubpixelOrder(LCDOrder order) {
34 void SkFontHost::SetSubpixelOrder(LCDOrder order) 47 SkFontLCDConfig::SetSubpixelOrder((SkFontLCDConfig::LCDOrder)order);
35 {
36 gLCDOrder = order;
37 } 48 }
49
50
OLDNEW
« 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