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

Commit ba8322d0 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes from topic "from-pi-gsi-3"

* changes:
  Don't apply filter in readback, when there is no scaling
  Set AppStandbyController charging state on init
  Fix TextureView.getBitmap with scale layer transform
parents ee570a61 cccd0385
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -82,7 +82,14 @@ bool LayerDrawable::DrawLayer(GrContext* context, SkCanvas* canvas, Layer* layer
            textureMatrix = textureMatrixInv;
        }

        SkMatrix matrix = SkMatrix::Concat(layerTransform, textureMatrix);
        SkMatrix matrix;
        if (dstRect) {
            // Destination rectangle is set only when we are trying to read back the content
            // of the layer. In this case we don't want to apply layer transform.
            matrix = textureMatrix;
        } else {
            matrix = SkMatrix::Concat(layerTransform, textureMatrix);
        }

        SkPaint paint;
        paint.setAlpha(layer->getAlpha());
+4 −3
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
#include "DeviceInfo.h"
#include "Matrix.h"
#include "Properties.h"
#include "utils/MathUtils.h"

using namespace android::uirenderer::renderthread;

@@ -116,9 +117,9 @@ CopyResult SkiaOpenGLReadback::copyImageInto(EGLImageKHR eglImage, const Matrix4
            paint.setBlendMode(SkBlendMode::kSrc);
            // Apply a filter, which is matching OpenGL pipeline readback behaviour. Filter usage
            // is codified by tests using golden images like DecodeAccuracyTest.
            if (skiaSrcRect.width() != bitmap->width() ||
                skiaSrcRect.height() != bitmap->height()) {
                // TODO: apply filter always, but check if tests will be fine
            bool disableFilter = MathUtils::areEqual(skiaSrcRect.width(), skiaDestRect.width())
                    && MathUtils::areEqual(skiaSrcRect.height(), skiaDestRect.height());
            if (!disableFilter) {
                paint.setFilterQuality(kLow_SkFilterQuality);
            }
            scaledSurface->getCanvas()->concat(textureMatrix);
+1 −1
Original line number Diff line number Diff line
@@ -207,8 +207,8 @@ public class UsageStatsService extends SystemService implements

    @Override
    public void onBootPhase(int phase) {
        if (phase == PHASE_SYSTEM_SERVICES_READY) {
        mAppStandby.onBootPhase(phase);
        if (phase == PHASE_SYSTEM_SERVICES_READY) {
            // initialize mDpmInternal
            getDpmInternal();