skia2/src/core/SkRecordOpts.h
Yuqian Li 05a429614e Turn off savelayer optimization for Android framework
This is a simpler version of https://skia-review.googlesource.com/c/8970/

Note that we couldn't do the optimization and add back the clip effect by
another clipRect or clipPath call because the final matrix is not available at
recording time.

BUG=skia:6334

Change-Id: I3ca091bdc1ee1d265a79fb88d0a6f9afe2b27e58
Reviewed-on: https://skia-review.googlesource.com/9311
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-03-06 21:30:12 +00:00

33 lines
970 B
C

/*
* Copyright 2014 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkRecordOpts_DEFINED
#define SkRecordOpts_DEFINED
#include "SkRecord.h"
// Run all optimizations in recommended order.
void SkRecordOptimize(SkRecord*);
// Turns logical no-op Save-[non-drawing command]*-Restore patterns into actual no-ops.
void SkRecordNoopSaveRestores(SkRecord*);
#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK
// For some SaveLayer-[drawing command]-Restore patterns, merge the SaveLayer's alpha into the
// draw, and no-op the SaveLayer and Restore.
void SkRecordNoopSaveLayerDrawRestores(SkRecord*);
#endif
// For SVG generated SaveLayer-Save-ClipRect-SaveLayer-3xRestore patterns, merge
// the alpha of the first SaveLayer to the second SaveLayer.
void SkRecordMergeSvgOpacityAndFilterLayers(SkRecord*);
// Experimental optimizers
void SkRecordOptimize2(SkRecord*);
#endif//SkRecordOpts_DEFINED