Prepare for removal of SK_SURFACE_COPY_ON_WRITE_CRASHES
The SK_SURFACE_COPY_ON_WRITE_CRASHES is to be removed, so update the code as needed behind the flag so that the flag can be removed.
Change-Id: Ib4e839c502f044253c5cd97f14582651b49f5104
diff --git a/libs/hwui/tests/unit/RenderNodeDrawableTests.cpp b/libs/hwui/tests/unit/RenderNodeDrawableTests.cpp
index 423400e..8260ae2 100644
--- a/libs/hwui/tests/unit/RenderNodeDrawableTests.cpp
+++ b/libs/hwui/tests/unit/RenderNodeDrawableTests.cpp
@@ -469,7 +469,11 @@
}
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) {}
};