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 #include "SkPaint.h" | 8 #include "SkPaint.h" |
9 #include "SkPathEffect.h" | 9 #include "SkPathEffect.h" |
10 #include "SkPictureContentInfo.h" | 10 #include "SkPictureContentInfo.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 >= kNumAAConcavePaths) { | 38 >= kNumAAConcavePaths) { |
39 *reason = "Too many anti-aliased concave paths."; | 39 *reason = "Too many anti-aliased concave paths."; |
40 } else { | 40 } else { |
41 *reason = "Unknown reason for GPU unsuitability."; | 41 *reason = "Unknown reason for GPU unsuitability."; |
42 } | 42 } |
43 } | 43 } |
44 return ret; | 44 return ret; |
45 } | 45 } |
46 | 46 |
47 void SkPictureContentInfo::onDrawPoints(size_t count, const SkPaint& paint) { | 47 void SkPictureContentInfo::onDrawPoints(size_t count, const SkPaint& paint) { |
48 if (paint.getPathEffect() != NULL) { | 48 if (paint.getPathEffect() != nullptr) { |
49 SkPathEffect::DashInfo info; | 49 SkPathEffect::DashInfo info; |
50 SkPathEffect::DashType dashType = paint.getPathEffect()->asADash(&info); | 50 SkPathEffect::DashType dashType = paint.getPathEffect()->asADash(&info); |
51 if (2 == count && SkPaint::kRound_Cap != paint.getStrokeCap() && | 51 if (2 == count && SkPaint::kRound_Cap != paint.getStrokeCap() && |
52 SkPathEffect::kDash_DashType == dashType && 2 == info.fCount) { | 52 SkPathEffect::kDash_DashType == dashType && 2 == info.fCount) { |
53 ++fNumFastPathDashEffects; | 53 ++fNumFastPathDashEffects; |
54 } | 54 } |
55 } | 55 } |
56 } | 56 } |
57 | 57 |
58 void SkPictureContentInfo::onDrawPath(const SkPath& path, const SkPaint& paint)
{ | 58 void SkPictureContentInfo::onDrawPath(const SkPath& path, const SkPaint& paint)
{ |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 SkTSwap(fNumPaintWithPathEffectUses, other->fNumPaintWithPathEffectUses); | 166 SkTSwap(fNumPaintWithPathEffectUses, other->fNumPaintWithPathEffectUses); |
167 SkTSwap(fNumFastPathDashEffects, other->fNumFastPathDashEffects); | 167 SkTSwap(fNumFastPathDashEffects, other->fNumFastPathDashEffects); |
168 SkTSwap(fNumAAConcavePaths, other->fNumAAConcavePaths); | 168 SkTSwap(fNumAAConcavePaths, other->fNumAAConcavePaths); |
169 SkTSwap(fNumAAHairlineConcavePaths, other->fNumAAHairlineConcavePaths); | 169 SkTSwap(fNumAAHairlineConcavePaths, other->fNumAAHairlineConcavePaths); |
170 SkTSwap(fNumAADFEligibleConcavePaths, other->fNumAADFEligibleConcavePaths); | 170 SkTSwap(fNumAADFEligibleConcavePaths, other->fNumAADFEligibleConcavePaths); |
171 SkTSwap(fNumLayers, other->fNumLayers); | 171 SkTSwap(fNumLayers, other->fNumLayers); |
172 SkTSwap(fNumInteriorLayers, other->fNumInteriorLayers); | 172 SkTSwap(fNumInteriorLayers, other->fNumInteriorLayers); |
173 SkTSwap(fNumLeafLayers, other->fNumLeafLayers); | 173 SkTSwap(fNumLeafLayers, other->fNumLeafLayers); |
174 fSaveStack.swap(other->fSaveStack); | 174 fSaveStack.swap(other->fSaveStack); |
175 } | 175 } |
OLD | NEW |