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

Side by Side Diff: src/gpu/GrDistanceFieldGenFromVector.h

Issue 1643143002: Generate Signed Distance Field directly from vector path (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Temporary use legacy distance field Created 3 years, 11 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 | « gn/gpu.gni ('k') | src/gpu/GrDistanceFieldGenFromVector.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2017 ARM Ltd.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef GrDistanceFieldGenFromVector_DEFINED
9 #define GrDistanceFieldGenFromVector_DEFINED
10
11 #include "SkPath.h"
12
13 class SkMatrix;
14
15 #ifndef SK_USE_LEGACY_DISTANCE_FIELDS
16 #define SK_USE_LEGACY_DISTANCE_FIELDS
17 #endif
18
19 /** Given a vector path, generate the associated distance field.
20
21 * @param distanceField The distance field to be generated. Should already be allocated
22 * by the client with the padding defined in "SkDistan ceFieldGen.h".
23 * @param path The path we're using to generate the distance field .
24 * @param matrix Transformation matrix for path.
25 * @param width Width of the distance field.
26 * @param height Height of the distance field.
27 * @param rowBytes Size of each row in the distance field, in bytes.
28 */
29 bool GrGenerateDistanceFieldFromPath(unsigned char* distanceField,
30 const SkPath& path, const SkMatrix& viewMat rix,
31 int width, int height, size_t rowBytes);
32
33 inline bool IsDistanceFieldSupportedFillType(SkPath::FillType fFillType)
34 {
35 return (SkPath::kEvenOdd_FillType == fFillType ||
36 SkPath::kInverseEvenOdd_FillType == fFillType);
37 }
38
39 #endif
OLDNEW
« no previous file with comments | « gn/gpu.gni ('k') | src/gpu/GrDistanceFieldGenFromVector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698