| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkRecordOpts_DEFINED | 8 #ifndef SkRecordOpts_DEFINED |
| 9 #define SkRecordOpts_DEFINED | 9 #define SkRecordOpts_DEFINED |
| 10 | 10 |
| 11 #include "SkRecord.h" | 11 #include "SkRecord.h" |
| 12 | 12 |
| 13 // Run all optimizations in recommended order. | 13 // Run all optimizations in recommended order. |
| 14 void SkRecordOptimize(SkRecord*); | 14 void SkRecordOptimize(SkRecord*); |
| 15 | 15 |
| 16 // NoOp away pointless PushCull/PopCull pairs with nothing between them. |
| 17 void SkRecordNoopCulls(SkRecord*); |
| 16 | 18 |
| 17 // Turns logical no-op Save-[non-drawing command]*-Restore patterns into actual
no-ops. | 19 // Turns logical no-op Save-[non-drawing command]*-Restore patterns into actual
no-ops. |
| 18 void SkRecordNoopSaveRestores(SkRecord*); | 20 void SkRecordNoopSaveRestores(SkRecord*); |
| 19 | 21 |
| 20 // For some SaveLayer-[drawing command]-Restore patterns, merge the SaveLayer's
alpha into the | 22 // For some SaveLayer-[drawing command]-Restore patterns, merge the SaveLayer's
alpha into the |
| 21 // draw, and no-op the SaveLayer and Restore. | 23 // draw, and no-op the SaveLayer and Restore. |
| 22 void SkRecordNoopSaveLayerDrawRestores(SkRecord*); | 24 void SkRecordNoopSaveLayerDrawRestores(SkRecord*); |
| 23 | 25 |
| 24 // Annotates PushCull commands with the relative offset of their paired PopCull. | 26 // Annotates PushCull commands with the relative offset of their paired PopCull. |
| 25 void SkRecordAnnotateCullingPairs(SkRecord*); | 27 void SkRecordAnnotateCullingPairs(SkRecord*); |
| 26 | 28 |
| 27 // Convert DrawPosText to DrawPosTextH when all the Y coordinates are equal. | 29 // Convert DrawPosText to DrawPosTextH when all the Y coordinates are equal. |
| 28 void SkRecordReduceDrawPosTextStrength(SkRecord*); | 30 void SkRecordReduceDrawPosTextStrength(SkRecord*); |
| 29 | 31 |
| 30 // Calculate min and max Y bounds for DrawPosTextH commands, for use with SkCanv
as::quickRejectY. | 32 // Calculate min and max Y bounds for DrawPosTextH commands, for use with SkCanv
as::quickRejectY. |
| 31 void SkRecordBoundDrawPosTextH(SkRecord*); | 33 void SkRecordBoundDrawPosTextH(SkRecord*); |
| 32 | 34 |
| 33 #endif//SkRecordOpts_DEFINED | 35 #endif//SkRecordOpts_DEFINED |
| OLD | NEW |