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

Commit e40f5f54 authored by Ana Krulec's avatar Ana Krulec
Browse files

Adding PrintTo to BlurRegions

Test: Run skia recorder and see the BlurRegions added to the LayerSettings
      in Annotations section.
Bug: 173805658
Change-Id: Ib07489ef99f82a955bbcfbae9a7f08aa9cb2a879
parent ef7705d5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -274,6 +274,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