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

Side by Side Diff: trunk/include/core/SkFontHost.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « trunk/include/core/SkDeviceProperties.h ('k') | trunk/include/core/SkFontLCDConfig.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkFontHost_DEFINED 10 #ifndef SkFontHost_DEFINED
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 exceeds the table's size, then only the bytes up to the table's 223 exceeds the table's size, then only the bytes up to the table's
224 size are actually copied, and this is the value returned. If 224 size are actually copied, and this is the value returned. If
225 offset > the table's size, or tag is not a valid table, 225 offset > the table's size, or tag is not a valid table,
226 then 0 is returned. 226 then 0 is returned.
227 */ 227 */
228 static size_t GetTableData(SkFontID fontID, SkFontTableTag tag, 228 static size_t GetTableData(SkFontID fontID, SkFontTableTag tag,
229 size_t offset, size_t length, void* data); 229 size_t offset, size_t length, void* data);
230 230
231 /////////////////////////////////////////////////////////////////////////// 231 ///////////////////////////////////////////////////////////////////////////
232 232
233 private:
233 /** LCDs either have their color elements arranged horizontally or 234 /** LCDs either have their color elements arranged horizontally or
234 vertically. When rendering subpixel glyphs we need to know which way 235 vertically. When rendering subpixel glyphs we need to know which way
235 round they are. 236 round they are.
236 237
237 Note, if you change this after startup, you'll need to flush the glyph 238 Note, if you change this after startup, you'll need to flush the glyph
238 cache because it'll have the wrong type of masks cached. 239 cache because it'll have the wrong type of masks cached.
239 240
240 @deprecated use SkPixelGeometry instead. 241 @deprecated use SkPixelGeometry instead.
241 */ 242 */
242 enum LCDOrientation { 243 enum LCDOrientation {
(...skipping 21 matching lines...) Expand all
264 enum LCDOrder { 265 enum LCDOrder {
265 kRGB_LCDOrder = 0, //!< this is the default 266 kRGB_LCDOrder = 0, //!< this is the default
266 kBGR_LCDOrder = 1, 267 kBGR_LCDOrder = 1,
267 kNONE_LCDOrder = 2 268 kNONE_LCDOrder = 2
268 }; 269 };
269 270
270 /** @deprecated set on Device creation. */ 271 /** @deprecated set on Device creation. */
271 static void SetSubpixelOrder(LCDOrder order); 272 static void SetSubpixelOrder(LCDOrder order);
272 /** @deprecated get from Device. */ 273 /** @deprecated get from Device. */
273 static LCDOrder GetSubpixelOrder(); 274 static LCDOrder GetSubpixelOrder();
275 public:
274 276
275 #ifdef SK_BUILD_FOR_ANDROID 277 #ifdef SK_BUILD_FOR_ANDROID
276 /////////////////////////////////////////////////////////////////////////// 278 ///////////////////////////////////////////////////////////////////////////
277 279
278 /** 280 /**
279 * Return the number of font units per em. 281 * Return the number of font units per em.
280 * 282 *
281 * @param fontID the font to query. 283 * @param fontID the font to query.
282 * @return the number of font units per em or 0 on error. 284 * @return the number of font units per em or 0 on error.
283 */ 285 */
284 static uint32_t GetUnitsPerEm(SkFontID fontID); 286 static uint32_t GetUnitsPerEm(SkFontID fontID);
285 #endif 287 #endif
286 288
287 /** If Skia is running in a constrained environment and the typeface 289 /** If Skia is running in a constrained environment and the typeface
288 implementation is handle based, the typeface data may become 290 implementation is handle based, the typeface data may become
289 unavailable asynchronously. If a font host or scaler context method is 291 unavailable asynchronously. If a font host or scaler context method is
290 unable to access font data, it may call this function as a request to 292 unable to access font data, it may call this function as a request to
291 make the handle contained in the typeface useable. 293 make the handle contained in the typeface useable.
292 */ 294 */
293 static void EnsureTypefaceAccessible(const SkTypeface& typeface); 295 static void EnsureTypefaceAccessible(const SkTypeface& typeface);
294 }; 296 };
295 297
296 #endif 298 #endif
OLDNEW
« no previous file with comments | « trunk/include/core/SkDeviceProperties.h ('k') | trunk/include/core/SkFontLCDConfig.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698