Committed on behalf of Guanqun.Lu@gmail.com
Review URL: http://codereview.appspot.com/6300106/
git-svn-id: http://skia.googlecode.com/svn/trunk@4272
2bbb7eff-a529-9590-31e7-
b0007b416f81
fTextureUsageSupport = false;
fTexStorageSupport = false;
fTextureRedSupport = false;
+ fImagingSupport = false;
}
GrGLCaps::GrGLCaps(const GrGLCaps& caps) {
fTextureUsageSupport = caps.fTextureUsageSupport;
fTexStorageSupport = caps.fTexStorageSupport;
fTextureRedSupport = caps.fTextureRedSupport;
+ fImagingSupport = caps.fImagingSupport;
return *this;
}
fTextureRedSupport = ctxInfo.hasExtension("GL_EXT_texture_rg");
}
+ fImagingSupport = kDesktop_GrGLBinding == binding &&
+ ctxInfo.hasExtension("GL_ARB_imaging");
+
this->initFSAASupport(ctxInfo);
this->initStencilFormats(ctxInfo);
}
/// Is there support for GL_RED and GL_R8
bool textureRedSupport() const { return fTextureRedSupport; }
+ /// Is GL_ARB_IMAGING supported
+ bool imagingSupport() const { return fImagingSupport; }
+
private:
/**
* Maintains a bit per GrPixelConfig. It is used to avoid redundantly
bool fTextureUsageSupport : 1;
bool fTexStorageSupport : 1;
bool fTextureRedSupport : 1;
+ bool fImagingSupport : 1;
};
#endif
GL_CALL(Disable(GR_GL_POLYGON_SMOOTH));
GL_CALL(Disable(GR_GL_POLYGON_STIPPLE));
GL_CALL(Disable(GR_GL_COLOR_LOGIC_OP));
- GL_CALL(Disable(GR_GL_COLOR_TABLE));
+ if (this->glCaps().imagingSupport()) {
+ GL_CALL(Disable(GR_GL_COLOR_TABLE));
+ }
GL_CALL(Disable(GR_GL_INDEX_LOGIC_OP));
GL_CALL(Disable(GR_GL_POLYGON_OFFSET_FILL));
// Since ES doesn't support glPointSize at all we always use the VS to