move largest apis into private
Related to https://skia-review.googlesource.com/c/skia/+/91860
Bug: skia:
Change-Id: Ia8fd981b422bbab75541b078277d2e09e1fc9d41
Reviewed-on: https://skia-review.googlesource.com/91940
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/tests/LazyProxyTest.cpp b/tests/LazyProxyTest.cpp
index 8a620b6..a5cda4e 100644
--- a/tests/LazyProxyTest.cpp
+++ b/tests/LazyProxyTest.cpp
@@ -19,6 +19,7 @@
#include "GrTextureProxy.h"
#include "GrTextureProxyPriv.h"
#include "SkMakeUnique.h"
+#include "SkRectPriv.h"
#include "mock/GrMockTypes.h"
// This test verifies that lazy proxy callbacks get invoked during flush, after onFlush callbacks,
@@ -71,7 +72,7 @@
return texture;
}
}, GrSurfaceProxy::Renderable::kNo, kRGB_565_GrPixelConfig);
- this->setBounds(SkRect::MakeLargest(), GrOp::HasAABloat::kNo, GrOp::IsZeroArea::kNo);
+ this->setBounds(SkRectPriv::MakeLargest(), GrOp::HasAABloat::kNo, GrOp::IsZeroArea::kNo);
}
void visitProxies(const VisitProxyFunc& func) const override {
diff --git a/tests/PictureBBHTest.cpp b/tests/PictureBBHTest.cpp
index 0bc81c2..6a4cd83 100644
--- a/tests/PictureBBHTest.cpp
+++ b/tests/PictureBBHTest.cpp
@@ -11,6 +11,7 @@
#include "SkPaint.h"
#include "SkPicture.h"
#include "SkPictureRecorder.h"
+#include "SkRectPriv.h"
#include "Test.h"
@@ -98,7 +99,7 @@
// used to fall into an infinite loop.
SkRTreeFactory factory;
- std::unique_ptr<SkBBoxHierarchy> bbh{ factory(SkRect::MakeLargest()) };
+ std::unique_ptr<SkBBoxHierarchy> bbh{ factory(SkRectPriv::MakeLargest()) };
SkRect rects[] = { {0,0, 10,10}, {5,5,15,15} };
bbh->insert(rects, SK_ARRAY_COUNT(rects));
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index 9ecb082..714338f 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -17,11 +17,12 @@
#include "SkImageEncoder.h"
#include "SkImageGenerator.h"
#include "SkMD5.h"
+#include "SkMiniRecorder.h"
#include "SkPaint.h"
#include "SkPicture.h"
#include "SkPictureRecorder.h"
#include "SkPixelRef.h"
-#include "SkMiniRecorder.h"
+#include "SkRectPriv.h"
#include "SkRRect.h"
#include "SkRandom.h"
#include "SkRecord.h"
@@ -784,32 +785,32 @@
SkRTreeFactory factory;
SkPictureRecorder recorder;
- auto canvas = recorder.beginRecording(SkRect::MakeLargest(), &factory);
+ auto canvas = recorder.beginRecording(SkRectPriv::MakeLargest(), &factory);
canvas->drawRect(SkRect::MakeWH(20,20), SkPaint{});
auto pic = recorder.finishRecordingAsPicture();
REPORTER_ASSERT(r, pic->cullRect() == SkRect::MakeWH(20,20));
- canvas = recorder.beginRecording(SkRect::MakeLargest());
+ canvas = recorder.beginRecording(SkRectPriv::MakeLargest());
canvas->drawRect(SkRect::MakeWH(20,20), SkPaint{});
pic = recorder.finishRecordingAsPicture();
- REPORTER_ASSERT(r, pic->cullRect() == SkRect::MakeLargest());
+ REPORTER_ASSERT(r, pic->cullRect() == SkRectPriv::MakeLargest());
}
DEF_TEST(Picture_UpdatedCull_2, r) {
// Testing >1 draw exercises SkBigPicture.
SkRTreeFactory factory;
SkPictureRecorder recorder;
- auto canvas = recorder.beginRecording(SkRect::MakeLargest(), &factory);
+ auto canvas = recorder.beginRecording(SkRectPriv::MakeLargest(), &factory);
canvas->drawRect(SkRect::MakeWH(20,20), SkPaint{});
canvas->drawRect(SkRect::MakeWH(10,40), SkPaint{});
auto pic = recorder.finishRecordingAsPicture();
REPORTER_ASSERT(r, pic->cullRect() == SkRect::MakeWH(20,40));
- canvas = recorder.beginRecording(SkRect::MakeLargest());
+ canvas = recorder.beginRecording(SkRectPriv::MakeLargest());
canvas->drawRect(SkRect::MakeWH(20,20), SkPaint{});
canvas->drawRect(SkRect::MakeWH(10,40), SkPaint{});
pic = recorder.finishRecordingAsPicture();
- REPORTER_ASSERT(r, pic->cullRect() == SkRect::MakeLargest());
+ REPORTER_ASSERT(r, pic->cullRect() == SkRectPriv::MakeLargest());
}
DEF_TEST(Picture_RecordsFlush, r) {
diff --git a/tests/SGTest.cpp b/tests/SGTest.cpp
index d51f70b..b0101bc 100644
--- a/tests/SGTest.cpp
+++ b/tests/SGTest.cpp
@@ -6,6 +6,7 @@
*/
#include "SkRect.h"
+#include "SkRectPriv.h"
#if !defined(SK_BUILD_FOR_GOOGLE3)
@@ -67,7 +68,7 @@
// Initial revalidation.
check_inval(reporter, root,
SkRect::MakeWH(100, 100),
- SkRect::MakeLargestS32(),
+ SkRectPriv::MakeLargestS32(),
nullptr);
}
@@ -137,7 +138,7 @@
// Initial revalidation.
check_inval(reporter, root,
SkRect::MakeWH(100, 100),
- SkRect::MakeLargestS32(),
+ SkRectPriv::MakeLargestS32(),
nullptr);
}
diff --git a/tests/WindowRectanglesTest.cpp b/tests/WindowRectanglesTest.cpp
index e954565..84fdca2 100644
--- a/tests/WindowRectanglesTest.cpp
+++ b/tests/WindowRectanglesTest.cpp
@@ -11,6 +11,7 @@
#if SK_SUPPORT_GPU
#include "GrWindowRectangles.h"
+#include "SkRectPriv.h"
static SkIRect next_irect(SkRandom& r) {
return {r.nextS(), r.nextS(), r.nextS(), r.nextS()};
@@ -47,7 +48,7 @@
REPORTER_ASSERT(reporter, B.data() != A.data());
REPORTER_ASSERT(reporter, B != A);
- B.addWindow(SkIRect::MakeLargest());
+ B.addWindow(SkRectPriv::MakeILargest());
REPORTER_ASSERT(reporter, B != A);
REPORTER_ASSERT(reporter, !memcmp(A.data(), windowData,
@@ -55,7 +56,7 @@
REPORTER_ASSERT(reporter, !memcmp(B.data(), windowData,
(GrWindowRectangles::kMaxWindows - 1) * sizeof(SkIRect)));
REPORTER_ASSERT(reporter,
- B.data()[GrWindowRectangles::kMaxWindows - 1] == SkIRect::MakeLargest());
+ B.data()[GrWindowRectangles::kMaxWindows - 1] == SkRectPriv::MakeILargest());
}
{
GrWindowRectangles A(wr), B(wr);