Broke GrTessellatingPathRenderer's tessellator out into a separate file.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1557083002 Committed: https://skia.googlesource.com/skia/+/8b05cb8a00bdb82e100f1ba74bf4de4a504cceea Review URL: https://codereview.chromium.org/1557083002
This commit is contained in:
parent
94da292e39
commit
e9709e8319
@ -161,6 +161,8 @@
|
|||||||
'<(skia_src_path)/gpu/GrStencilAttachment.h',
|
'<(skia_src_path)/gpu/GrStencilAttachment.h',
|
||||||
'<(skia_src_path)/gpu/GrStrokeInfo.cpp',
|
'<(skia_src_path)/gpu/GrStrokeInfo.cpp',
|
||||||
'<(skia_src_path)/gpu/GrStrokeInfo.h',
|
'<(skia_src_path)/gpu/GrStrokeInfo.h',
|
||||||
|
'<(skia_src_path)/gpu/GrTessellator.cpp',
|
||||||
|
'<(skia_src_path)/gpu/GrTessellator.h',
|
||||||
'<(skia_src_path)/gpu/GrTraceMarker.cpp',
|
'<(skia_src_path)/gpu/GrTraceMarker.cpp',
|
||||||
'<(skia_src_path)/gpu/GrTraceMarker.h',
|
'<(skia_src_path)/gpu/GrTraceMarker.h',
|
||||||
'<(skia_src_path)/gpu/GrTracing.h',
|
'<(skia_src_path)/gpu/GrTracing.h',
|
||||||
|
1470
src/gpu/GrTessellator.cpp
Normal file
1470
src/gpu/GrTessellator.cpp
Normal file
File diff suppressed because it is too large
Load Diff
40
src/gpu/GrTessellator.h
Normal file
40
src/gpu/GrTessellator.h
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2015 Google Inc.
|
||||||
|
*
|
||||||
|
* Use of this source code is governed by a BSD-style license that can be
|
||||||
|
* found in the LICENSE file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GrTessellator_DEFINED
|
||||||
|
#define GrTessellator_DEFINED
|
||||||
|
|
||||||
|
#include "SkPath.h"
|
||||||
|
#include "GrResourceProvider.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides utility functions for converting paths to a collection of triangles.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define TESSELLATOR_WIREFRAME 0
|
||||||
|
|
||||||
|
namespace GrTessellator {
|
||||||
|
|
||||||
|
struct WindingVertex {
|
||||||
|
SkPoint fPos;
|
||||||
|
int fWinding;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Triangulates a path to an array of vertices. Each triangle is represented as a set of three
|
||||||
|
// WindingVertex entries, each of which contains the position and winding count (which is the same
|
||||||
|
// for all three vertices of a triangle). The 'verts' out parameter is set to point to the resultant
|
||||||
|
// vertex array. CALLER IS RESPONSIBLE for deleting this buffer to avoid a memory leak!
|
||||||
|
int PathToVertices(const SkPath& path, SkScalar tolerance, const SkRect& clipBounds,
|
||||||
|
WindingVertex** verts);
|
||||||
|
|
||||||
|
int PathToTriangles(const SkPath& path, SkScalar tolerance, const SkRect& clipBounds,
|
||||||
|
GrResourceProvider* resourceProvider,
|
||||||
|
SkAutoTUnref<GrVertexBuffer>& vertexBuffer, bool canMapVB, bool* isLinear);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user