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

Unified Diff: src/core/SkPicturePlayback.h

Issue 334053005: Remove dashing from gpu veto (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Change to use wall timer Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkPicturePlayback.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPicturePlayback.h
diff --git a/src/core/SkPicturePlayback.h b/src/core/SkPicturePlayback.h
index 23c49cfe7177e697d1e8ba4bbd12e5a9373c7edf..3cdd9af3f3fcb0523f95c33f9e12aaa9ba7aa360 100644
--- a/src/core/SkPicturePlayback.h
+++ b/src/core/SkPicturePlayback.h
@@ -70,18 +70,21 @@ public:
void set(const SkPictureContentInfo& src) {
fNumPaintWithPathEffectUses = src.fNumPaintWithPathEffectUses;
+ fNumFastPathDashEffects = src.fNumFastPathDashEffects;
fNumAAConcavePaths = src.fNumAAConcavePaths;
fNumAAHairlineConcavePaths = src.fNumAAHairlineConcavePaths;
}
void reset() {
fNumPaintWithPathEffectUses = 0;
+ fNumFastPathDashEffects = 0;
fNumAAConcavePaths = 0;
fNumAAHairlineConcavePaths = 0;
}
void swap(SkPictureContentInfo* other) {
SkTSwap(fNumPaintWithPathEffectUses, other->fNumPaintWithPathEffectUses);
+ SkTSwap(fNumFastPathDashEffects, other->fNumFastPathDashEffects);
SkTSwap(fNumAAConcavePaths, other->fNumAAConcavePaths);
SkTSwap(fNumAAHairlineConcavePaths, other->fNumAAHairlineConcavePaths);
}
@@ -89,6 +92,9 @@ public:
void incPaintWithPathEffectUses() { ++fNumPaintWithPathEffectUses; }
int numPaintWithPathEffectUses() const { return fNumPaintWithPathEffectUses; }
+ void incFastPathDashEffects() { ++fNumFastPathDashEffects; }
+ int numFastPathDashEffects() const { return fNumFastPathDashEffects; }
+
void incAAConcavePaths() { ++fNumAAConcavePaths; }
int numAAConcavePaths() const { return fNumAAConcavePaths; }
@@ -102,6 +108,9 @@ private:
// This field is incremented every time a paint with a path effect is
// used (i.e., it is not a de-duplicated count)
int fNumPaintWithPathEffectUses;
+ // This field is incremented every time a paint with a path effect that is
+ // dashed, we are drawing a line, and we can use the gpu fast path
+ int fNumFastPathDashEffects;
// This field is incremented every time an anti-aliased drawPath call is
// issued with a concave path
int fNumAAConcavePaths;
@@ -269,7 +278,19 @@ public:
#endif
#if SK_SUPPORT_GPU
- bool suitableForGpuRasterization(GrContext* context, const char **reason) const;
+ /**
+ * sampleCount is the number of samples-per-pixel or zero if non-MSAA.
+ * It is defaulted to be zero.
+ */
+ bool suitableForGpuRasterization(GrContext* context, const char **reason,
+ int sampleCount = 0) const;
+
+ /**
+ * Calls getRecommendedSampleCount with GrPixelConfig and dpi to calculate sampleCount
+ * and then calls the above version of suitableForGpuRasterization
+ */
+ bool suitableForGpuRasterization(GrContext* context, const char **reason,
+ GrPixelConfig config, SkScalar dpi) const;
#endif
private: // these help us with reading/writing
« no previous file with comments | « no previous file | src/core/SkPicturePlayback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698