Update etc1.cpp.
I don't think our version actually has any issues since we added the else to 0 out r2,g2, and b2. But this just updates it to look more like other updates to etc1 outside skia. Bug: chromium:1153993 Change-Id: I78e0b7cdd00fc9f03a2857f3d1b3502a1131a0f7 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344956 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
This commit is contained in:
parent
6eca5793b4
commit
04cf690185
7
third_party/etc1/etc1.cpp
vendored
7
third_party/etc1/etc1.cpp
vendored
@ -386,7 +386,7 @@ static void etc_encodeBaseColors(etc1_byte* pBaseColors,
|
|||||||
const etc1_byte* pColors, etc_compressed* pCompressed) {
|
const etc1_byte* pColors, etc_compressed* pCompressed) {
|
||||||
int r1, g1, b1, r2, g2, b2; // 8 bit base colors for sub-blocks
|
int r1, g1, b1, r2, g2, b2; // 8 bit base colors for sub-blocks
|
||||||
bool differential;
|
bool differential;
|
||||||
{
|
|
||||||
int r51 = convert8To5(pColors[0]);
|
int r51 = convert8To5(pColors[0]);
|
||||||
int g51 = convert8To5(pColors[1]);
|
int g51 = convert8To5(pColors[1]);
|
||||||
int b51 = convert8To5(pColors[2]);
|
int b51 = convert8To5(pColors[2]);
|
||||||
@ -411,11 +411,6 @@ static void etc_encodeBaseColors(etc1_byte* pBaseColors,
|
|||||||
pCompressed->high |= (r51 << 27) | ((7 & dr) << 24) | (g51 << 19)
|
pCompressed->high |= (r51 << 27) | ((7 & dr) << 24) | (g51 << 19)
|
||||||
| ((7 & dg) << 16) | (b51 << 11) | ((7 & db) << 8) | 2;
|
| ((7 & dg) << 16) | (b51 << 11) | ((7 & db) << 8) | 2;
|
||||||
} else {
|
} else {
|
||||||
r2 = g2 = b2 = 0; // to shut the compiler up
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!differential) {
|
|
||||||
int r41 = convert8To4(pColors[0]);
|
int r41 = convert8To4(pColors[0]);
|
||||||
int g41 = convert8To4(pColors[1]);
|
int g41 = convert8To4(pColors[1]);
|
||||||
int b41 = convert8To4(pColors[2]);
|
int b41 = convert8To4(pColors[2]);
|
||||||
|
Loading…
Reference in New Issue
Block a user