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

Commit 6751c84d authored by Mathias Agopian's avatar Mathias Agopian Committed by Android Git Automerger
Browse files

am 7bb7e992: Merge change Ia8ac904d into eclair

Merge commit '7bb7e99216956d917af1786a3e02a92cac46fc84' into eclair-mr2

* commit '7bb7e99216956d917af1786a3e02a92cac46fc84':
  fix [2182249] [MR1] valgrind error in surface flinger
parents 2e9ff66e 76f95d0c
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -220,18 +220,21 @@ private:
        }

        inline void prepare(int inside) {
            if (inside == SpannerBase::lhs_before_rhs) {
                SpannerBase::lhs_head = lhs.rects->left  + lhs.dx;
                SpannerBase::lhs_tail = lhs.rects->right + lhs.dx;
            SpannerBase::rhs_head = rhs.rects->left  + rhs.dx;
            SpannerBase::rhs_tail = rhs.rects->right + rhs.dx;
            if (inside == SpannerBase::lhs_before_rhs) {
                SpannerBase::rhs_head = max_value;
                SpannerBase::rhs_tail = max_value;
            } else if (inside == SpannerBase::lhs_after_rhs) {
                SpannerBase::lhs_head = max_value;
                SpannerBase::lhs_tail = max_value;
                SpannerBase::rhs_head = rhs.rects->left  + rhs.dx;
                SpannerBase::rhs_tail = rhs.rects->right + rhs.dx;
            } else {
                // use both spans
                SpannerBase::lhs_head = lhs.rects->left  + lhs.dx;
                SpannerBase::lhs_tail = lhs.rects->right + lhs.dx;
                SpannerBase::rhs_head = rhs.rects->left  + rhs.dx;
                SpannerBase::rhs_tail = rhs.rects->right + rhs.dx;
            }
        }

+7 −0
Original line number Diff line number Diff line
@@ -25,10 +25,17 @@ using namespace android;

int main()
{
    Region empty;
    Region reg0( Rect(  0, 0,  100, 100 ) );
    Region reg1 = reg0;
    Region reg2, reg3;

    Region reg4 = empty | reg1;
    Region reg5 = reg1 | empty;

    reg4.dump("reg4");
    reg5.dump("reg5");
    
    reg0.dump("reg0");
    reg1.dump("reg1");