Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc5a7d23 authored by Chet Haase's avatar Chet Haase Committed by Android (Google) Code Review
Browse files

Merge "Fix bitfield bug with vertex shader selection"

parents a13802d8 6cfdf453
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -31,11 +31,11 @@ import java.io.IOException;
import java.util.ArrayList;

/**
 * This class is used to instantiate menu XML files into Animator objects.
 * This class is used to instantiate animator XML files into Animator objects.
 * <p>
 * For performance reasons, menu inflation relies heavily on pre-processing of
 * For performance reasons, inflation relies heavily on pre-processing of
 * XML files that is done at build time. Therefore, it is not currently possible
 * to use MenuInflater with an XmlPullParser over a plain XML file at runtime;
 * to use this inflater with an XmlPullParser over a plain XML file at runtime;
 * it only works with an XmlPullParser returned from a compiled resource (R.
 * <em>something</em> file.)
 */
+4 −1
Original line number Diff line number Diff line
@@ -897,7 +897,8 @@ void OpenGLRenderer::setupDrawColor(int color) {

void OpenGLRenderer::setupDrawColor(int color, int alpha) {
    mColorA = alpha / 255.0f;
    // BUG on this next line? a is alpha divided by 255 *twice*
    // Second divide of a by 255 is an optimization, allowing us to simply multiply
    // the rgb values by a instead of also dividing by 255
    const float a = mColorA / 255.0f;
    mColorR = a * ((color >> 16) & 0xFF);
    mColorG = a * ((color >>  8) & 0xFF);
@@ -908,6 +909,8 @@ void OpenGLRenderer::setupDrawColor(int color, int alpha) {

void OpenGLRenderer::setupDrawAlpha8Color(int color, int alpha) {
    mColorA = alpha / 255.0f;
    // Double-divide of a by 255 is an optimization, allowing us to simply multiply
    // the rgb values by a instead of also dividing by 255
    const float a = mColorA / 255.0f;
    mColorR = a * ((color >> 16) & 0xFF);
    mColorG = a * ((color >>  8) & 0xFF);
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ namespace uirenderer {
#define PROGRAM_KEY_COLOR_BLEND 0x80
#define PROGRAM_KEY_BITMAP_NPOT 0x100
#define PROGRAM_KEY_SWAP_SRC_DST 0x2000
#define PROGRAM_KEY_VERTEX_WIDTH 0x4000
#define PROGRAM_KEY_VERTEX_WIDTH (1 << 37)

#define PROGRAM_KEY_BITMAP_WRAPS_MASK 0x600
#define PROGRAM_KEY_BITMAP_WRAPT_MASK 0x1800