diff options
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 3 | ||||
-rw-r--r-- | src/gpu/gl/SkGLContextHelper.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 1488e75c29..8ca88c14aa 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -501,7 +501,8 @@ void GrGLCaps::initStencilFormats(const GrGLContextInfo& ctxInfo) { fStencilFormats.push_back() = gS8; //fStencilFormats.push_back() = gS16; - if (ctxInfo.hasExtension("GL_OES_packed_depth_stencil")) { + if (ctxInfo.version() >= GR_GL_VER(3,0) || + ctxInfo.hasExtension("GL_OES_packed_depth_stencil")) { fStencilFormats.push_back() = gD24S8; } if (ctxInfo.hasExtension("GL_OES_stencil4")) { diff --git a/src/gpu/gl/SkGLContextHelper.cpp b/src/gpu/gl/SkGLContextHelper.cpp index c4e94318ff..6f0372dde4 100644 --- a/src/gpu/gl/SkGLContextHelper.cpp +++ b/src/gpu/gl/SkGLContextHelper.cpp @@ -82,7 +82,8 @@ bool SkGLContextHelper::init(int width, int height) { // depth stencil being available. bool supportsPackedDepthStencil; if (kES_GrGLBinding == bindingInUse) { - supportsPackedDepthStencil = this->hasExtension("GL_OES_packed_depth_stencil"); + supportsPackedDepthStencil = version >= GR_GL_VER(3,0) || + this->hasExtension("GL_OES_packed_depth_stencil"); } else { supportsPackedDepthStencil = version >= GR_GL_VER(3,0) || this->hasExtension("GL_EXT_packed_depth_stencil") || |