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

Side by Side Diff: Source/platform/fonts/mac/FontComplexTextMac.cpp

Issue 348553003: Simplify GlyphBuffer::reverse. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | « Source/platform/fonts/GlyphBuffer.h ('k') | no next file » | 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, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 float beforeWidth = controller.runWidthSoFar(); 78 float beforeWidth = controller.runWidthSoFar();
79 controller.advance(runInfo.to, &glyphBuffer); 79 controller.advance(runInfo.to, &glyphBuffer);
80 80
81 if (glyphBuffer.isEmpty()) 81 if (glyphBuffer.isEmpty())
82 return 0; 82 return 0;
83 83
84 float afterWidth = controller.runWidthSoFar(); 84 float afterWidth = controller.runWidthSoFar();
85 85
86 if (runInfo.run.rtl()) { 86 if (runInfo.run.rtl()) {
87 initialAdvance = controller.totalWidth() + controller.finalRoundingWidth () - afterWidth; 87 initialAdvance = controller.totalWidth() + controller.finalRoundingWidth () - afterWidth;
88 glyphBuffer.reverse(0, glyphBuffer.size()); 88 glyphBuffer.reverse();
89 } else 89 } else
90 initialAdvance = beforeWidth; 90 initialAdvance = beforeWidth;
91 91
92 return initialAdvance; 92 return initialAdvance;
93 } 93 }
94 94
95 void Font::drawComplexText(GraphicsContext* context, const TextRunPaintInfo& run Info, const FloatPoint& point) const 95 void Font::drawComplexText(GraphicsContext* context, const TextRunPaintInfo& run Info, const FloatPoint& point) const
96 { 96 {
97 if (preferHarfBuzz(this)) { 97 if (preferHarfBuzz(this)) {
98 GlyphBuffer glyphBuffer; 98 GlyphBuffer glyphBuffer;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 return simpleFontData; 203 return simpleFontData;
204 } 204 }
205 205
206 if (!triedBaseCharacterFontData && baseCharacterGlyphData.fontData && baseCh aracterGlyphData.fontData->canRenderCombiningCharacterSequence(characters, lengt h)) 206 if (!triedBaseCharacterFontData && baseCharacterGlyphData.fontData && baseCh aracterGlyphData.fontData->canRenderCombiningCharacterSequence(characters, lengt h))
207 return baseCharacterGlyphData.fontData; 207 return baseCharacterGlyphData.fontData;
208 208
209 return SimpleFontData::systemFallback(); 209 return SimpleFontData::systemFallback();
210 } 210 }
211 211
212 } // namespace WebCore 212 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/platform/fonts/GlyphBuffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698