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

Commit 615f465c authored by Ana Krulec's avatar Ana Krulec Committed by Android (Google) Code Review
Browse files

Merge changes I66c184ec,I857659d6

* changes:
  Respect LayerSettings::alpha in Skia-RE for buffer layers
  Support bilinear filtering in Skia-RE
parents 3ea2a0c7 1768bd22
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -652,7 +652,16 @@ status_t SkiaGLRenderEngine::drawLayers(const DisplaySettings& display,

            matrix.postConcat(texMatrix);
            matrix.postScale(rotatedBufferWidth, rotatedBufferHeight);
            sk_sp<SkShader> shader = image->makeShader(matrix);
            sk_sp<SkShader> shader;

            if (layer->source.buffer.useTextureFiltering) {
                shader = image->makeShader(SkTileMode::kClamp, SkTileMode::kClamp,
                                           SkSamplingOptions(
                                                   {SkFilterMode::kLinear, SkMipmapMode::kNone}),
                                           &matrix);
            } else {
                shader = image->makeShader(matrix);
            }

            if (mUseColorManagement &&
                needsToneMapping(layer->sourceDataspace, display.outputDataspace)) {
@@ -668,6 +677,8 @@ status_t SkiaGLRenderEngine::drawLayers(const DisplaySettings& display,
            } else {
                paint.setShader(shader);
            }
            // Make sure to take into the account the alpha set on the layer.
            paint.setAlphaf(layer->alpha);
        } else {
            ATRACE_NAME("DrawColor");
            const auto color = layer->source.solidColor;