Flutter Engine
The Flutter Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Functions
SkRecordOpts.h File Reference

Go to the source code of this file.

Functions

void SkRecordOptimize (SkRecord *)
 
void SkRecordNoopSaveRestores (SkRecord *)
 
void SkRecordNoopSaveLayerDrawRestores (SkRecord *)
 
void SkRecordMergeSvgOpacityAndFilterLayers (SkRecord *)
 

Function Documentation

◆ SkRecordMergeSvgOpacityAndFilterLayers()

void SkRecordMergeSvgOpacityAndFilterLayers ( SkRecord record)

Definition at line 262 of file SkRecordOpts.cpp.

262 {
264 apply(&pass, record);
265}
static bool apply(Pass *pass, SkRecord *record)

◆ SkRecordNoopSaveLayerDrawRestores()

void SkRecordNoopSaveLayerDrawRestores ( SkRecord record)

Definition at line 201 of file SkRecordOpts.cpp.

201 {
203 apply(&pass, record);
204}

◆ SkRecordNoopSaveRestores()

void SkRecordNoopSaveRestores ( SkRecord record)

Definition at line 136 of file SkRecordOpts.cpp.

136 {
139
140 // Run until they stop changing things.
141 while (apply(&onlyDraws, record) || apply(&noDraws, record));
142}

◆ SkRecordOptimize()

void SkRecordOptimize ( SkRecord record)

Definition at line 269 of file SkRecordOpts.cpp.

269 {
270 // This might be useful as a first pass in the future if we want to weed
271 // out junk for other optimization passes. Right now, nothing needs it,
272 // and the bounding box hierarchy will do the work of skipping no-op
273 // Save-NoDraw-Restore sequences better than we can here.
274 // As there is a known problem with this peephole and drawAnnotation, disable this.
275 // If we want to enable this we must first fix this bug:
276 // https://bugs.chromium.org/p/skia/issues/detail?id=5548
277// SkRecordNoopSaveRestores(record);
278
279 // Turn off this optimization completely for Android framework
280 // because it makes the following Android CTS test fail:
281 // android.uirendering.cts.testclasses.LayerTests#testSaveLayerClippedWithAlpha
282#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK
284#endif
286
287 record->defrag();
288}
void SkRecordMergeSvgOpacityAndFilterLayers(SkRecord *record)
void SkRecordNoopSaveLayerDrawRestores(SkRecord *record)
void defrag()
Definition: SkRecord.cpp:30