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

Side by Side Diff: src/core/SkPictureCommon.h

Issue 2000423005: Complex clipPath accounting (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: review Created 4 years, 7 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 | « src/core/SkPictureAnalyzer.cpp ('k') | 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 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 // Some shared code used by both SkBigPicture and SkMiniPicture. 8 // Some shared code used by both SkBigPicture and SkMiniPicture.
9 // SkTextHunter -- SkRecord visitor that returns true when the op draws text . 9 // SkTextHunter -- SkRecord visitor that returns true when the op draws text .
10 // SkBitmapHunter -- SkRecord visitor that returns true when the op draws a bi tmap or image. 10 // SkBitmapHunter -- SkRecord visitor that returns true when the op draws a bi tmap or image.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // AA hairline concave path is not slow. 116 // AA hairline concave path is not slow.
117 } else if (SkPaint::kFill_Style == paintStyle && pathBounds.width() < 64.f && 117 } else if (SkPaint::kFill_Style == paintStyle && pathBounds.width() < 64.f &&
118 pathBounds.height() < 64.f && !op.path.isVolatile()) { 118 pathBounds.height() < 64.f && !op.path.isVolatile()) {
119 // AADF eligible concave path is not slow. 119 // AADF eligible concave path is not slow.
120 } else { 120 } else {
121 fNumSlowPathsAndDashEffects++; 121 fNumSlowPathsAndDashEffects++;
122 } 122 }
123 } 123 }
124 } 124 }
125 125
126 void operator()(const SkRecords::ClipPath& op) {
127 // TODO: does the SkRegion op matter?
128 if (op.opAA.aa && !op.path.isConvex()) {
129 fNumSlowPathsAndDashEffects++;
130 }
131 }
132
126 void operator()(const SkRecords::SaveLayer& op) { 133 void operator()(const SkRecords::SaveLayer& op) {
127 this->checkPaint(AsPtr(op.paint)); 134 this->checkPaint(AsPtr(op.paint));
128 } 135 }
129 136
130 template <typename T> 137 template <typename T>
131 SK_WHEN(T::kTags & SkRecords::kDraw_Tag, void) operator()(const T& op) { 138 SK_WHEN(T::kTags & SkRecords::kDraw_Tag, void) operator()(const T& op) {
132 this->checkPaint(AsPtr(op.paint)); 139 this->checkPaint(AsPtr(op.paint));
133 } 140 }
134 141
135 template <typename T> 142 template <typename T>
136 SK_WHEN(!(T::kTags & SkRecords::kDraw_Tag), void) operator()(const T& op) { /* do nothing */ } 143 SK_WHEN(!(T::kTags & SkRecords::kDraw_Tag), void) operator()(const T& op) { /* do nothing */ }
137 144
138 int fNumSlowPathsAndDashEffects; 145 int fNumSlowPathsAndDashEffects;
139 }; 146 };
OLDNEW
« no previous file with comments | « src/core/SkPictureAnalyzer.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698