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

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

Merge "Fix a crash in skia pipeline, when empty reorder block is first"

parents 0886400b 347691f8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ void StartReorderBarrierDrawable::onDraw(SkCanvas* canvas) {
        //mChildren is allocated and initialized only the first time onDraw is called and cached for
        //subsequent calls
        mChildren.reserve(mEndChildIndex - mBeginChildIndex + 1);
        for (unsigned int i = mBeginChildIndex; i <= mEndChildIndex; i++) {
        for (int i = mBeginChildIndex; i <= mEndChildIndex; i++) {
            mChildren.push_back(const_cast<RenderNodeDrawable*>(&mDisplayList->mChildNodes[i]));
        }
    }
+2 −2
Original line number Diff line number Diff line
@@ -47,8 +47,8 @@ protected:
    virtual void onDraw(SkCanvas* canvas) override;

private:
    size_t mEndChildIndex;
    size_t mBeginChildIndex;
    int mEndChildIndex;
    int mBeginChildIndex;
    FatVector<RenderNodeDrawable*, 16> mChildren;
    SkiaDisplayList* mDisplayList;

+2 −0
Original line number Diff line number Diff line
@@ -1530,6 +1530,8 @@ public:
RENDERTHREAD_TEST(FrameBuilder, zReorder) {
    auto parent = TestUtils::createNode<RecordingCanvas>(0, 0, 100, 100,
            [](RenderProperties& props, RecordingCanvas& canvas) {
        canvas.insertReorderBarrier(true);
        canvas.insertReorderBarrier(false);
        drawOrderedNode(&canvas, 0, 10.0f); // in reorder=false at this point, so played inorder
        drawOrderedRect(&canvas, 1);
        canvas.insertReorderBarrier(true);
+2 −0
Original line number Diff line number Diff line
@@ -102,6 +102,8 @@ TEST(RenderNodeDrawable, zReorder) {

    auto parent = TestUtils::createSkiaNode(0, 0, 100, 100,
            [](RenderProperties& props, SkiaRecordingCanvas& canvas) {
        canvas.insertReorderBarrier(true);
        canvas.insertReorderBarrier(false);
        drawOrderedNode(&canvas, 0, 10.0f); // in reorder=false at this point, so played inorder
        drawOrderedRect(&canvas, 1);
        canvas.insertReorderBarrier(true);