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

Side by Side Diff: src/gpu/text/GrTextUtils.cpp

Issue 2396953002: Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints" (Closed)
Patch Set: add tmp virtual to unroll legacy arithmodes Created 4 years, 2 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/gpu/effects/GrConfigConversionEffect.cpp ('k') | src/image/SkImage.cpp » ('j') | 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 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 #include "GrTextUtils.h" 8 #include "GrTextUtils.h"
9 9
10 #include "GrAtlasTextBlob.h" 10 #include "GrAtlasTextBlob.h"
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 matrix[SkMatrix::kMTransY] = loc.fY; 540 matrix[SkMatrix::kMTransY] = loc.fY;
541 GrBlurUtils::drawPathWithMaskFilter(context, dc, clip, *path, pa int, 541 GrBlurUtils::drawPathWithMaskFilter(context, dc, clip, *path, pa int,
542 viewMatrix, &matrix, clipBou nds, false); 542 viewMatrix, &matrix, clipBou nds, false);
543 } 543 }
544 } 544 }
545 pos += scalarsPerPosition; 545 pos += scalarsPerPosition;
546 } 546 }
547 } 547 }
548 548
549 bool GrTextUtils::ShouldDisableLCD(const SkPaint& paint) { 549 bool GrTextUtils::ShouldDisableLCD(const SkPaint& paint) {
550 return !SkXfermode::AsMode(paint.getXfermode(), nullptr) || 550 return paint.getMaskFilter() ||
551 paint.getMaskFilter() ||
552 paint.getRasterizer() || 551 paint.getRasterizer() ||
553 paint.getPathEffect() || 552 paint.getPathEffect() ||
554 paint.isFakeBoldText() || 553 paint.isFakeBoldText() ||
555 paint.getStyle() != SkPaint::kFill_Style; 554 paint.getStyle() != SkPaint::kFill_Style;
556 } 555 }
557 556
558 uint32_t GrTextUtils::FilterTextFlags(const SkSurfaceProps& surfaceProps, const SkPaint& paint) { 557 uint32_t GrTextUtils::FilterTextFlags(const SkSurfaceProps& surfaceProps, const SkPaint& paint) {
559 uint32_t flags = paint.getFlags(); 558 uint32_t flags = paint.getFlags();
560 559
561 if (!paint.isLCDRenderText() || !paint.isAntiAlias()) { 560 if (!paint.isLCDRenderText() || !paint.isAntiAlias()) {
562 return flags; 561 return flags;
563 } 562 }
564 563
565 if (kUnknown_SkPixelGeometry == surfaceProps.pixelGeometry() || ShouldDisabl eLCD(paint)) { 564 if (kUnknown_SkPixelGeometry == surfaceProps.pixelGeometry() || ShouldDisabl eLCD(paint)) {
566 flags &= ~SkPaint::kLCDRenderText_Flag; 565 flags &= ~SkPaint::kLCDRenderText_Flag;
567 flags |= SkPaint::kGenA8FromLCD_Flag; 566 flags |= SkPaint::kGenA8FromLCD_Flag;
568 } 567 }
569 568
570 return flags; 569 return flags;
571 } 570 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrConfigConversionEffect.cpp ('k') | src/image/SkImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698