Revert "[includes] Remove include link between SkPathRef.h and SkRRect.h"

This reverts commit 37b8239bec.

Reason for revert: Need to update clients, including Flutter

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: I226c45326b67dff3eb1dc1f96c11e9ef0a12e22b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/512639
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
This commit is contained in:
Kevin Lubick 2022-02-24 12:49:50 +00:00
parent 74b244c06e
commit 32b1e5d861
14 changed files with 16 additions and 30 deletions

View File

@ -6,7 +6,6 @@
*/
#include "bench/Benchmark.h"
#include "include/core/SkRRect.h"
#include "include/core/SkRect.h"
#include "include/utils/SkRandom.h"
#include "src/core/SkGeometry.h"

View File

@ -8,7 +8,6 @@
#include "include/core/SkCanvas.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPath.h"
#include "include/core/SkRRect.h"
#include "include/utils/SkShadowUtils.h"
#include "src/core/SkDrawShadowInfo.h"

View File

@ -14,7 +14,6 @@
#include "include/core/SkFontTypes.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPathBuilder.h"
#include "include/core/SkRRect.h"
#include "include/core/SkRect.h"
#include "include/core/SkScalar.h"
#include "include/core/SkSize.h"

View File

@ -11,7 +11,6 @@
#include "include/core/SkMatrix.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPathBuilder.h"
#include "include/core/SkRRect.h"
#include "include/core/SkRect.h"
#include "include/core/SkScalar.h"
#include "include/core/SkSize.h"

View File

@ -10,7 +10,6 @@
#include "include/core/SkColor.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPathBuilder.h"
#include "include/core/SkRRect.h"
#include "include/core/SkRect.h"
#include "include/core/SkScalar.h"
#include "include/core/SkSize.h"

View File

@ -10,6 +10,7 @@
#include "include/core/SkMatrix.h"
#include "include/core/SkPoint.h"
#include "include/core/SkRRect.h"
#include "include/core/SkRect.h"
#include "include/core/SkRefCnt.h"
#include "include/private/SkIDChangeListener.h"
@ -24,7 +25,6 @@
class SkRBuffer;
class SkWBuffer;
class SkRRect;
enum class SkPathConvexity {
kConvex,
@ -246,7 +246,21 @@ public:
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 {
return !fBoundsIsDirty;

View File

@ -8,7 +8,6 @@
#include <tuple>
#include "include/core/SkCanvas.h"
#include "include/core/SkRRect.h"
#include "include/core/SkRect.h"
#include "modules/svg/include/SkSVGRect.h"
#include "modules/svg/include/SkSVGRenderContext.h"

View File

@ -10,7 +10,6 @@
#include "include/core/SkFont.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPathBuilder.h"
#include "include/core/SkRRect.h"
#include "include/utils/SkRandom.h"
#include "samplecode/Sample.h"
#include "src/core/SkPathPriv.h"

View File

@ -9,7 +9,6 @@
#include "include/core/SkImage.h"
#include "include/core/SkPath.h"
#include "include/core/SkPoint3.h"
#include "include/core/SkRRect.h"
#include "include/utils/SkShadowUtils.h"
#include "samplecode/Sample.h"
#include "tools/Resources.h"

View File

@ -8,7 +8,6 @@
#include "include/private/SkPathRef.h"
#include "include/core/SkPath.h"
#include "include/core/SkRRect.h"
#include "include/private/SkNx.h"
#include "include/private/SkOnce.h"
#include "include/private/SkTo.h"
@ -542,21 +541,6 @@ SkRRect SkPathRef::getRRect() const {
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() {

View File

@ -16,7 +16,6 @@
#include "include/core/SkImage.h"
#include "include/core/SkPicture.h"
#include "include/core/SkPictureRecorder.h"
#include "include/core/SkRRect.h"
#include "include/core/SkString.h"
#include "include/core/SkSurface.h"
#include "include/core/SkTextBlob.h"

View File

@ -7,7 +7,6 @@
#include "include/core/SkPathBuilder.h"
#include "include/core/SkPathTypes.h"
#include "include/core/SkRRect.h"
#include "src/core/SkPathPriv.h"
#include "tests/Test.h"

View File

@ -6,7 +6,6 @@
*/
#include "include/core/SkPath.h"
#include "include/core/SkRRect.h"
#include "include/core/SkRegion.h"
#include "include/utils/SkRandom.h"
#include "src/core/SkAutoMalloc.h"

View File

@ -7,7 +7,6 @@
#include "include/core/SkCanvas.h"
#include "include/core/SkPath.h"
#include "include/core/SkRRect.h"
#include "include/core/SkVertices.h"
#include "include/utils/SkShadowUtils.h"
#include "src/core/SkDrawShadowInfo.h"