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

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

Issue 208893003: More distance field improvements (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Slightly faster clearing of temp glyph buffer Created 6 years, 9 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/SkDistanceFieldGen.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 "GrDrawTarget.h" 10 #include "GrDrawTarget.h"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 } 365 }
366 366
367 x -= alignX; 367 x -= alignX;
368 y -= alignY; 368 y -= alignY;
369 } 369 }
370 370
371 SkFixed fx = SkScalarToFixed(x) + SK_FixedHalf; 371 SkFixed fx = SkScalarToFixed(x) + SK_FixedHalf;
372 SkFixed fy = SkScalarToFixed(y) + SK_FixedHalf; 372 SkFixed fy = SkScalarToFixed(y) + SK_FixedHalf;
373 SkFixed fixedScale = SkScalarToFixed(sizeRatio); 373 SkFixed fixedScale = SkScalarToFixed(sizeRatio);
374 while (text < stop) { 374 while (text < stop) {
375 const SkGlyph& glyph = glyphCacheProc(cache, &text, fx, fy); 375 const SkGlyph& glyph = glyphCacheProc(cache, &text, 0, 0);
376 376
377 if (glyph.fWidth) { 377 if (glyph.fWidth) {
378 this->drawPackedGlyph(GrGlyph::Pack(glyph.getGlyphID(), 378 this->drawPackedGlyph(GrGlyph::Pack(glyph.getGlyphID(),
379 glyph.getSubXFixed(), 379 glyph.getSubXFixed(),
380 glyph.getSubYFixed()), 380 glyph.getSubYFixed()),
381 SkFixedFloorToFixed(fx), 381 SkFixedFloorToFixed(fx),
382 SkFixedFloorToFixed(fy), 382 SkFixedFloorToFixed(fy),
383 fontScaler); 383 fontScaler);
384 } 384 }
385 385
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 SkScalarToFixed(y) - (glyph.fAdvanceY >> a lignShift) 449 SkScalarToFixed(y) - (glyph.fAdvanceY >> a lignShift)
450 + SK_FixedHalf, //d1g.fHalfSampleY, 450 + SK_FixedHalf, //d1g.fHalfSampleY,
451 fontScaler); 451 fontScaler);
452 } 452 }
453 pos += scalarsPerPosition; 453 pos += scalarsPerPosition;
454 } 454 }
455 } 455 }
456 456
457 this->finish(); 457 this->finish();
458 } 458 }
OLDNEW
« no previous file with comments | « src/core/SkDistanceFieldGen.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698