Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: src/core/SkRecordOpts.cpp

Issue 2163283002: re-disable save/restore peephole optimization (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: I hate un-called-function-warning Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tests/PictureTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "SkRecordOpts.h" 8 #include "SkRecordOpts.h"
9 9
10 #include "SkRecordPattern.h" 10 #include "SkRecordPattern.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 apply(&pass, record); 269 apply(&pass, record);
270 } 270 }
271 271
272 //////////////////////////////////////////////////////////////////////////////// /////////////////// 272 //////////////////////////////////////////////////////////////////////////////// ///////////////////
273 273
274 void SkRecordOptimize(SkRecord* record) { 274 void SkRecordOptimize(SkRecord* record) {
275 // This might be useful as a first pass in the future if we want to weed 275 // This might be useful as a first pass in the future if we want to weed
276 // out junk for other optimization passes. Right now, nothing needs it, 276 // out junk for other optimization passes. Right now, nothing needs it,
277 // and the bounding box hierarchy will do the work of skipping no-op 277 // and the bounding box hierarchy will do the work of skipping no-op
278 // Save-NoDraw-Restore sequences better than we can here. 278 // Save-NoDraw-Restore sequences better than we can here.
279 SkRecordNoopSaveRestores(record); 279 // As there is a known problem with this peephole and drawAnnotation, disabl e this.
280 // If we want to enable this we must first fix this bug:
281 // https://bugs.chromium.org/p/skia/issues/detail?id=5548
282 // SkRecordNoopSaveRestores(record);
280 283
281 SkRecordNoopSaveLayerDrawRestores(record); 284 SkRecordNoopSaveLayerDrawRestores(record);
282 SkRecordMergeSvgOpacityAndFilterLayers(record); 285 SkRecordMergeSvgOpacityAndFilterLayers(record);
283 286
284 record->defrag(); 287 record->defrag();
285 } 288 }
286 289
287 void SkRecordOptimize2(SkRecord* record) { 290 void SkRecordOptimize2(SkRecord* record) {
288 multiple_set_matrices(record); 291 multiple_set_matrices(record);
289 SkRecordNoopSaveRestores(record); 292 SkRecordNoopSaveRestores(record);
290 SkRecordNoopSaveLayerDrawRestores(record); 293 SkRecordNoopSaveLayerDrawRestores(record);
291 SkRecordMergeSvgOpacityAndFilterLayers(record); 294 SkRecordMergeSvgOpacityAndFilterLayers(record);
292 295
293 record->defrag(); 296 record->defrag();
294 } 297 }
OLDNEW
« no previous file with comments | « no previous file | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698