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

Commit 7b4950ae authored by Romain Guy's avatar Romain Guy Committed by Android Git Automerger
Browse files

am 169fafe6: Merge "Fix rendering issues with animated layers. Bug #3385247" into honeycomb

* commit '169fafe6':
  Fix rendering issues with animated layers. Bug #3385247
parents 74d9a373 169fafe6
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -2396,8 +2396,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
            }
            }
        }
        }


        boolean layerSaved = false;

        if (transformToApply != null || alpha < 1.0f || !child.hasIdentityMatrix()) {
        if (transformToApply != null || alpha < 1.0f || !child.hasIdentityMatrix()) {
            if (transformToApply != null || !childHasIdentityMatrix) {
            if (transformToApply != null || !childHasIdentityMatrix) {
                int transX = 0;
                int transX = 0;
+4 −3
Original line number Original line Diff line number Diff line
@@ -1213,8 +1213,7 @@ void OpenGLRenderer::drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int
        const bool pureTranslate = mSnapshot->transform->isPureTranslate();
        const bool pureTranslate = mSnapshot->transform->isPureTranslate();
#if RENDER_LAYERS_AS_REGIONS
#if RENDER_LAYERS_AS_REGIONS
        // Mark the current layer dirty where we are going to draw the patch
        // Mark the current layer dirty where we are going to draw the patch
        if ((mSnapshot->flags & Snapshot::kFlagFboTarget) &&
        if (hasLayer() && mesh->hasEmptyQuads) {
                mSnapshot->region && mesh->hasEmptyQuads) {
            const size_t count = mesh->quads.size();
            const size_t count = mesh->quads.size();
            for (size_t i = 0; i < count; i++) {
            for (size_t i = 0; i < count; i++) {
                const Rect& bounds = mesh->quads.itemAt(i);
                const Rect& bounds = mesh->quads.itemAt(i);
@@ -1610,6 +1609,7 @@ void OpenGLRenderer::drawLayer(Layer* layer, float x, float y, SkPaint* paint) {
    layer->alpha = alpha;
    layer->alpha = alpha;
    layer->mode = mode;
    layer->mode = mode;


    LOGD("Drawing layer with alpha = %d", alpha);


#if RENDER_LAYERS_AS_REGIONS
#if RENDER_LAYERS_AS_REGIONS
    if (!layer->region.isEmpty()) {
    if (!layer->region.isEmpty()) {
@@ -1617,11 +1617,12 @@ void OpenGLRenderer::drawLayer(Layer* layer, float x, float y, SkPaint* paint) {
            const Rect r(x, y, x + layer->layer.getWidth(), y + layer->layer.getHeight());
            const Rect r(x, y, x + layer->layer.getWidth(), y + layer->layer.getHeight());
            composeLayerRect(layer, r);
            composeLayerRect(layer, r);
        } else if (layer->mesh) {
        } else if (layer->mesh) {
            const float a = alpha / 255.0f;
            const Rect& rect = layer->layer;
            const Rect& rect = layer->layer;


            setupDraw();
            setupDraw();
            setupDrawWithTexture();
            setupDrawWithTexture();
            setupDrawColor(alpha, alpha, alpha, alpha);
            setupDrawColor(a, a, a, a);
            setupDrawColorFilter();
            setupDrawColorFilter();
            setupDrawBlending(layer->blend || layer->alpha < 255, layer->mode, false);
            setupDrawBlending(layer->blend || layer->alpha < 255, layer->mode, false);
            setupDrawProgram();
            setupDrawProgram();