SkRecordOpts.h 979 B

1234567891011121314151617181920212223242526272829303132
  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. #ifndef SkRecordOpts_DEFINED
  8. #define SkRecordOpts_DEFINED
  9. #include "src/core/SkRecord.h"
  10. // Run all optimizations in recommended order.
  11. void SkRecordOptimize(SkRecord*);
  12. // Turns logical no-op Save-[non-drawing command]*-Restore patterns into actual no-ops.
  13. void SkRecordNoopSaveRestores(SkRecord*);
  14. #ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK
  15. // For some SaveLayer-[drawing command]-Restore patterns, merge the SaveLayer's alpha into the
  16. // draw, and no-op the SaveLayer and Restore.
  17. void SkRecordNoopSaveLayerDrawRestores(SkRecord*);
  18. #endif
  19. // For SVG generated SaveLayer-Save-ClipRect-SaveLayer-3xRestore patterns, merge
  20. // the alpha of the first SaveLayer to the second SaveLayer.
  21. void SkRecordMergeSvgOpacityAndFilterLayers(SkRecord*);
  22. // Experimental optimizers
  23. void SkRecordOptimize2(SkRecord*);
  24. #endif//SkRecordOpts_DEFINED