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

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: cleanup per review comments 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 break; 223 break;
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 - fNumFastPathDashE ffects;
234 if (0 == sampleCount) {
235 // The fast dashing path only works when MSAA is disabled
236 numSlowPathDashedPaths -= fNumFastPathDashEffects;
237 }
238 234
239 int numSlowPaths = fNumAAConcavePaths - 235 int numSlowPaths = fNumAAConcavePaths -
240 fNumAAHairlineConcavePaths - 236 fNumAAHairlineConcavePaths -
241 fNumAADFEligibleConcavePaths; 237 fNumAADFEligibleConcavePaths;
242 238
243 bool ret = numSlowPathDashedPaths + numSlowPaths < kNumSlowPathsTol; 239 bool ret = numSlowPathDashedPaths + numSlowPaths < kNumSlowPathsTol;
244 240
245 if (!ret && reason) { 241 if (!ret && reason) {
246 *reason = "Too many slow paths (either concave or dashed)."; 242 *reason = "Too many slow paths (either concave or dashed).";
247 } 243 }
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 if (sk_atomic_compare_exchange(&fUniqueID, &id, next, 495 if (sk_atomic_compare_exchange(&fUniqueID, &id, next,
500 sk_memory_order_relaxed, 496 sk_memory_order_relaxed,
501 sk_memory_order_relaxed)) { 497 sk_memory_order_relaxed)) {
502 id = next; 498 id = next;
503 } else { 499 } else {
504 // 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.
505 } 501 }
506 } 502 }
507 return id; 503 return id;
508 } 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