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

Side by Side Diff: Source/platform/fonts/GlyphPage.h

Issue 99103006: Moving GraphicsContext and dependencies from core to platform. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final patch - fixes Android Created 7 years 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 | « Source/platform/fonts/FontTest.cpp ('k') | Source/platform/fonts/GlyphPageTreeNode.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 * 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 12 matching lines...) Expand all
23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30 #ifndef GlyphPage_h 30 #ifndef GlyphPage_h
31 #define GlyphPage_h 31 #define GlyphPage_h
32 32
33 #include "platform/PlatformExport.h"
33 #include "platform/fonts/Glyph.h" 34 #include "platform/fonts/Glyph.h"
34 #include <string.h> 35 #include <string.h>
35 #include "wtf/PassRefPtr.h" 36 #include "wtf/PassRefPtr.h"
36 #include "wtf/RefCounted.h" 37 #include "wtf/RefCounted.h"
37 #include "wtf/RefPtr.h" 38 #include "wtf/RefPtr.h"
38 #include "wtf/unicode/Unicode.h" 39 #include "wtf/unicode/Unicode.h"
39 40
40 namespace WebCore { 41 namespace WebCore {
41 42
42 class SimpleFontData; 43 class SimpleFontData;
(...skipping 17 matching lines...) Expand all
60 #endif 61 #endif
61 62
62 // A GlyphPage contains a fixed-size set of GlyphData mappings for a contiguous 63 // A GlyphPage contains a fixed-size set of GlyphData mappings for a contiguous
63 // range of characters in the Unicode code space. GlyphPages are indexed 64 // range of characters in the Unicode code space. GlyphPages are indexed
64 // starting from 0 and incrementing for each 256 glyphs. 65 // starting from 0 and incrementing for each 256 glyphs.
65 // 66 //
66 // One page may actually include glyphs from other fonts if the characters are 67 // One page may actually include glyphs from other fonts if the characters are
67 // missing in the primary font. It is owned by exactly one GlyphPageTreeNode, 68 // missing in the primary font. It is owned by exactly one GlyphPageTreeNode,
68 // although multiple nodes may reference it as their "page" if they are supposed 69 // although multiple nodes may reference it as their "page" if they are supposed
69 // to be overriding the parent's node, but provide no additional information. 70 // to be overriding the parent's node, but provide no additional information.
70 class GlyphPage : public RefCounted<GlyphPage> { 71 class PLATFORM_EXPORT GlyphPage : public RefCounted<GlyphPage> {
71 public: 72 public:
72 static PassRefPtr<GlyphPage> createForMixedFontData(GlyphPageTreeNode* owner ) 73 static PassRefPtr<GlyphPage> createForMixedFontData(GlyphPageTreeNode* owner )
73 { 74 {
74 void* slot = fastMalloc(sizeof(GlyphPage) + sizeof(SimpleFontData*) * Gl yphPage::size); 75 void* slot = fastMalloc(sizeof(GlyphPage) + sizeof(SimpleFontData*) * Gl yphPage::size);
75 return adoptRef(new (slot) GlyphPage(owner)); 76 return adoptRef(new (slot) GlyphPage(owner));
76 } 77 }
77 78
78 static PassRefPtr<GlyphPage> createForSingleFontData(GlyphPageTreeNode* owne r, const SimpleFontData* fontData) 79 static PassRefPtr<GlyphPage> createForSingleFontData(GlyphPageTreeNode* owne r, const SimpleFontData* fontData)
79 { 80 {
80 ASSERT(fontData); 81 ASSERT(fontData);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 const SimpleFontData* m_perGlyphFontData[0]; 196 const SimpleFontData* m_perGlyphFontData[0];
196 }; 197 };
197 198
198 #if COMPILER(MSVC) 199 #if COMPILER(MSVC)
199 #pragma warning(pop) 200 #pragma warning(pop)
200 #endif 201 #endif
201 202
202 } // namespace WebCore 203 } // namespace WebCore
203 204
204 #endif // GlyphPage_h 205 #endif // GlyphPage_h
OLDNEW
« no previous file with comments | « Source/platform/fonts/FontTest.cpp ('k') | Source/platform/fonts/GlyphPageTreeNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698