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

Side by Side Diff: src/gpu/GrDistanceFieldTextContext.cpp

Issue 349663005: always use 64 bit long for fixed mul (Closed) Base URL: https://skia.googlesource.com/skia.git@master
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
« no previous file with comments | « src/core/SkMath.cpp ('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 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrDistanceFieldTextContext.h" 8 #include "GrDistanceFieldTextContext.h"
9 #include "GrAtlas.h" 9 #include "GrAtlas.h"
10 #include "SkColorFilter.h" 10 #include "SkColorFilter.h"
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 494
495 if (glyph.fWidth) { 495 if (glyph.fWidth) {
496 this->drawPackedGlyph(GrGlyph::Pack(glyph.getGlyphID(), 496 this->drawPackedGlyph(GrGlyph::Pack(glyph.getGlyphID(),
497 glyph.getSubXFixed(), 497 glyph.getSubXFixed(),
498 glyph.getSubYFixed()), 498 glyph.getSubYFixed()),
499 fx, 499 fx,
500 fy, 500 fy,
501 fontScaler); 501 fontScaler);
502 } 502 }
503 503
504 fx += SkFixedMul_portable(glyph.fAdvanceX, fixedScale); 504 fx += SkFixedMul_longlong(glyph.fAdvanceX, fixedScale);
505 fy += SkFixedMul_portable(glyph.fAdvanceY, fixedScale); 505 fy += SkFixedMul_longlong(glyph.fAdvanceY, fixedScale);
506 } 506 }
507 507
508 this->finish(); 508 this->finish();
509 } 509 }
510 510
511 void GrDistanceFieldTextContext::drawPosText(const GrPaint& paint, const SkPaint & skPaint, 511 void GrDistanceFieldTextContext::drawPosText(const GrPaint& paint, const SkPaint & skPaint,
512 const char text[], size_t byteLengt h, 512 const char text[], size_t byteLengt h,
513 const SkScalar pos[], SkScalar cons tY, 513 const SkScalar pos[], SkScalar cons tY,
514 int scalarsPerPosition) { 514 int scalarsPerPosition) {
515 515
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 SkScalarToFixed(x) - (glyph.fAdvanceX >> a lignShift), 567 SkScalarToFixed(x) - (glyph.fAdvanceX >> a lignShift),
568 SkScalarToFixed(y) - (glyph.fAdvanceY >> a lignShift), 568 SkScalarToFixed(y) - (glyph.fAdvanceY >> a lignShift),
569 fontScaler); 569 fontScaler);
570 } 570 }
571 pos += scalarsPerPosition; 571 pos += scalarsPerPosition;
572 } 572 }
573 } 573 }
574 574
575 this->finish(); 575 this->finish();
576 } 576 }
OLDNEW
« no previous file with comments | « src/core/SkMath.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698