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

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

Issue 1317443004: Calculate pixel config and stencil fmt pairs once per pixel config. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Unused variable Created 5 years, 3 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
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLCaps.cpp
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index ea2daeed1ee13cde96af36c4f8b2bc69f34cac7a..e3c61385a96f50c8c94daa0e079d0d8e320cf7bc 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -18,7 +18,6 @@ GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions,
const GrGLInterface* glInterface) : INHERITED(contextOptions) {
fVerifiedColorConfigs.reset();
fStencilFormats.reset();
- fStencilVerifiedColorConfigs.reset();
fMSFBOType = kNone_MSFBOType;
fInvalidateFBType = kNone_InvalidateFBType;
fLATCAlias = kLATC_LATCAlias;
@@ -1019,53 +1018,6 @@ void GrGLCaps::initStencilFormats(const GrGLContextInfo& ctxInfo) {
fStencilFormats.push_back() = gS4;
}
}
- SkASSERT(0 == fStencilVerifiedColorConfigs.count());
- fStencilVerifiedColorConfigs.push_back_n(fStencilFormats.count());
-}
-
-void GrGLCaps::markColorConfigAndStencilFormatAsVerified(
- GrPixelConfig config,
- const GrGLStencilAttachment::Format& format) {
-#if !GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT
- return;
-#endif
- SkASSERT((unsigned)config < (unsigned)kGrPixelConfigCnt);
- SkASSERT(fStencilFormats.count() == fStencilVerifiedColorConfigs.count());
- int count = fStencilFormats.count();
- // we expect a really small number of possible formats so linear search
- // should be OK
- SkASSERT(count < 16);
- for (int i = 0; i < count; ++i) {
- if (format.fInternalFormat ==
- fStencilFormats[i].fInternalFormat) {
- fStencilVerifiedColorConfigs[i].markVerified(config);
- return;
- }
- }
- SkFAIL("Why are we seeing a stencil format that "
- "GrGLCaps doesn't know about.");
-}
-
-bool GrGLCaps::isColorConfigAndStencilFormatVerified(
- GrPixelConfig config,
- const GrGLStencilAttachment::Format& format) const {
-#if !GR_GL_CHECK_FBO_STATUS_ONCE_PER_FORMAT
- return false;
-#endif
- SkASSERT((unsigned)config < (unsigned)kGrPixelConfigCnt);
- int count = fStencilFormats.count();
- // we expect a really small number of possible formats so linear search
- // should be OK
- SkASSERT(count < 16);
- for (int i = 0; i < count; ++i) {
- if (format.fInternalFormat ==
- fStencilFormats[i].fInternalFormat) {
- return fStencilVerifiedColorConfigs[i].isVerified(config);
- }
- }
- SkFAIL("Why are we seeing a stencil format that "
- "GLCaps doesn't know about.");
- return false;
}
SkString GrGLCaps::dump() const {
« no previous file with comments | « src/gpu/gl/GrGLCaps.h ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698