Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8296589: PixelBufferDrawTest fails on some systems
Reviewed-by: kcr, angorya
  • Loading branch information
lukostyra authored and kevinrushforth committed Nov 14, 2022
1 parent 7dc284d commit 0ee116d
Showing 1 changed file with 6 additions and 5 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -186,10 +186,11 @@ private ImageView createImageViewPB(PixelBuffer<? extends Buffer> pixelBuffer) {
}

private void compareColor(Color exp, Color act) {
Assert.assertEquals(exp.getRed(), act.getRed(), 0.005);
Assert.assertEquals(exp.getBlue(), act.getBlue(), 0.005);
Assert.assertEquals(exp.getGreen(), act.getGreen(), 0.005);
Assert.assertEquals(exp.getOpacity(), act.getOpacity(), 0.005);
final double COMPARE_DELTA = 0.01;
Assert.assertEquals(exp.getRed(), act.getRed(), COMPARE_DELTA);
Assert.assertEquals(exp.getBlue(), act.getBlue(), COMPARE_DELTA);
Assert.assertEquals(exp.getGreen(), act.getGreen(), COMPARE_DELTA);
Assert.assertEquals(exp.getOpacity(), act.getOpacity(), COMPARE_DELTA);
}

private void verifyColor(Color color1, Color color2) {
Expand Down

1 comment on commit 0ee116d

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.