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

Side by Side Diff: src/gpu/text/GrAtlasTextBlob.h

Issue 1885613002: sRGB support for distance field text. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Break long line Created 4 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 #ifndef GrAtlasTextBlob_DEFINED 8 #ifndef GrAtlasTextBlob_DEFINED
9 #define GrAtlasTextBlob_DEFINED 9 #define GrAtlasTextBlob_DEFINED
10 10
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 int glyphCount, size_t vertexStride, 495 int glyphCount, size_t vertexStride,
496 GrColor color, SkScalar transX, 496 GrColor color, SkScalar transX,
497 SkScalar transY) const; 497 SkScalar transY) const;
498 498
499 inline GrDrawBatch* createBatch(const Run::SubRunInfo& info, 499 inline GrDrawBatch* createBatch(const Run::SubRunInfo& info,
500 int glyphCount, int run, int subRun, 500 int glyphCount, int run, int subRun,
501 const SkMatrix& viewMatrix, SkScalar x, SkSc alar y, 501 const SkMatrix& viewMatrix, SkScalar x, SkSc alar y,
502 GrColor color, 502 GrColor color,
503 const SkPaint& skPaint, const SkSurfaceProps & props, 503 const SkPaint& skPaint, const SkSurfaceProps & props,
504 const GrDistanceFieldAdjustTable* distanceAd justTable, 504 const GrDistanceFieldAdjustTable* distanceAd justTable,
505 bool useSRGBDistanceTable,
505 GrBatchFontCache* cache); 506 GrBatchFontCache* cache);
506 507
507 struct BigGlyph { 508 struct BigGlyph {
508 BigGlyph(const SkPath& path, SkScalar vx, SkScalar vy, SkScalar scale, b ool applyVM) 509 BigGlyph(const SkPath& path, SkScalar vx, SkScalar vy, SkScalar scale, b ool applyVM)
509 : fPath(path) 510 : fPath(path)
510 , fScale(scale) 511 , fScale(scale)
511 , fX(vx) 512 , fX(vx)
512 , fY(vy) 513 , fY(vy)
513 , fApplyVM(applyVM) {} 514 , fApplyVM(applyVM) {}
514 SkPath fPath; 515 SkPath fPath;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 // We can reuse distance field text, but only if the new viewmatrix would no t result in 549 // We can reuse distance field text, but only if the new viewmatrix would no t result in
549 // a mip change. Because there can be multiple runs in a blob, we track the overall 550 // a mip change. Because there can be multiple runs in a blob, we track the overall
550 // maximum minimum scale, and minimum maximum scale, we can support before w e need to regen 551 // maximum minimum scale, and minimum maximum scale, we can support before w e need to regen
551 SkScalar fMaxMinScale; 552 SkScalar fMaxMinScale;
552 SkScalar fMinMaxScale; 553 SkScalar fMinMaxScale;
553 int fRunCount; 554 int fRunCount;
554 uint8_t fTextType; 555 uint8_t fTextType;
555 }; 556 };
556 557
557 #endif 558 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698