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

Unified Diff: src/gpu/gl/GrGLCaps.cpp

Issue 53823003: Add can-ignore-rect hint to clear call (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: cleaned up Created 7 years, 2 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
Index: src/gpu/gl/GrGLCaps.cpp
===================================================================
--- src/gpu/gl/GrGLCaps.cpp (revision 12054)
+++ src/gpu/gl/GrGLCaps.cpp (working copy)
@@ -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"));
}
« src/gpu/GrDrawTarget.h ('K') | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698