Commit 190028d3 by Olli Etuaho Committed by Commit Bot

Clean up specifying colors and texture scale in MipmapTest

Remove unnecessary scale parameter from MipmapTestES3, and use the GLColor class and EXPECT_PIXEL_COLOR_EQ instead of EXPECT_PIXEL_EQ for greater readability. BUG=angleproject:596 TEST=angle_end2end_tests Change-Id: I79c30ce85be5d554d89197f8f1ce7ab0c51c11b6 Reviewed-on: https://chromium-review.googlesource.com/344513Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
parent de44d3a4
......@@ -20,6 +20,7 @@ const GLColor GLColor::green = GLColor(0u, 255u, 0u, 255u);
const GLColor GLColor::blue = GLColor(0u, 0u, 255u, 255u);
const GLColor GLColor::cyan = GLColor(0u, 255u, 255u, 255u);
const GLColor GLColor::black = GLColor(0u, 0u, 0u, 255u);
const GLColor GLColor::white = GLColor(255u, 255u, 255u, 255u);
namespace
{
......
......@@ -58,6 +58,7 @@ struct GLColor
static const GLColor blue;
static const GLColor cyan;
static const GLColor black;
static const GLColor white;
};
// Useful to cast any type to GLubyte.
......@@ -72,18 +73,6 @@ bool operator==(const GLColor &a, const GLColor &b);
std::ostream &operator<<(std::ostream &ostream, const GLColor &color);
GLColor ReadColor(GLint x, GLint y);
template <typename T>
void FillWithRGBA(size_t pixelCount, T red, T green, T blue, T alpha, T *outArray)
{
for (size_t i = 0u; i < pixelCount; ++i)
{
outArray[i * 4u] = red;
outArray[i * 4u + 1u] = green;
outArray[i * 4u + 2u] = blue;
outArray[i * 4u + 3u] = alpha;
}
}
} // namespace angle
#define EXPECT_PIXEL_EQ(x, y, r, g, b, a) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment