Always support pack/unpack row length on ES3. Add support for NV_pack_subimage extension.
R=robertphillips@google.com
Author: bsalomon@google.com
Review URL: https://chromiumcodereview.appspot.com/23003009
git-svn-id: http://skia.googlecode.com/svn/trunk@10778 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 61ef852..5ddf21c 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -147,10 +147,11 @@
fPackRowLengthSupport = true;
fPackFlipYSupport = false;
} else {
- fUnpackRowLengthSupport =ctxInfo.hasExtension("GL_EXT_unpack_subimage");
+ fUnpackRowLengthSupport = version >= GR_GL_VER(3,0) ||
+ ctxInfo.hasExtension("GL_EXT_unpack_subimage");
fUnpackFlipYSupport = ctxInfo.hasExtension("GL_CHROMIUM_flipy");
- // no extension for pack row length
- fPackRowLengthSupport = false;
+ fPackRowLengthSupport = version >= GR_GL_VER(3,0) ||
+ ctxInfo.hasExtension("GL_NV_pack_subimage");
fPackFlipYSupport =
ctxInfo.hasExtension("GL_ANGLE_pack_reverse_row_order");
}