Commit Graph

2 Commits

Author SHA1 Message Date
Robert Phillips
32df8f80d3 Handle null GrDirectContext in DDL Fuzzer
Bug: oss-fuzz:24449
Change-Id: I379e12ef12d45d4959db72ce90ebeaf1d1933623
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307221
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-31 18:12:53 +00:00
Zepeng Hu
940070122a add create ddl fuzzer
This is an attempt to fuzz the usage of SkSurfaceCharacterization,
SkDeferredDisplayRecorder, and SkDeferredDisplayList.

This fuzzer first makes a surface and characterization from
GrDirectContext and then create a DDL and draw it on the surface.

The code is compiled with ninja and run with AFL at the speed around
600/sec

The future changes will include:
1. An alternative way to create DDL: first create the surface and
extract the characterization from that existing surface.

2.currently we just pass the ownership of the DDL into draw_ddl. In
the future we should add a version that retains ownership of the DDL
in order to fuzz the lifetime of the DDL.

3. Refactorize line 62-119

Change-Id: I9cd9736813be3abc82430bd4eeb559d6993ecbd4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303600
Commit-Queue: Zepeng Hu <zepenghu@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-07-22 20:10:51 +00:00