use of com.bumptech.glide.test.CanonicalBitmap in project glide by bumptech.
the class FitCenterRegressionTest method setUp.
@Before
public void setUp() {
context = InstrumentationRegistry.getTargetContext();
bitmapRegressionTester = new BitmapRegressionTester(getClass(), testName);
canonical = new CanonicalBitmap();
}
use of com.bumptech.glide.test.CanonicalBitmap in project glide by bumptech.
the class CenterInsideRegressionTest method setUp.
@Before
public void setUp() {
context = InstrumentationRegistry.getTargetContext();
bitmapRegressionTester = new BitmapRegressionTester(getClass(), testName);
canonical = new CanonicalBitmap();
}
use of com.bumptech.glide.test.CanonicalBitmap in project glide by bumptech.
the class RoundedCornersRegressionTest method testRoundedCorners_usePool.
@Test
public void testRoundedCorners_usePool() throws ExecutionException, InterruptedException {
canonicalBitmap = canonicalBitmap.scale(0.1f);
Bitmap redRect = createRect(Color.RED, canonicalBitmap.getWidth(), canonicalBitmap.getHeight(), Bitmap.Config.ARGB_8888);
Glide.get(context).getBitmapPool().put(redRect);
Bitmap roundedRect = bitmapRegressionTester.test(GlideApp.with(context).asBitmap().load(canonicalBitmap.getBitmap()).override(canonicalBitmap.getWidth(), canonicalBitmap.getHeight()).transform(new RoundedCorners(5)));
assertThat(roundedRect).isEqualTo(redRect);
}
use of com.bumptech.glide.test.CanonicalBitmap in project glide by bumptech.
the class RoundedCornersRegressionTest method setUp.
@Before
public void setUp() throws Exception {
context = InstrumentationRegistry.getTargetContext();
bitmapRegressionTester = new BitmapRegressionTester(getClass(), testName);
canonicalBitmap = new CanonicalBitmap();
}
use of com.bumptech.glide.test.CanonicalBitmap in project glide by bumptech.
the class CenterCropRegressionTest method setUp.
@Before
public void setUp() {
context = InstrumentationRegistry.getTargetContext();
bitmapRegressionTester = new BitmapRegressionTester(getClass(), testName);
canonical = new CanonicalBitmap();
}
Aggregations