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

Commit 12307996 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix size calculation" into sc-dev

parents 92716ec4 dc323f27
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -60,12 +60,11 @@ void SkiaRecordingCanvas::punchHole(const SkRRect& rect) {
    // Add the marker annotation to allow HWUI to determine where the current
    // clip/transformation should be applied
    SkVector vector = rect.getSimpleRadii();
    const int dataSize = 2;
    float data[dataSize];
    float data[2];
    data[0] = vector.x();
    data[1] = vector.y();
    mRecorder.drawAnnotation(rect.rect(), HOLE_PUNCH_ANNOTATION.c_str(),
                             SkData::MakeWithCopy(data, dataSize));
                             SkData::MakeWithCopy(data, 2 * sizeof(float)));

    // Clear the current rect within the layer itself
    SkPaint paint = SkPaint();
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ using namespace android::uirenderer::skiapipeline;

void TransformCanvas::onDrawAnnotation(const SkRect& rect, const char* key, SkData* value) {
    if (HOLE_PUNCH_ANNOTATION == key) {
        auto* rectParams = static_cast<const float*>(value->data());
        auto* rectParams = reinterpret_cast<const float*>(value->data());
        float radiusX = rectParams[0];
        float radiusY = rectParams[1];
        SkRRect roundRect = SkRRect::MakeRectXY(rect, radiusX, radiusY);