Revert "Revert of Move copy-surface-as-draw fallback to GrGLGpu. (patchset #12 id:220001 of https://codereview.chromium.org/1144433002/)"
This reverts commit 404b3b264b833eb7cffdc833c7e2ebbd708e123a.
Review URL: https://codereview.chromium.org/1161063003
diff --git a/src/gpu/gl/GrGLCaps.h b/src/gpu/gl/GrGLCaps.h
index 87fc1f4..742a74d 100644
--- a/src/gpu/gl/GrGLCaps.h
+++ b/src/gpu/gl/GrGLCaps.h
@@ -10,6 +10,7 @@
#define GrGLCaps_DEFINED
#include "GrCaps.h"
+#include "GrGLSL.h"
#include "GrGLStencilAttachment.h"
#include "SkChecksum.h"
#include "SkTHash.h"
@@ -366,7 +367,6 @@
typedef GrCaps INHERITED;
};
-
class GrGLSLCaps : public GrShaderCaps {
public:
SK_DECLARE_INST_COUNT(GrGLSLCaps)
@@ -415,6 +415,12 @@
bool mustEnableSpecificAdvBlendEqs() const {
return fAdvBlendEqInteraction == kSpecificEnables_AdvBlendEqInteraction;
}
+
+ bool mustDeclareFragmentShaderOutput() const {
+ return fGLSLGeneration > k110_GrGLSLGeneration;
+ }
+
+ GrGLSLGeneration generation() const { return fGLSLGeneration; }
/**
* Returns a string containing the caps info.
@@ -427,6 +433,8 @@
// Must be called after fGeometryShaderSupport is initialized.
void initShaderPrecisionTable(const GrGLContextInfo&, const GrGLInterface*);
+ GrGLSLGeneration fGLSLGeneration;
+
bool fDropsTileOnZeroDivide : 1;
bool fFBFetchSupport : 1;
bool fFBFetchNeedsCustomOutput : 1;