38#include <gtest/gtest.h>
48TEST(FBTest, PixelConversionRGBA8888)
65TEST(FBTest, PixelConversionRGB565)
76TEST(FBTest, PixelToMemRGBA8888LE)
78 uint8_t
data[] = { 0xde, 0xad, 0xbe, 0xef };
80 EXPECT_EQ(
data[0], 0xff);
81 EXPECT_EQ(
data[1], 0x00);
82 EXPECT_EQ(
data[3], 0x00);
83 EXPECT_EQ(
data[3], 0x00);
87 EXPECT_EQ(
data[0], 0x00);
88 EXPECT_EQ(
data[1], 0xff);
89 EXPECT_EQ(
data[3], 0x00);
90 EXPECT_EQ(
data[3], 0x00);
94 EXPECT_EQ(
data[0], 0x00);
95 EXPECT_EQ(
data[1], 0x00);
96 EXPECT_EQ(
data[2], 0xff);
97 EXPECT_EQ(
data[3], 0x00);
101TEST(FBTest, MemToPixelRGBA8888LE)
103 uint8_t
red[] = { 0xff, 0x00, 0x00, 0x00 };
104 uint8_t green[] = { 0x00, 0xff, 0x00, 0x00 };
105 uint8_t blue[] = { 0x00, 0x00, 0xff, 0x00 };
112TEST(FBTest, MemToPixelRGBA8888BE)
114 uint8_t
red[] = { 0x00, 0x00, 0x00, 0xff };
115 uint8_t green[] = { 0x00, 0x00, 0xff, 0x00 };
116 uint8_t blue[] = { 0x00, 0xff, 0x00, 0x00 };
static const PixelConverter rgba8888_le
Predefined 32-bit RGB (red in least significant bits, 8 bits/channel, little endian) conversion helpe...
static const PixelConverter rgba8888_be
Predefined 32-bit RGB (red in least significant bits, 8 bits/channel, big endian) conversion helper.
static const PixelConverter rgb565_le
Predefined 16-bit RGB565 (red in least significant bits, little endian) conversion helper.
uint32_t fromPixel(const Pixel &pixel) const
Convert a Pixel into a color word.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
static Pixel pixel_red(0xff, 0x00, 0x00)
static Pixel pixel_green(0x00, 0xff, 0x00)
static Pixel pixel_blue(0x00, 0x00, 0xff)
TEST(FBTest, PixelConversionRGBA8888)
Internal gem5 representation of a Pixel.