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

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

Issue 1098753004: Remove MSAA check from Ganesh veto (dashed paths are no longer slow). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | no next file » | 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 2007 The Android Open Source Project 2 * Copyright 2007 The Android Open Source Project
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 8
9 #include "SkPictureFlat.h" 9 #include "SkPictureFlat.h"
10 #include "SkPictureData.h" 10 #include "SkPictureData.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 } 224 }
225 } 225 }
226 } 226 }
227 227
228 bool SkPicture::Analysis::suitableForGpuRasterization(const char** reason, 228 bool SkPicture::Analysis::suitableForGpuRasterization(const char** reason,
229 int sampleCount) const { 229 int sampleCount) const {
230 // TODO: the heuristic used here needs to be refined 230 // TODO: the heuristic used here needs to be refined
231 static const int kNumSlowPathsTol = 6; 231 static const int kNumSlowPathsTol = 6;
232 232
233 int numSlowPathDashedPaths = fNumPaintWithPathEffectUses; 233 int numSlowPathDashedPaths = fNumPaintWithPathEffectUses;
234 if (0 == sampleCount) { 234 numSlowPathDashedPaths -= fNumFastPathDashEffects;
egdaniel 2015/04/22 20:49:38 might as well combine these two lines now.
Stephen White 2015/04/22 20:53:09 Done.
235 // The fast dashing path only works when MSAA is disabled
236 numSlowPathDashedPaths -= fNumFastPathDashEffects;
237 }
238 235
239 int numSlowPaths = fNumAAConcavePaths - 236 int numSlowPaths = fNumAAConcavePaths -
240 fNumAAHairlineConcavePaths - 237 fNumAAHairlineConcavePaths -
241 fNumAADFEligibleConcavePaths; 238 fNumAADFEligibleConcavePaths;
242 239
243 bool ret = numSlowPathDashedPaths + numSlowPaths < kNumSlowPathsTol; 240 bool ret = numSlowPathDashedPaths + numSlowPaths < kNumSlowPathsTol;
244 241
245 if (!ret && reason) { 242 if (!ret && reason) {
246 *reason = "Too many slow paths (either concave or dashed)."; 243 *reason = "Too many slow paths (either concave or dashed).";
247 } 244 }
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 if (sk_atomic_compare_exchange(&fUniqueID, &id, next, 495 if (sk_atomic_compare_exchange(&fUniqueID, &id, next,
499 sk_memory_order_relaxed, 496 sk_memory_order_relaxed,
500 sk_memory_order_relaxed)) { 497 sk_memory_order_relaxed)) {
501 id = next; 498 id = next;
502 } else { 499 } else {
503 // sk_atomic_compare_exchange replaced id with the current value of fUniqueID. 500 // sk_atomic_compare_exchange replaced id with the current value of fUniqueID.
504 } 501 }
505 } 502 }
506 return id; 503 return id;
507 } 504 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698