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

Side by Side Diff: src/core/SkDraw.cpp

Issue 1813553005: switch patheffects over to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: try to fix xpsdevice Created 4 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/animator/SkDrawPaint.cpp ('k') | src/core/SkPaint.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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 #define __STDC_LIMIT_MACROS 7 #define __STDC_LIMIT_MACROS
8 8
9 #include "SkDraw.h" 9 #include "SkDraw.h"
10 #include "SkBlitter.h" 10 #include "SkBlitter.h"
(...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 1608
1609 SkPaint::GlyphCacheProc glyphCacheProc = paint.getGlyphCacheProc(true); 1609 SkPaint::GlyphCacheProc glyphCacheProc = paint.getGlyphCacheProc(true);
1610 SkAutoGlyphCache cache(paint, &fDevice->surfaceProps(), this->fakeGam ma(), nullptr); 1610 SkAutoGlyphCache cache(paint, &fDevice->surfaceProps(), this->fakeGam ma(), nullptr);
1611 1611
1612 const char* stop = text + byteLength; 1612 const char* stop = text + byteLength;
1613 SkTextAlignProc alignProc(paint.getTextAlign()); 1613 SkTextAlignProc alignProc(paint.getTextAlign());
1614 SkTextMapStateProc tmsProc(SkMatrix::I(), offset, scalarsPerPosition); 1614 SkTextMapStateProc tmsProc(SkMatrix::I(), offset, scalarsPerPosition);
1615 1615
1616 // Now restore the original settings, so we "draw" with whatever style/strok ing. 1616 // Now restore the original settings, so we "draw" with whatever style/strok ing.
1617 paint.setStyle(origPaint.getStyle()); 1617 paint.setStyle(origPaint.getStyle());
1618 paint.setPathEffect(origPaint.getPathEffect()); 1618 paint.setPathEffect(sk_ref_sp(origPaint.getPathEffect()));
1619 1619
1620 while (text < stop) { 1620 while (text < stop) {
1621 const SkGlyph& glyph = glyphCacheProc(cache.get(), &text); 1621 const SkGlyph& glyph = glyphCacheProc(cache.get(), &text);
1622 if (glyph.fWidth) { 1622 if (glyph.fWidth) {
1623 const SkPath* path = cache->findPath(glyph); 1623 const SkPath* path = cache->findPath(glyph);
1624 if (path) { 1624 if (path) {
1625 SkPoint tmsLoc; 1625 SkPoint tmsLoc;
1626 tmsProc(pos, &tmsLoc); 1626 tmsProc(pos, &tmsLoc);
1627 SkPoint loc; 1627 SkPoint loc;
1628 alignProc(tmsLoc, glyph, &loc); 1628 alignProc(tmsLoc, glyph, &loc);
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
2071 mask->fImage = SkMask::AllocImage(size); 2071 mask->fImage = SkMask::AllocImage(size);
2072 memset(mask->fImage, 0, mask->computeImageSize()); 2072 memset(mask->fImage, 0, mask->computeImageSize());
2073 } 2073 }
2074 2074
2075 if (SkMask::kJustComputeBounds_CreateMode != mode) { 2075 if (SkMask::kJustComputeBounds_CreateMode != mode) {
2076 draw_into_mask(*mask, devPath, style); 2076 draw_into_mask(*mask, devPath, style);
2077 } 2077 }
2078 2078
2079 return true; 2079 return true;
2080 } 2080 }
OLDNEW
« no previous file with comments | « src/animator/SkDrawPaint.cpp ('k') | src/core/SkPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698