1 | /* |
2 | * Copyright 2014 Google Inc. |
3 | * |
4 | * Use of this source code is governed by a BSD-style license that can be |
5 | * found in the LICENSE file. |
6 | */ |
7 | |
8 | #ifndef SkRecordOpts_DEFINED |
9 | #define SkRecordOpts_DEFINED |
10 | |
11 | #include "src/core/SkRecord.h" |
12 | |
13 | // Run all optimizations in recommended order. |
14 | void SkRecordOptimize(SkRecord*); |
15 | |
16 | // Turns logical no-op Save-[non-drawing command]*-Restore patterns into actual no-ops. |
17 | void SkRecordNoopSaveRestores(SkRecord*); |
18 | |
19 | #ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK |
20 | // For some SaveLayer-[drawing command]-Restore patterns, merge the SaveLayer's alpha into the |
21 | // draw, and no-op the SaveLayer and Restore. |
22 | void SkRecordNoopSaveLayerDrawRestores(SkRecord*); |
23 | #endif |
24 | |
25 | // For SVG generated SaveLayer-Save-ClipRect-SaveLayer-3xRestore patterns, merge |
26 | // the alpha of the first SaveLayer to the second SaveLayer. |
27 | void SkRecordMergeSvgOpacityAndFilterLayers(SkRecord*); |
28 | |
29 | // Experimental optimizers |
30 | void SkRecordOptimize2(SkRecord*); |
31 | |
32 | #endif//SkRecordOpts_DEFINED |
33 | |