mirror of
https://github.com/esphome/esphome.git
synced 2026-10-16 19:22:49 +00:00
Keep the byte order flag as given, 888 ignores it everywhere now
This commit is contained in:
@@ -298,7 +298,7 @@ Image::Image(const uint8_t *data_start, int width, int height, ImageType type, T
|
||||
type_(type),
|
||||
data_start_(data_start),
|
||||
transparency_(transparency),
|
||||
big_endian_(big_endian && type == IMAGE_TYPE_RGB565) {
|
||||
big_endian_(big_endian) {
|
||||
switch (this->type_) {
|
||||
case IMAGE_TYPE_BINARY:
|
||||
this->bpp_ = 1;
|
||||
|
||||
@@ -96,12 +96,11 @@ TEST(ImageDraw, BigEndianRgb565IsPassedThrough) {
|
||||
|
||||
TEST(ImageDraw, OpaqueRgbIsOneBulkCall) {
|
||||
const auto data = make_data(3);
|
||||
Image image(data.data(), W, H, IMAGE_TYPE_RGB, TRANSPARENCY_OPAQUE, true); // byte order only applies to 565
|
||||
Image image(data.data(), W, H, IMAGE_TYPE_RGB, TRANSPARENCY_OPAQUE);
|
||||
RecordingDisplay display;
|
||||
image.draw(0, 0, &display, Color::WHITE, Color::BLACK);
|
||||
ASSERT_EQ(display.blits.size(), 1u);
|
||||
EXPECT_EQ(display.blits[0].bitness, display::COLOR_BITNESS_888);
|
||||
EXPECT_FALSE(display.blits[0].big_endian);
|
||||
}
|
||||
|
||||
TEST(ImageDraw, ClippingShrinksTheWindow) {
|
||||
|
||||
Reference in New Issue
Block a user