Make copySurface work in more situations.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1693923002
Review URL: https://codereview.chromium.org/1693923002
diff --git a/src/gpu/gl/GrGLCaps.h b/src/gpu/gl/GrGLCaps.h
index abfcc28..fc29615 100644
--- a/src/gpu/gl/GrGLCaps.h
+++ b/src/gpu/gl/GrGLCaps.h
@@ -77,10 +77,20 @@
kLast_MSFBOType = kMixedSamples_MSFBOType
};
+ enum BlitFramebufferSupport {
+ kNone_BlitFramebufferSupport,
+ /**
+ * ANGLE exposes a limited blit framebuffer extension that does not allow for stretching
+ * or mirroring.
+ */
+ kNoScalingNoMirroring_BlitFramebufferSupport,
+ kFull_BlitFramebufferSupport
+ };
+
enum InvalidateFBType {
kNone_InvalidateFBType,
kDiscard_InvalidateFBType, //<! glDiscardFramebuffer()
- kInvalidate_InvalidateFBType, //<! glInvalidateFramebuffer()
+ kInvalidate_InvalidateFBType, //<! glInvalidateFramebuffer()
kLast_InvalidateFBType = kInvalidate_InvalidateFBType
};
@@ -202,7 +212,7 @@
MSFBOType msFBOType() const { return fMSFBOType; }
/**
- * Does the supported MSAA FBO extension have MSAA renderbuffers?
+ * Does the preferred MSAA FBO extension have MSAA renderbuffers?
*/
bool usesMSAARenderBuffers() const {
return kNone_MSFBOType != fMSFBOType &&
@@ -212,6 +222,11 @@
}
/**
+ * What functionality is supported by glBlitFramebuffer.
+ */
+ BlitFramebufferSupport blitFramebufferSupport() const { return fBlitFramebufferSupport; }
+
+ /**
* Is the MSAA FBO extension one where the texture is multisampled when bound to an FBO and
* then implicitly resolved when read.
*/
@@ -403,6 +418,8 @@
bool fRectangleTextureSupport : 1;
bool fTextureSwizzleSupport : 1;
+ BlitFramebufferSupport fBlitFramebufferSupport;
+
/** Number type of the components (with out considering number of bits.) */
enum FormatType {
kNormalizedFixedPoint_FormatType,