Remove setAddressWindow change for ESP32

Corner case caused missed graphics.
This commit is contained in:
Bodmer
2018-11-16 00:54:51 +00:00
parent 7a3d6bcab9
commit ac7a229301
2 changed files with 15 additions and 32 deletions

View File

@@ -185,8 +185,8 @@ TFT_eSPI::TFT_eSPI(int16_t w, int16_t h)
_booted = true; _booted = true;
ys_row = ye_row = addr_row = 0xFFFF; addr_row = 0xFFFF;
xs_col = xe_col = addr_col = 0xFFFF; addr_col = 0xFFFF;
#ifdef LOAD_GLCD #ifdef LOAD_GLCD
fontsloaded = 0x0002; // Bit 1 set fontsloaded = 0x0002; // Bit 1 set
@@ -2689,11 +2689,6 @@ void TFT_eSPI::setAddrWindow(int32_t x0, int32_t y0, int32_t x1, int32_t y1)
CS_L_DC_C; CS_L_DC_C;
// No need to send x if it has not changed (small speed-up of complex transparent Sprites and bitmaps)
// Nb: caller must fill the set address area so that setting same area again will fill from xs, ys
if (xs_col != x0 || xe_col != x1) {
// Column addr set
tft_Write_8(TFT_CASET); tft_Write_8(TFT_CASET);
DC_D; DC_D;
@@ -2706,11 +2701,6 @@ void TFT_eSPI::setAddrWindow(int32_t x0, int32_t y0, int32_t x1, int32_t y1)
#endif #endif
DC_C; DC_C;
xs_col = x0; xe_col = x1;
}
// No need to send y if it has not changed
if (ys_row != y0 || ye_row != y1) {
// Row addr set // Row addr set
tft_Write_8(TFT_PASET); tft_Write_8(TFT_PASET);
@@ -2725,8 +2715,6 @@ void TFT_eSPI::setAddrWindow(int32_t x0, int32_t y0, int32_t x1, int32_t y1)
#endif #endif
DC_C; DC_C;
ys_row = y0; ye_row = y1;
}
// write to RAM // write to RAM
tft_Write_8(TFT_RAMWR); tft_Write_8(TFT_RAMWR);
@@ -3074,8 +3062,6 @@ void TFT_eSPI::drawPixel(uint32_t x, uint32_t y, uint32_t color)
DC_C; DC_C;
addr_col = x; addr_col = x;
xs_col = xe_col = x;
} }
// No need to send y if it has not changed (speeds things up) // No need to send y if it has not changed (speeds things up)
@@ -3095,7 +3081,6 @@ void TFT_eSPI::drawPixel(uint32_t x, uint32_t y, uint32_t color)
DC_C; DC_C;
addr_row = y; addr_row = y;
ys_row = ye_row = y;
} }

View File

@@ -784,8 +784,6 @@ class TFT_eSPI : public Print {
uint32_t _init_width, _init_height; // Display w/h as input, used by setRotation() uint32_t _init_width, _init_height; // Display w/h as input, used by setRotation()
uint32_t _width, _height; // Display w/h as modified by current rotation uint32_t _width, _height; // Display w/h as modified by current rotation
uint32_t addr_row, addr_col; uint32_t addr_row, addr_col;
uint32_t xs_col, xe_col;
uint32_t ys_row, ye_row;
uint32_t fontsloaded; uint32_t fontsloaded;