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

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

Merge "Prepare for removal of SK_SURFACE_COPY_ON_WRITE_CRASHES"

parents 75dda48a 9b87556c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -469,7 +469,11 @@ RENDERTHREAD_SKIA_PIPELINE_TEST(RenderNodeDrawable, projectionHwLayer) {
        }
        SkCanvas* onNewCanvas() override { return new ProjectionTestCanvas(mDrawCounter); }
        sk_sp<SkSurface> onNewSurface(const SkImageInfo&) override { return nullptr; }
#ifdef SK_SURFACE_COPY_ON_WRITE_CRASHES
        void onCopyOnWrite(ContentChangeMode) override {}
#else
        bool onCopyOnWrite(ContentChangeMode) override { return true; }
#endif
        int* mDrawCounter;
        void onWritePixels(const SkPixmap&, int x, int y) {}
    };
+4 −0
Original line number Diff line number Diff line
@@ -221,7 +221,11 @@ public:
    sk_sp<SkSurface> onNewSurface(const SkImageInfo&) override { return nullptr; }
    sk_sp<SkImage> onNewImageSnapshot(const SkIRect* bounds) override { return nullptr; }
    T* canvas() { return static_cast<T*>(getCanvas()); }
#ifdef SK_SURFACE_COPY_ON_WRITE_CRASHES
    void onCopyOnWrite(ContentChangeMode) override {}
#else
    bool onCopyOnWrite(ContentChangeMode) override { return true; }
#endif
    void onWritePixels(const SkPixmap&, int x, int y) override {}
};
}