First pass at GPU veto
As a short term solution this CL collects information during the recording process for use in suitableForGpuRasterization.
BUG=366495
R=bsalomon@google.com, reed@google.com, alokp@chromium.org
Author: robertphillips@google.com
Review URL: https://codereview.chromium.org/251533004
git-svn-id: http://skia.googlecode.com/svn/trunk@14368 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index f4fc736..f3d108c 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -1065,6 +1065,15 @@
void SkPictureRecord::drawPath(const SkPath& path, const SkPaint& paint) {
+ if (paint.isAntiAlias() && !path.isConvex()) {
+ fPicture->incAAConcavePaths();
+
+ if (SkPaint::kStroke_Style == paint.getStyle() &&
+ 0 == paint.getStrokeWidth()) {
+ fPicture->incAAHairlineConcavePaths();
+ }
+ }
+
#ifdef SK_COLLAPSE_MATRIX_CLIP_STATE
fMCMgr.call(SkMatrixClipStateMgr::kOther_CallType);
#endif
@@ -1578,6 +1587,10 @@
}
const SkFlatData* SkPictureRecord::addPaintPtr(const SkPaint* paint) {
+ if (NULL != paint && NULL != paint->getPathEffect()) {
+ fPicture->incPaintWithPathEffectUses();
+ }
+
const SkFlatData* data = paint ? getFlatPaintData(*paint) : NULL;
this->addFlatPaint(data);
return data;