aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-01-08 15:05:02 -0500
committerGravatar Mike Reed <reed@google.com>2018-01-08 20:42:27 +0000
commit274218ef0173ff6046f2258c703c1c83ea37c02f (patch)
tree5d0077217a7b3e42a6fcacb8a12e95a6323746a9 /tests
parent7ff6ca525454e9dfbabbec2f6bf66d6b290ac195 (diff)
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/LazyProxyTest.cpp3
-rw-r--r--tests/PictureBBHTest.cpp3
-rw-r--r--tests/PictureTest.cpp15
-rw-r--r--tests/SGTest.cpp5
-rw-r--r--tests/WindowRectanglesTest.cpp5
5 files changed, 18 insertions, 13 deletions
diff --git a/tests/LazyProxyTest.cpp b/tests/LazyProxyTest.cpp
index 8a620b6a38..a5cda4edcf 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 @@ public:
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 0bc81c2934..6a4cd830c8 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 @@ DEF_TEST(RTreeMakeLargest, r) {
// 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 9ecb08224e..714338f9d1 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 @@ DEF_TEST(Picture_UpdatedCull_1, r) {
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 d51f70be59..b0101bc034 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 @@ static void inval_test1(skiatest::Reporter* reporter) {
// Initial revalidation.
check_inval(reporter, root,
SkRect::MakeWH(100, 100),
- SkRect::MakeLargestS32(),
+ SkRectPriv::MakeLargestS32(),
nullptr);
}
@@ -137,7 +138,7 @@ static void inval_test2(skiatest::Reporter* reporter) {
// 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 e9545651af..84fdca2237 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 @@ DEF_TEST(WindowRectangles, reporter) {
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 @@ DEF_TEST(WindowRectangles, reporter) {
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);