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

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

Issue 1824983003: SkRecord: infer return type for visit() and mutate(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 | « dm/DMSrcSink.cpp ('k') | src/core/SkRecord.h » ('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 2015 Google Inc. 2 * Copyright 2015 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 "SkBBoxHierarchy.h" 8 #include "SkBBoxHierarchy.h"
9 #include "SkBigPicture.h" 9 #include "SkBigPicture.h"
10 #include "SkPictureCommon.h" 10 #include "SkPictureCommon.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 SkBigPicture::Analysis::Analysis(const SkRecord& record) { 83 SkBigPicture::Analysis::Analysis(const SkRecord& record) {
84 TRACE_EVENT0("disabled-by-default-skia", "SkBigPicture::Analysis::Analysis() "); 84 TRACE_EVENT0("disabled-by-default-skia", "SkBigPicture::Analysis::Analysis() ");
85 SkTextHunter text; 85 SkTextHunter text;
86 SkBitmapHunter bitmap; 86 SkBitmapHunter bitmap;
87 SkPathCounter path; 87 SkPathCounter path;
88 88
89 bool hasText = false, hasBitmap = false; 89 bool hasText = false, hasBitmap = false;
90 for (int i = 0; i < record.count(); i++) { 90 for (int i = 0; i < record.count(); i++) {
91 hasText = hasText || record.visit<bool>(i, text); 91 hasText = hasText || record.visit(i, text);
92 hasBitmap = hasBitmap || record.visit<bool>(i, bitmap); 92 hasBitmap = hasBitmap || record.visit(i, bitmap);
93 record.visit<void>(i, path); 93 record.visit(i, path);
94 } 94 }
95 95
96 fHasText = hasText; 96 fHasText = hasText;
97 fWillPlaybackBitmaps = hasBitmap; 97 fWillPlaybackBitmaps = hasBitmap;
98 fNumSlowPathsAndDashEffects = SkTMin<int>(path.fNumSlowPathsAndDashEffects, 255); 98 fNumSlowPathsAndDashEffects = SkTMin<int>(path.fNumSlowPathsAndDashEffects, 255);
99 } 99 }
OLDNEW
« no previous file with comments | « dm/DMSrcSink.cpp ('k') | src/core/SkRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698