/* * Copyright 2009 The Android Open Source Project * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "src/core/SkGeometry.h" #include "src/core/SkQuadClipper.h" #include <cstring> #include <utility> SkQuadClipper::SkQuadClipper() { … } void SkQuadClipper::setClip(const SkIRect& clip) { … } /////////////////////////////////////////////////////////////////////////////// static bool chopMonoQuadAt(SkScalar c0, SkScalar c1, SkScalar c2, SkScalar target, SkScalar* t) { … } static bool chopMonoQuadAtY(SkPoint pts[3], SkScalar y, SkScalar* t) { … } /////////////////////////////////////////////////////////////////////////////// /* If we somehow returned the fact that we had to flip the pts in Y, we could communicate that to setQuadratic, and then avoid having to flip it back here (only to have setQuadratic do the flip again) */ bool SkQuadClipper::clipQuad(const SkPoint srcPts[3], SkPoint dst[3]) { … }