Add can-ignore-rect hint to clear call
https://codereview.chromium.org/53823003/
git-svn-id: http://skia.googlecode.com/svn/trunk@12064 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 8e6c3e2..60c0dfa 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -48,6 +48,7 @@
fIsCoreProfile = false;
fFixedFunctionSupport = false;
fDiscardFBSupport = false;
+ fFullClearIsFree = false;
}
GrGLCaps::GrGLCaps(const GrGLCaps& caps) : GrDrawTargetCaps() {
@@ -84,6 +85,7 @@
fIsCoreProfile = caps.fIsCoreProfile;
fFixedFunctionSupport = caps.fFixedFunctionSupport;
fDiscardFBSupport = caps.fDiscardFBSupport;
+ fFullClearIsFree = caps.fFullClearIsFree;
return *this;
}
@@ -224,6 +226,10 @@
fDiscardFBSupport = ctxInfo.hasExtension("GL_EXT_discard_framebuffer");
+ if (kARM_GrGLVendor == ctxInfo.vendor() || kImagination_GrGLVendor == ctxInfo.vendor()) {
+ fFullClearIsFree = true;
+ }
+
if (kDesktop_GrGLBinding == binding) {
fVertexArrayObjectSupport = version >= GR_GL_VER(3, 0) ||
ctxInfo.hasExtension("GL_ARB_vertex_array_object");
@@ -648,4 +654,5 @@
GrPrintf("Use non-VBO for dynamic data: %s\n",
(fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO"));
GrPrintf("Discard FrameBuffer support: %s\n", (fDiscardFBSupport ? "YES" : "NO"));
+ GrPrintf("Full screen clear is free: %s\n", (fFullClearIsFree ? "YES" : "NO"));
}