Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
FuzzPathDeserialize.cpp File Reference
#include "include/core/SkCanvas.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPath.h"
#include "include/core/SkSurface.h"
#include "src/core/SkReadBuffer.h"

Go to the source code of this file.

Functions

void FuzzPathDeserialize (const uint8_t *data, size_t size)
 

Function Documentation

◆ FuzzPathDeserialize()

void FuzzPathDeserialize ( const uint8_t *  data,
size_t  size 
)

Definition at line 14 of file FuzzPathDeserialize.cpp.

14 {
15 SkReadBuffer buf(data, size);
16
18 buf.readPath(&path);
19 if (!buf.isValid()) {
20 return;
21 }
22
24 if (!s) {
25 // May return nullptr in memory-constrained fuzzing environments
26 return;
27 }
28 s->getCanvas()->drawPath(path, SkPaint());
29}
struct MyStruct s
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition switches.h:57
static SkImageInfo MakeN32Premul(int width, int height)