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

Side by Side Diff: sky/engine/platform/fonts/GlyphPage.h

Issue 722723003: Re-land 714393002 after fixing android build. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/platform/fonts/FontPlatformData.h ('k') | sky/engine/platform/graphics/Color.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 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2013 Apple Inc. All rights reserved.
3 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 3 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 struct GlyphData { 49 struct GlyphData {
50 GlyphData(Glyph g = 0, const SimpleFontData* f = 0) 50 GlyphData(Glyph g = 0, const SimpleFontData* f = 0)
51 : glyph(g) 51 : glyph(g)
52 , fontData(f) 52 , fontData(f)
53 { 53 {
54 } 54 }
55 Glyph glyph; 55 Glyph glyph;
56 const SimpleFontData* fontData; 56 const SimpleFontData* fontData;
57 }; 57 };
58 58
59 #if COMPILER(MSVC)
60 #pragma warning(push)
61 #pragma warning(disable: 4200) // Disable "zero-sized array in struct/union" war ning
62 #endif
63
64 // A GlyphPage contains a fixed-size set of GlyphData mappings for a contiguous 59 // A GlyphPage contains a fixed-size set of GlyphData mappings for a contiguous
65 // range of characters in the Unicode code space. GlyphPages are indexed 60 // range of characters in the Unicode code space. GlyphPages are indexed
66 // starting from 0 and incrementing for each 256 glyphs. 61 // starting from 0 and incrementing for each 256 glyphs.
67 // 62 //
68 // One page may actually include glyphs from other fonts if the characters are 63 // One page may actually include glyphs from other fonts if the characters are
69 // missing in the primary font. It is owned by exactly one GlyphPageTreeNode, 64 // missing in the primary font. It is owned by exactly one GlyphPageTreeNode,
70 // although multiple nodes may reference it as their "page" if they are supposed 65 // although multiple nodes may reference it as their "page" if they are supposed
71 // to be overriding the parent's node, but provide no additional information. 66 // to be overriding the parent's node, but provide no additional information.
72 class PLATFORM_EXPORT GlyphPage : public RefCounted<GlyphPage> { 67 class PLATFORM_EXPORT GlyphPage : public RefCounted<GlyphPage> {
73 public: 68 public:
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 206
212 const SimpleFontData* m_fontDataForAllGlyphs; 207 const SimpleFontData* m_fontDataForAllGlyphs;
213 GlyphPageTreeNode* m_owner; 208 GlyphPageTreeNode* m_owner;
214 RefPtr<CustomDataPage> m_customFontToLoad; 209 RefPtr<CustomDataPage> m_customFontToLoad;
215 Glyph m_glyphs[size]; 210 Glyph m_glyphs[size];
216 211
217 // NOTE: This array has (GlyphPage::size) elements if m_fontDataForAllGlyphs is null. 212 // NOTE: This array has (GlyphPage::size) elements if m_fontDataForAllGlyphs is null.
218 const SimpleFontData* m_perGlyphFontData[0]; 213 const SimpleFontData* m_perGlyphFontData[0];
219 }; 214 };
220 215
221 #if COMPILER(MSVC)
222 #pragma warning(pop)
223 #endif
224
225 } // namespace blink 216 } // namespace blink
226 217
227 #endif // GlyphPage_h 218 #endif // GlyphPage_h
OLDNEW
« no previous file with comments | « sky/engine/platform/fonts/FontPlatformData.h ('k') | sky/engine/platform/graphics/Color.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698