aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-01-23 10:30:17 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-23 18:28:46 +0000
commitb4e965c103c3140f0072949343befb34bceadc96 (patch)
tree71e989c6002dae88d3438d991996ad1f7725d6c9 /include
parente70b9e899c987a73d964b9b630c65523ad84717a (diff)
Revert "Revert "Use GrOvalOpFactory ops to draw non-AA rrects, ovals, and arcs.""
This reverts commit befff6580e9dc6b15bc6db3cc3f5fff22185cba8. Bug: skia: Change-Id: Ia108408cd986c03783af5058845790f6b17201f4 Reviewed-on: https://skia-review.googlesource.com/98703 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/private/GrTypesPriv.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/private/GrTypesPriv.h b/include/private/GrTypesPriv.h
index cfcbff9af9..a379135532 100644
--- a/include/private/GrTypesPriv.h
+++ b/include/private/GrTypesPriv.h
@@ -9,11 +9,12 @@
#define GrTypesPriv_DEFINED
#include <chrono>
+#include "GrSharedEnums.h"
#include "GrTypes.h"
#include "SkRefCnt.h"
-#include "GrSharedEnums.h"
class GrCaps;
+class GrPaint;
// The old libstdc++ uses the draft name "monotonic_clock" rather than "steady_clock". This might
// not actually be monotonic, depending on how libstdc++ was built. However, this is only currently
@@ -87,7 +88,18 @@ enum class GrFSAAType {
*/
enum class GrAllowMixedSamples : bool { kNo = false, kYes = true };
-GrAAType GrChooseAAType(GrAA, GrFSAAType, GrAllowMixedSamples, const GrCaps&);
+/**
+ * We have code paths for some shapes that can draw non-AA using boolean fragment shader coverage.
+ * However, it may not be desirable to use this if it will trigger a dst copy. If the caller
+ * of GrChooseAAType passes GrAllowNonAABinaryCoverage::kYes and GrAA::kNo then GrChooseAAType will
+ * consider whether it is efficient to use coverage to implement a non-AA draw and if so return
+ * will GrAAType::kCoverage. If GrAA::kYes is passed then this value is ignored.
+ */
+enum class GrAllowNonAABinaryCoverage : bool { kNo = false, kYes = true };
+
+/** GrPaint is only required if GrAllowNonAABinaryCoverage and GrAA are both kYes. */
+GrAAType GrChooseAAType(GrAA, GrFSAAType, GrAllowMixedSamples, GrAllowNonAABinaryCoverage,
+ const GrPaint*, const GrCaps&);
/**
* Some pixel configs are inherently clamped to [0,1], while others can hold values outside of that