Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
SkClipStackUtils.h File Reference
#include "include/core/SkTypes.h"

Go to the source code of this file.

Functions

void SkClipStack_AsPath (const SkClipStack &cs, SkPath *path)
 

Function Documentation

◆ SkClipStack_AsPath()

void SkClipStack_AsPath ( const SkClipStack cs,
SkPath path 
)

Definition at line 17 of file SkClipStackUtils.cpp.

17 {
18 path->reset();
20
22 while (const SkClipStack::Element* element = iter.next()) {
23 if (element->getDeviceSpaceType() == SkClipStack::Element::DeviceSpaceType::kShader) {
24 // TODO: Handle DeviceSpaceType::kShader somehow; it can't be turned into an SkPath
25 // but perhaps the pdf backend can apply shaders in another way.
26 continue;
27 }
28 SkPath operand;
29 if (element->getDeviceSpaceType() != SkClipStack::Element::DeviceSpaceType::kEmpty) {
30 element->asDeviceSpacePath(&operand);
31 }
32
33 SkClipOp elementOp = element->getOp();
34 if (element->isReplaceOp()) {
35 *path = operand;
36 // TODO: Once expanding clip ops are removed, we can switch the iterator to be top
37 // to bottom, which allows us to break here on encountering a replace op.
38 } else {
39 Op(*path, operand, (SkPathOp)elementOp, path);
40 }
41 }
42}
SkClipOp
Definition SkClipOp.h:13
SkPathOp
Definition SkPathOps.h:22
@ kEmpty
This element makes the clip empty (regardless of previous elements).
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