e4097e3a0b
This fixes the last bug discovered by iterating through the 800K skp corpus representing the top 1M websites. For every clip on the stack, the paths are replaced with the pathop intersection. The resulting draw is compared with the original draw for pixel errors. At least two prominent bugs remain. In one, the winding value is confused by a cubic with an inflection. In the other, a quad/cubic pair, nearly coincident, fails to find an intersection. These minor changes include ignoring very tiny self-intersections of cubics, and processing degenerate edges that don't connect to anything else. R=reed@android.com TBR=reed Author: caryclark@google.com Review URL: https://codereview.chromium.org/340103002
28 lines
852 B
C
28 lines
852 B
C
/*
|
|
* Copyright 2012 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
#ifndef PathOpsTestCommon_DEFINED
|
|
#define PathOpsTestCommon_DEFINED
|
|
|
|
#include "SkPathOpsQuad.h"
|
|
#include "SkTArray.h"
|
|
|
|
struct SkPathOpsBounds;
|
|
|
|
void CubicPathToQuads(const SkPath& cubicPath, SkPath* quadPath);
|
|
void CubicPathToSimple(const SkPath& cubicPath, SkPath* simplePath);
|
|
void CubicToQuads(const SkDCubic& cubic, double precision, SkTArray<SkDQuad, true>& quads);
|
|
bool ValidBounds(const SkPathOpsBounds&);
|
|
bool ValidCubic(const SkDCubic& cubic);
|
|
bool ValidLine(const SkDLine& line);
|
|
bool ValidPoint(const SkDPoint& pt);
|
|
bool ValidPoints(const SkPoint* pts, int count);
|
|
bool ValidQuad(const SkDQuad& quad);
|
|
bool ValidTriangle(const SkDTriangle& triangle);
|
|
bool ValidVector(const SkDVector& v);
|
|
|
|
#endif
|