| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |