Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 Google Inc. All rights reserved. | 2 * Copyright (c) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 BlackBerry Limited. All rights reserved. | 3 * Copyright (C) 2013 BlackBerry Limited. 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 are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * 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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 531 feature.tag = HB_TAG(tag[0], tag[1], tag[2], tag[3]); | 531 feature.tag = HB_TAG(tag[0], tag[1], tag[2], tag[3]); |
| 532 feature.value = settings->at(i).value(); | 532 feature.value = settings->at(i).value(); |
| 533 feature.start = 0; | 533 feature.start = 0; |
| 534 feature.end = static_cast<unsigned>(-1); | 534 feature.end = static_cast<unsigned>(-1); |
| 535 m_features.append(feature); | 535 m_features.append(feature); |
| 536 } | 536 } |
| 537 } | 537 } |
| 538 | 538 |
| 539 bool HarfBuzzShaper::shape(GlyphBuffer* glyphBuffer) | 539 bool HarfBuzzShaper::shape(GlyphBuffer* glyphBuffer) |
| 540 { | 540 { |
| 541 m_totalWidth = 0; | |
|
Daniel Erat
2015/04/27 15:42:21
mind initializing it in the c'tor as well? having
| |
| 541 if (!createHarfBuzzRuns()) | 542 if (!createHarfBuzzRuns()) |
| 542 return false; | 543 return false; |
| 543 | 544 |
| 544 m_totalWidth = 0; | |
| 545 if (!shapeHarfBuzzRuns()) | 545 if (!shapeHarfBuzzRuns()) |
| 546 return false; | 546 return false; |
| 547 | 547 |
| 548 if (glyphBuffer && !fillGlyphBuffer(glyphBuffer)) | 548 if (glyphBuffer && !fillGlyphBuffer(glyphBuffer)) |
| 549 return false; | 549 return false; |
| 550 | 550 |
| 551 return true; | 551 return true; |
| 552 } | 552 } |
| 553 | 553 |
| 554 struct CandidateRun { | 554 struct CandidateRun { |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1206 // possibly invalid from, to arguments. | 1206 // possibly invalid from, to arguments. |
| 1207 if (!foundToX && !foundFromX) | 1207 if (!foundToX && !foundFromX) |
| 1208 fromX = toX = 0; | 1208 fromX = toX = 0; |
| 1209 | 1209 |
| 1210 if (fromX < toX) | 1210 if (fromX < toX) |
| 1211 return FloatRect(point.x() + fromX, point.y(), toX - fromX, height); | 1211 return FloatRect(point.x() + fromX, point.y(), toX - fromX, height); |
| 1212 return FloatRect(point.x() + toX, point.y(), fromX - toX, height); | 1212 return FloatRect(point.x() + toX, point.y(), fromX - toX, height); |
| 1213 } | 1213 } |
| 1214 | 1214 |
| 1215 } // namespace blink | 1215 } // namespace blink |
| OLD | NEW |