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

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

Merge "Adding PrintTo to BlurRegions"

parents 2d9bc4b4 e40f5f54
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -277,6 +277,10 @@ static inline void PrintTo(const LayerSettings& settings, ::std::ostream* os) {
    *os << "\n    .colorTransform = " << settings.colorTransform;
    *os << "\n    .disableBlending = " << settings.disableBlending;
    *os << "\n    .backgroundBlurRadius = " << settings.backgroundBlurRadius;
    for (auto blurRegion : settings.blurRegions) {
        *os << "\n";
        PrintTo(blurRegion, os);
    }
    *os << "\n    .shadow = ";
    PrintTo(settings.shadow, os);
    *os << "\n}";
+17 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@
#pragma once

#include <inttypes.h>
#include <iosfwd>
#include <iostream>

namespace android {

@@ -33,4 +35,19 @@ struct BlurRegion {
    int bottom;
};

static inline void PrintTo(const BlurRegion& blurRegion, ::std::ostream* os) {
    *os << "BlurRegion {";
    *os << "\n    .blurRadius = " << blurRegion.blurRadius;
    *os << "\n    .cornerRadiusTL = " << blurRegion.cornerRadiusTL;
    *os << "\n    .cornerRadiusTR = " << blurRegion.cornerRadiusTR;
    *os << "\n    .cornerRadiusBL = " << blurRegion.cornerRadiusBL;
    *os << "\n    .cornerRadiusBR = " << blurRegion.cornerRadiusBR;
    *os << "\n    .alpha = " << blurRegion.alpha;
    *os << "\n    .left = " << blurRegion.left;
    *os << "\n    .top = " << blurRegion.top;
    *os << "\n    .right = " << blurRegion.right;
    *os << "\n    .bottom = " << blurRegion.bottom;
    *os << "\n}";
}

} // namespace android
 No newline at end of file