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

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

Issue 2106843004: Experiment: add flag for finish-recording to return null (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address comments from #21 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
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 SkRecordNoopSaveRestores(record);
280 280
281 SkRecordNoopSaveLayerDrawRestores(record); 281 SkRecordNoopSaveLayerDrawRestores(record);
282 SkRecordMergeSvgOpacityAndFilterLayers(record); 282 SkRecordMergeSvgOpacityAndFilterLayers(record);
283 283
284 record->defrag(); 284 record->defrag();
285 } 285 }
286 286
287 void SkRecordOptimize2(SkRecord* record) { 287 void SkRecordOptimize2(SkRecord* record) {
288 multiple_set_matrices(record); 288 multiple_set_matrices(record);
289 SkRecordNoopSaveRestores(record); 289 SkRecordNoopSaveRestores(record);
290 SkRecordNoopSaveLayerDrawRestores(record); 290 SkRecordNoopSaveLayerDrawRestores(record);
291 SkRecordMergeSvgOpacityAndFilterLayers(record); 291 SkRecordMergeSvgOpacityAndFilterLayers(record);
292 292
293 record->defrag(); 293 record->defrag();
294 } 294 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698