aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-15 18:54:39 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-15 18:54:39 +0000
commit791816a87a569969c98167ca197ad106543e7f92 (patch)
treeeb9320628258216eea0c651f4d04553fd9b4e2e8
parent452ed43d50f9972d4756f5e3b4397fc02ecd90d8 (diff)
Rename kES2_GrGLBinding to kES_GrGLBinding. Step 0 for supporting ES3.
R=robertphillips@google.com Review URL: https://codereview.chromium.org/23185004 git-svn-id: http://skia.googlecode.com/svn/trunk@10747 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--src/gpu/gl/GrGLCaps.cpp8
-rw-r--r--src/gpu/gl/GrGLInterface.cpp2
-rw-r--r--src/gpu/gl/GrGLSL.cpp4
-rw-r--r--src/gpu/gl/GrGLShaderBuilder.cpp4
-rw-r--r--src/gpu/gl/GrGLShaderVar.h2
-rw-r--r--src/gpu/gl/GrGLUtil.cpp2
-rw-r--r--src/gpu/gl/GrGpuGL.cpp8
-rw-r--r--src/gpu/gl/SkGLContextHelper.cpp8
-rw-r--r--src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp4
-rw-r--r--src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp2
-rw-r--r--src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp2
11 files changed, 23 insertions, 23 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index ec5b82155f..10a7eefeda 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -101,7 +101,7 @@ void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
* Caps specific to GrGLCaps
**************************************************************************/
- if (kES2_GrGLBinding == binding) {
+ if (kES_GrGLBinding == binding) {
GR_GL_GetIntegerv(gli, GR_GL_MAX_FRAGMENT_UNIFORM_VECTORS,
&fMaxFragmentUniformVectors);
} else {
@@ -155,7 +155,7 @@ void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
ctxInfo.hasExtension("GL_ANGLE_pack_reverse_row_order");
}
- fTextureUsageSupport = (kES2_GrGLBinding == binding) &&
+ fTextureUsageSupport = (kES_GrGLBinding == binding) &&
ctxInfo.hasExtension("GL_ANGLE_texture_usage");
// Tex storage is in desktop 4.2 and can be an extension to desktop or ES.
@@ -183,7 +183,7 @@ void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
// ES 2 only guarantees RGBA/uchar + one other format/type combo for
// ReadPixels. The other format has to checked at run-time since it
// can change based on which render target is bound
- fTwoFormatLimit = kES2_GrGLBinding == binding;
+ fTwoFormatLimit = kES_GrGLBinding == binding;
// Known issue on at least some Intel platforms:
// http://code.google.com/p/skia/issues/detail?id=946
@@ -216,7 +216,7 @@ void GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
fVertexArrayObjectSupport = ctxInfo.hasExtension("GL_OES_vertex_array_object");
}
- if (kES2_GrGLBinding == binding) {
+ if (kES_GrGLBinding == binding) {
if (ctxInfo.hasExtension("GL_EXT_shader_framebuffer_fetch")) {
fFBFetchType = kEXT_FBFetchType;
} else if (ctxInfo.hasExtension("GL_NV_shader_framebuffer_fetch")) {
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index 72d7934cbd..8f94f1002c 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -150,7 +150,7 @@ bool GrGLInterface::validate(GrGLBinding binding) const {
// these functions are part of ES2, we assume they are available
// On the desktop we assume they are available if the extension
// is present or GL version is high enough.
- if (kES2_GrGLBinding == binding) {
+ if (kES_GrGLBinding == binding) {
if (NULL == fStencilFuncSeparate ||
NULL == fStencilMaskSeparate ||
NULL == fStencilOpSeparate) {
diff --git a/src/gpu/gl/GrGLSL.cpp b/src/gpu/gl/GrGLSL.cpp
index dcaa85e83e..2ede494b81 100644
--- a/src/gpu/gl/GrGLSL.cpp
+++ b/src/gpu/gl/GrGLSL.cpp
@@ -23,7 +23,7 @@ GrGLSLGeneration GrGetGLSLGeneration(GrGLBinding binding, const GrGLInterface* g
} else {
return k110_GrGLSLGeneration;
}
- case kES2_GrGLBinding:
+ case kES_GrGLBinding:
// version 1.00 of ES GLSL based on ver 1.20 of desktop GLSL
GrAssert(ver >= GR_GL_VER(1,00));
return k110_GrGLSLGeneration;
@@ -36,7 +36,7 @@ GrGLSLGeneration GrGetGLSLGeneration(GrGLBinding binding, const GrGLInterface* g
const char* GrGetGLSLVersionDecl(GrGLBinding binding, GrGLSLGeneration gen) {
switch (gen) {
case k110_GrGLSLGeneration:
- if (kES2_GrGLBinding == binding) {
+ if (kES_GrGLBinding == binding) {
// ES2s shader language is based on version 1.20 but is version
// 1.00 of the ES language.
return "#version 100\n";
diff --git a/src/gpu/gl/GrGLShaderBuilder.cpp b/src/gpu/gl/GrGLShaderBuilder.cpp
index 5ed8f0da09..57294975f7 100644
--- a/src/gpu/gl/GrGLShaderBuilder.cpp
+++ b/src/gpu/gl/GrGLShaderBuilder.cpp
@@ -165,7 +165,7 @@ bool GrGLShaderBuilder::enableFeature(GLSLFeature feature) {
if (!fCtxInfo.caps()->shaderDerivativeSupport()) {
return false;
}
- if (kES2_GrGLBinding == fCtxInfo.binding()) {
+ if (kES_GrGLBinding == fCtxInfo.binding()) {
this->addFSFeature(1 << kStandardDerivatives_GLSLFeature,
"GL_OES_standard_derivatives");
}
@@ -552,7 +552,7 @@ inline void append_default_precision_qualifier(GrGLShaderVar::Precision p,
GrGLBinding binding,
SkString* str) {
// Desktop GLSL has added precision qualifiers but they don't do anything.
- if (kES2_GrGLBinding == binding) {
+ if (kES_GrGLBinding == binding) {
switch (p) {
case GrGLShaderVar::kHigh_Precision:
str->append("precision highp float;\n");
diff --git a/src/gpu/gl/GrGLShaderVar.h b/src/gpu/gl/GrGLShaderVar.h
index e03ed3e563..0123b38bbd 100644
--- a/src/gpu/gl/GrGLShaderVar.h
+++ b/src/gpu/gl/GrGLShaderVar.h
@@ -304,7 +304,7 @@ public:
static const char* PrecisionString(Precision p, GrGLBinding binding) {
// Desktop GLSL has added precision qualifiers but they don't do anything.
- if (kES2_GrGLBinding == binding) {
+ if (kES_GrGLBinding == binding) {
switch (p) {
case kLow_Precision:
return "lowp ";
diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp
index a13b03de77..0c1434807b 100644
--- a/src/gpu/gl/GrGLUtil.cpp
+++ b/src/gpu/gl/GrGLUtil.cpp
@@ -116,7 +116,7 @@ GrGLBinding GrGLGetBindingInUseFromString(const char* versionString) {
// check for ES2
n = sscanf(versionString, "OpenGL ES %d.%d", &major, &minor);
if (2 == n) {
- return kES2_GrGLBinding;
+ return kES_GrGLBinding;
}
return kNone_GrGLBinding;
}
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 5845d7a673..64f4dfe9ea 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -263,7 +263,7 @@ bool GrGpuGL::canWriteTexturePixels(const GrTexture* texture, GrPixelConfig srcC
if (kIndex_8_GrPixelConfig == srcConfig || kIndex_8_GrPixelConfig == texture->config()) {
return false;
}
- if (srcConfig != texture->config() && kES2_GrGLBinding == this->glBinding()) {
+ if (srcConfig != texture->config() && kES_GrGLBinding == this->glBinding()) {
// In general ES2 requires the internal format of the texture and the format of the src
// pixels to match. However, It may or may not be possible to upload BGRA data to a RGBA
// texture. It depends upon which extension added BGRA. The Apple extension allows it
@@ -810,7 +810,7 @@ bool GrGpuGL::createRenderTargetObjects(int width, int height,
!desc->fMSColorRenderbufferID ||
!this->configToGLFormats(desc->fConfig,
// GLES requires sized internal formats
- kES2_GrGLBinding == this->glBinding(),
+ kES_GrGLBinding == this->glBinding(),
&msColorFormat,
NULL,
NULL)) {
@@ -2303,7 +2303,7 @@ inline bool can_copy_texsubimage(const GrSurface* dst,
// Table 3.9 of the ES2 spec indicates the supported formats with CopyTexSubImage
// and BGRA isn't in the spec. There doesn't appear to be any extension that adds it. Perhaps
// many drivers would allow it to work, but ANGLE does not.
- if (kES2_GrGLBinding == gpu->glBinding() && gpu->glCaps().bgraIsInternalFormat() &&
+ if (kES_GrGLBinding == gpu->glBinding() && gpu->glCaps().bgraIsInternalFormat() &&
(kBGRA_8888_GrPixelConfig == dst->config() || kBGRA_8888_GrPixelConfig == src->config())) {
return false;
}
@@ -2364,7 +2364,7 @@ inline GrGLuint bind_surface_as_fbo(const GrGLInterface* gl,
void GrGpuGL::initCopySurfaceDstDesc(const GrSurface* src, GrTextureDesc* desc) {
// Check for format issues with glCopyTexSubImage2D
- if (kES2_GrGLBinding == this->glBinding() && this->glCaps().bgraIsInternalFormat() &&
+ if (kES_GrGLBinding == this->glBinding() && this->glCaps().bgraIsInternalFormat() &&
kBGRA_8888_GrPixelConfig == src->config()) {
// glCopyTexSubImage2D doesn't work with this config. We'll want to make it a render target
// in order to call glBlitFramebuffer or to copy to it by rendering.
diff --git a/src/gpu/gl/SkGLContextHelper.cpp b/src/gpu/gl/SkGLContextHelper.cpp
index 9dcc8ecbb8..c4e94318ff 100644
--- a/src/gpu/gl/SkGLContextHelper.cpp
+++ b/src/gpu/gl/SkGLContextHelper.cpp
@@ -61,7 +61,7 @@ bool SkGLContextHelper::init(int width, int height) {
SK_GL(*this, BindFramebuffer(GR_GL_FRAMEBUFFER, fFBO));
SK_GL(*this, GenRenderbuffers(1, &fColorBufferID));
SK_GL(*this, BindRenderbuffer(GR_GL_RENDERBUFFER, fColorBufferID));
- if (kES2_GrGLBinding == bindingInUse) {
+ if (kES_GrGLBinding == bindingInUse) {
SK_GL(*this, RenderbufferStorage(GR_GL_RENDERBUFFER,
GR_GL_RGBA8,
width, height));
@@ -81,7 +81,7 @@ bool SkGLContextHelper::init(int width, int height) {
// in binding a packed format an FBO. However, we can't rely on packed
// depth stencil being available.
bool supportsPackedDepthStencil;
- if (kES2_GrGLBinding == bindingInUse) {
+ if (kES_GrGLBinding == bindingInUse) {
supportsPackedDepthStencil = this->hasExtension("GL_OES_packed_depth_stencil");
} else {
supportsPackedDepthStencil = version >= GR_GL_VER(3,0) ||
@@ -92,7 +92,7 @@ bool SkGLContextHelper::init(int width, int height) {
if (supportsPackedDepthStencil) {
// ES2 requires sized internal formats for RenderbufferStorage
// On Desktop we let the driver decide.
- GrGLenum format = kES2_GrGLBinding == bindingInUse ?
+ GrGLenum format = kES_GrGLBinding == bindingInUse ?
GR_GL_DEPTH24_STENCIL8 :
GR_GL_DEPTH_STENCIL;
SK_GL(*this, RenderbufferStorage(GR_GL_RENDERBUFFER,
@@ -103,7 +103,7 @@ bool SkGLContextHelper::init(int width, int height) {
GR_GL_RENDERBUFFER,
fDepthStencilBufferID));
} else {
- GrGLenum format = kES2_GrGLBinding == bindingInUse ?
+ GrGLenum format = kES_GrGLBinding == bindingInUse ?
GR_GL_STENCIL_INDEX8 :
GR_GL_STENCIL_INDEX;
SK_GL(*this, RenderbufferStorage(GR_GL_RENDERBUFFER,
diff --git a/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp b/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
index cfd181a6ef..17f7f19ba7 100644
--- a/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
+++ b/src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp
@@ -20,12 +20,12 @@ const GrGLInterface* GrGLCreateNativeInterface() {
static SkAutoTUnref<GrGLInterface> glInterface;
if (!glInterface.get()) {
GrGLExtensions extensions;
- if (!extensions.init(kES2_GrGLBinding, glGetString, NULL, glGetIntegerv)) {
+ if (!extensions.init(kES_GrGLBinding, glGetString, NULL, glGetIntegerv)) {
return NULL;
}
GrGLInterface* interface = new GrGLInterface;
glInterface.reset(interface);
- interface->fBindingsExported = kES2_GrGLBinding;
+ interface->fBindingsExported = kES_GrGLBinding;
interface->fActiveTexture = glActiveTexture;
interface->fAttachShader = glAttachShader;
interface->fBindAttribLocation = glBindAttribLocation;
diff --git a/src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp b/src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp
index d74e395fd6..19aee2bae3 100644
--- a/src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp
+++ b/src/gpu/gl/angle/GrGLCreateANGLEInterface.cpp
@@ -37,7 +37,7 @@ const GrGLInterface* GrGLCreateANGLEInterface() {
if (!glInterface.get()) {
GrGLInterface* interface = new GrGLInterface;
glInterface.reset(interface);
- interface->fBindingsExported = kES2_GrGLBinding;
+ interface->fBindingsExported = kES_GrGLBinding;
GET_PROC(ActiveTexture);
GET_PROC(AttachShader);
diff --git a/src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp b/src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp
index 62a39e383a..e8e9a2a401 100644
--- a/src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp
+++ b/src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp
@@ -145,7 +145,7 @@ const GrGLInterface* GrGLCreateNativeInterface() {
interface->fGenVertexArrays = glGenVertexArraysOES;
#endif
- interface->fBindingsExported = kES2_GrGLBinding;
+ interface->fBindingsExported = kES_GrGLBinding;
}
glInterface.get()->ref();
return glInterface.get();