Reland "[includes] Remove include link between SkPathRef.h and SkRRect.h"
This is a reland of 37b8239bec
Upstack changes:
- http://ag/17004908
- https://github.com/flutter/engine/pull/31654
Original change's description:
> [includes] Remove include link between SkPathRef.h and SkRRect.h
>
> According to go/chrome-includes [1], this will save about
> 40MB (0.02%) off the Chrome build. http://screen/4GnPjFaYpwCVHVL
>
> I'm not quite sure why the link is so expensive, but we can
> forward declare it and move the implementation from the .h
> to the .cpp file easily enough.
>
> [1] https://commondatastorage.googleapis.com/chromium-browser-clang/include-analysis.html#view=edges&filter=%5Ethird_party%2Fskia%2Finclude%2Fprivate%2FSkPathRef%5C.h%24&sort=includes&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fprivate%2FSkPathRef%5C.h%24&included=&limit=1000
>
> Canary-Chromium-CL: 3485346
> Change-Id: Ie3a5e7a735426f883a6c06ddbd3b8bf148bf1709
> Bug: 242216
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512158
> Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: 242216
Change-Id: I31288895528251fd59913427b95b9f88a871d14b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512776
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
parent
9f67845661
commit
2d86f6f5db
@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "bench/Benchmark.h"
|
#include "bench/Benchmark.h"
|
||||||
|
#include "include/core/SkRRect.h"
|
||||||
#include "include/core/SkRect.h"
|
#include "include/core/SkRect.h"
|
||||||
#include "include/utils/SkRandom.h"
|
#include "include/utils/SkRandom.h"
|
||||||
#include "src/core/SkGeometry.h"
|
#include "src/core/SkGeometry.h"
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include "include/core/SkCanvas.h"
|
#include "include/core/SkCanvas.h"
|
||||||
#include "include/core/SkPaint.h"
|
#include "include/core/SkPaint.h"
|
||||||
#include "include/core/SkPath.h"
|
#include "include/core/SkPath.h"
|
||||||
|
#include "include/core/SkRRect.h"
|
||||||
#include "include/utils/SkShadowUtils.h"
|
#include "include/utils/SkShadowUtils.h"
|
||||||
#include "src/core/SkDrawShadowInfo.h"
|
#include "src/core/SkDrawShadowInfo.h"
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include "include/core/SkFontTypes.h"
|
#include "include/core/SkFontTypes.h"
|
||||||
#include "include/core/SkPaint.h"
|
#include "include/core/SkPaint.h"
|
||||||
#include "include/core/SkPathBuilder.h"
|
#include "include/core/SkPathBuilder.h"
|
||||||
|
#include "include/core/SkRRect.h"
|
||||||
#include "include/core/SkRect.h"
|
#include "include/core/SkRect.h"
|
||||||
#include "include/core/SkScalar.h"
|
#include "include/core/SkScalar.h"
|
||||||
#include "include/core/SkSize.h"
|
#include "include/core/SkSize.h"
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "include/core/SkMatrix.h"
|
#include "include/core/SkMatrix.h"
|
||||||
#include "include/core/SkPaint.h"
|
#include "include/core/SkPaint.h"
|
||||||
#include "include/core/SkPathBuilder.h"
|
#include "include/core/SkPathBuilder.h"
|
||||||
|
#include "include/core/SkRRect.h"
|
||||||
#include "include/core/SkRect.h"
|
#include "include/core/SkRect.h"
|
||||||
#include "include/core/SkScalar.h"
|
#include "include/core/SkScalar.h"
|
||||||
#include "include/core/SkSize.h"
|
#include "include/core/SkSize.h"
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "include/core/SkColor.h"
|
#include "include/core/SkColor.h"
|
||||||
#include "include/core/SkPaint.h"
|
#include "include/core/SkPaint.h"
|
||||||
#include "include/core/SkPathBuilder.h"
|
#include "include/core/SkPathBuilder.h"
|
||||||
|
#include "include/core/SkRRect.h"
|
||||||
#include "include/core/SkRect.h"
|
#include "include/core/SkRect.h"
|
||||||
#include "include/core/SkScalar.h"
|
#include "include/core/SkScalar.h"
|
||||||
#include "include/core/SkSize.h"
|
#include "include/core/SkSize.h"
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
#include "include/core/SkMatrix.h"
|
#include "include/core/SkMatrix.h"
|
||||||
#include "include/core/SkPoint.h"
|
#include "include/core/SkPoint.h"
|
||||||
#include "include/core/SkRRect.h"
|
|
||||||
#include "include/core/SkRect.h"
|
#include "include/core/SkRect.h"
|
||||||
#include "include/core/SkRefCnt.h"
|
#include "include/core/SkRefCnt.h"
|
||||||
#include "include/private/SkIDChangeListener.h"
|
#include "include/private/SkIDChangeListener.h"
|
||||||
@ -25,6 +24,7 @@
|
|||||||
|
|
||||||
class SkRBuffer;
|
class SkRBuffer;
|
||||||
class SkWBuffer;
|
class SkWBuffer;
|
||||||
|
class SkRRect;
|
||||||
|
|
||||||
enum class SkPathConvexity {
|
enum class SkPathConvexity {
|
||||||
kConvex,
|
kConvex,
|
||||||
@ -246,21 +246,7 @@ public:
|
|||||||
return SkToBool(fIsOval);
|
return SkToBool(fIsOval);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isRRect(SkRRect* rrect, bool* isCCW, unsigned* start) const {
|
bool isRRect(SkRRect* rrect, bool* isCCW, unsigned* start) const;
|
||||||
if (fIsRRect) {
|
|
||||||
if (rrect) {
|
|
||||||
*rrect = this->getRRect();
|
|
||||||
}
|
|
||||||
if (isCCW) {
|
|
||||||
*isCCW = SkToBool(fRRectOrOvalIsCCW);
|
|
||||||
}
|
|
||||||
if (start) {
|
|
||||||
*start = fRRectOrOvalStartIdx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return SkToBool(fIsRRect);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool hasComputedBounds() const {
|
bool hasComputedBounds() const {
|
||||||
return !fBoundsIsDirty;
|
return !fBoundsIsDirty;
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include <tuple>
|
#include <tuple>
|
||||||
|
|
||||||
#include "include/core/SkCanvas.h"
|
#include "include/core/SkCanvas.h"
|
||||||
|
#include "include/core/SkRRect.h"
|
||||||
#include "include/core/SkRect.h"
|
#include "include/core/SkRect.h"
|
||||||
#include "modules/svg/include/SkSVGRect.h"
|
#include "modules/svg/include/SkSVGRect.h"
|
||||||
#include "modules/svg/include/SkSVGRenderContext.h"
|
#include "modules/svg/include/SkSVGRenderContext.h"
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "include/core/SkFont.h"
|
#include "include/core/SkFont.h"
|
||||||
#include "include/core/SkPaint.h"
|
#include "include/core/SkPaint.h"
|
||||||
#include "include/core/SkPathBuilder.h"
|
#include "include/core/SkPathBuilder.h"
|
||||||
|
#include "include/core/SkRRect.h"
|
||||||
#include "include/utils/SkRandom.h"
|
#include "include/utils/SkRandom.h"
|
||||||
#include "samplecode/Sample.h"
|
#include "samplecode/Sample.h"
|
||||||
#include "src/core/SkPathPriv.h"
|
#include "src/core/SkPathPriv.h"
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include "include/core/SkImage.h"
|
#include "include/core/SkImage.h"
|
||||||
#include "include/core/SkPath.h"
|
#include "include/core/SkPath.h"
|
||||||
#include "include/core/SkPoint3.h"
|
#include "include/core/SkPoint3.h"
|
||||||
|
#include "include/core/SkRRect.h"
|
||||||
#include "include/utils/SkShadowUtils.h"
|
#include "include/utils/SkShadowUtils.h"
|
||||||
#include "samplecode/Sample.h"
|
#include "samplecode/Sample.h"
|
||||||
#include "tools/Resources.h"
|
#include "tools/Resources.h"
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include "include/private/SkPathRef.h"
|
#include "include/private/SkPathRef.h"
|
||||||
|
|
||||||
#include "include/core/SkPath.h"
|
#include "include/core/SkPath.h"
|
||||||
|
#include "include/core/SkRRect.h"
|
||||||
#include "include/private/SkNx.h"
|
#include "include/private/SkNx.h"
|
||||||
#include "include/private/SkOnce.h"
|
#include "include/private/SkOnce.h"
|
||||||
#include "include/private/SkTo.h"
|
#include "include/private/SkTo.h"
|
||||||
@ -541,6 +542,21 @@ SkRRect SkPathRef::getRRect() const {
|
|||||||
return rrect;
|
return rrect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SkPathRef::isRRect(SkRRect* rrect, bool* isCCW, unsigned* start) const {
|
||||||
|
if (fIsRRect) {
|
||||||
|
if (rrect) {
|
||||||
|
*rrect = this->getRRect();
|
||||||
|
}
|
||||||
|
if (isCCW) {
|
||||||
|
*isCCW = SkToBool(fRRectOrOvalIsCCW);
|
||||||
|
}
|
||||||
|
if (start) {
|
||||||
|
*start = fRRectOrOvalStartIdx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return SkToBool(fIsRRect);
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
SkPathRef::Iter::Iter() {
|
SkPathRef::Iter::Iter() {
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#include "include/core/SkImage.h"
|
#include "include/core/SkImage.h"
|
||||||
#include "include/core/SkPicture.h"
|
#include "include/core/SkPicture.h"
|
||||||
#include "include/core/SkPictureRecorder.h"
|
#include "include/core/SkPictureRecorder.h"
|
||||||
|
#include "include/core/SkRRect.h"
|
||||||
#include "include/core/SkString.h"
|
#include "include/core/SkString.h"
|
||||||
#include "include/core/SkSurface.h"
|
#include "include/core/SkSurface.h"
|
||||||
#include "include/core/SkTextBlob.h"
|
#include "include/core/SkTextBlob.h"
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include "include/core/SkPathBuilder.h"
|
#include "include/core/SkPathBuilder.h"
|
||||||
#include "include/core/SkPathTypes.h"
|
#include "include/core/SkPathTypes.h"
|
||||||
|
#include "include/core/SkRRect.h"
|
||||||
#include "src/core/SkPathPriv.h"
|
#include "src/core/SkPathPriv.h"
|
||||||
#include "tests/Test.h"
|
#include "tests/Test.h"
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "include/core/SkPath.h"
|
#include "include/core/SkPath.h"
|
||||||
|
#include "include/core/SkRRect.h"
|
||||||
#include "include/core/SkRegion.h"
|
#include "include/core/SkRegion.h"
|
||||||
#include "include/utils/SkRandom.h"
|
#include "include/utils/SkRandom.h"
|
||||||
#include "src/core/SkAutoMalloc.h"
|
#include "src/core/SkAutoMalloc.h"
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include "include/core/SkCanvas.h"
|
#include "include/core/SkCanvas.h"
|
||||||
#include "include/core/SkPath.h"
|
#include "include/core/SkPath.h"
|
||||||
|
#include "include/core/SkRRect.h"
|
||||||
#include "include/core/SkVertices.h"
|
#include "include/core/SkVertices.h"
|
||||||
#include "include/utils/SkShadowUtils.h"
|
#include "include/utils/SkShadowUtils.h"
|
||||||
#include "src/core/SkDrawShadowInfo.h"
|
#include "src/core/SkDrawShadowInfo.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user