Remove old GR_* macros for GL extensions in favor of GrGLDefines.h
Review URL: http://codereview.appspot.com/4275061/
git-svn-id: http://skia.googlecode.com/svn/trunk@972 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/include/GrGLConfig.h b/gpu/include/GrGLConfig.h
index 8599b63..f43e88e 100644
--- a/gpu/include/GrGLConfig.h
+++ b/gpu/include/GrGLConfig.h
@@ -99,50 +99,12 @@
// Windows where we match GDI's order).
#ifndef GR_GL_32BPP_COLOR_FORMAT
#if GR_WIN32_BUILD
- #define GR_GL_32BPP_COLOR_FORMAT GR_BGRA //use GR prefix because this
- #else //may be an extension.
+ #define GR_GL_32BPP_COLOR_FORMAT GR_GL_BGRA
+ #else
#define GR_GL_32BPP_COLOR_FORMAT GR_GL_RGBA
#endif
#endif
-
-
-// BGRA format
-#define GR_BGRA 0x80E1
-
-// FBO / stencil formats
-#define GR_FRAMEBUFFER 0x8D40
-#define GR_FRAMEBUFFER_COMPLETE 0x8CD5
-#define GR_COLOR_ATTACHMENT0 0x8CE0
-#define GR_FRAMEBUFFER_BINDING 0x8CA6
-#define GR_RENDERBUFFER 0x8D41
-#define GR_STENCIL_ATTACHMENT 0x8D20
-#define GR_STENCIL_INDEX4 0x8D47
-#define GR_STENCIL_INDEX8 0x8D48
-#define GR_STENCIL_INDEX16 0x8D49
-#define GR_DEPTH24_STENCIL8 0x88F0
-#define GR_MAX_RENDERBUFFER_SIZE 0x84E8
-#define GR_DEPTH_STENCIL_ATTACHMENT 0x821A
-#define GR_DEPTH_STENCIL 0x84F9
-#define GR_RGBA8 0x8058
-#define GR_RGB565 0x8D62
-
-
-// Multisampling
-
-// IMG MAX_SAMPLES uses a different value than desktop, Apple ES extension.
-#define GR_MAX_SAMPLES 0x8D57
-#define GR_MAX_SAMPLES_IMG 0x9135
-#define GR_READ_FRAMEBUFFER 0x8CA8
-#define GR_DRAW_FRAMEBUFFER 0x8CA9
-
-// Buffer mapping
-#define GR_WRITE_ONLY 0x88B9
-#define GR_BUFFER_MAPPED 0x88BC
-
-// Palette texture
-#define GR_PALETTE8_RGBA8 0x8B91
-
////////////////////////////////////////////////////////////////////////////////
extern void GrGLCheckErr(const char* location, const char* call);
diff --git a/gpu/include/GrGLDefines.h b/gpu/include/GrGLDefines.h
index 4c36e74..e2d9106 100644
--- a/gpu/include/GrGLDefines.h
+++ b/gpu/include/GrGLDefines.h
@@ -286,8 +286,10 @@
#define GR_GL_ALPHA 0x1906
#define GR_GL_RGB 0x1907
#define GR_GL_RGBA 0x1908
+#define GR_GL_BGRA 0x80E1
#define GR_GL_LUMINANCE 0x1909
#define GR_GL_LUMINANCE_ALPHA 0x190A
+#define GR_GL_PALETTE8_RGBA8 0x8B96
/* PixelType */
/* GL_UNSIGNED_BYTE */
@@ -559,6 +561,9 @@
#define GR_GL_T2F_C4F_N3F_V3F 0x2A2C
#define GR_GL_T4F_C4F_N3F_V4F 0x2A2D
+/* Vertex Buffer Object */
+#define GR_GL_WRITE_ONLY 0x88B9
+#define GR_GL_BUFFER_MAPPED 0x88BC
/* Read Format */
#define GR_GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
#define GR_GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
@@ -583,14 +588,25 @@
/* Framebuffer Object. */
#define GR_GL_FRAMEBUFFER 0x8D40
+#define GR_GL_READ_FRAMEBUFFER 0x8CA8
+#define GR_GL_DRAW_FRAMEBUFFER 0x8CA9
+
#define GR_GL_RENDERBUFFER 0x8D41
#define GR_GL_RGBA4 0x8056
#define GR_GL_RGB5_A1 0x8057
#define GR_GL_RGB565 0x8D62
+#define GR_GL_RGBA8 0x8058
#define GR_GL_DEPTH_COMPONENT16 0x81A5
#define GR_GL_STENCIL_INDEX 0x1901
+#define GR_GL_STENCIL_INDEX4 0x8D47
#define GR_GL_STENCIL_INDEX8 0x8D48
+#define GR_GL_STENCIL_INDEX16 0x8D49
+#define GR_GL_DEPTH_STENCIL 0x84F9
+#define GR_GL_DEPTH24_STENCIL8 0x88F0
+
+#define GR_GL_MAX_SAMPLES 0x8D57
+#define GR_GL_MAX_SAMPLES_IMG 0x9135 // to be removed soon.
#define GR_GL_RENDERBUFFER_WIDTH 0x8D42
#define GR_GL_RENDERBUFFER_HEIGHT 0x8D43
@@ -610,6 +626,7 @@
#define GR_GL_COLOR_ATTACHMENT0 0x8CE0
#define GR_GL_DEPTH_ATTACHMENT 0x8D00
#define GR_GL_STENCIL_ATTACHMENT 0x8D20
+#define GR_GL_DEPTH_STENCIL_ATTACHMENT 0x821A
#define GR_GL_NONE 0
diff --git a/gpu/src/GrGLIndexBuffer.cpp b/gpu/src/GrGLIndexBuffer.cpp
index a272d27..9d73419 100644
--- a/gpu/src/GrGLIndexBuffer.cpp
+++ b/gpu/src/GrGLIndexBuffer.cpp
@@ -57,7 +57,7 @@
// Let driver know it can discard the old data
GR_GL(BufferData(GR_GL_ELEMENT_ARRAY_BUFFER, size(), NULL,
dynamic() ? GR_GL_DYNAMIC_DRAW : GR_GL_STATIC_DRAW));
- fLockPtr = GR_GL(MapBuffer(GR_GL_ELEMENT_ARRAY_BUFFER, GR_WRITE_ONLY));
+ fLockPtr = GR_GL(MapBuffer(GR_GL_ELEMENT_ARRAY_BUFFER, GR_GL_WRITE_ONLY));
return fLockPtr;
}
@@ -85,7 +85,7 @@
bind();
GrGLint mapped;
GR_GL(GetBufferParameteriv(GR_GL_ELEMENT_ARRAY_BUFFER,
- GR_BUFFER_MAPPED, &mapped));
+ GR_GL_BUFFER_MAPPED, &mapped));
GrAssert(!!mapped == !!fLockPtr);
}
#endif
diff --git a/gpu/src/GrGLTexture.cpp b/gpu/src/GrGLTexture.cpp
index 3970e85..ae36e4c 100644
--- a/gpu/src/GrGLTexture.cpp
+++ b/gpu/src/GrGLTexture.cpp
@@ -163,7 +163,7 @@
// glCompressedTexSubImage2D doesn't support any formats
// (at least without extensions)
- GrAssert(fUploadFormat != GR_PALETTE8_RGBA8);
+ GrAssert(fUploadFormat != GR_GL_PALETTE8_RGBA8);
// If we need to update textures that are created upside down
// then we have to modify this code to flip the srcData
diff --git a/gpu/src/GrGLVertexBuffer.cpp b/gpu/src/GrGLVertexBuffer.cpp
index 3acbd76..f96f90e 100644
--- a/gpu/src/GrGLVertexBuffer.cpp
+++ b/gpu/src/GrGLVertexBuffer.cpp
@@ -57,7 +57,7 @@
// Let driver know it can discard the old data
GR_GL(BufferData(GR_GL_ARRAY_BUFFER, size(), NULL,
dynamic() ? GR_GL_DYNAMIC_DRAW : GR_GL_STATIC_DRAW));
- fLockPtr = GR_GL(MapBuffer(GR_GL_ARRAY_BUFFER, GR_WRITE_ONLY));
+ fLockPtr = GR_GL(MapBuffer(GR_GL_ARRAY_BUFFER, GR_GL_WRITE_ONLY));
return fLockPtr;
}
return NULL;
@@ -83,7 +83,7 @@
if (fGL->supportsBufferLocking()) {
GrGLint mapped;
bind();
- GR_GL(GetBufferParameteriv(GR_GL_ARRAY_BUFFER, GR_BUFFER_MAPPED, &mapped));
+ GR_GL(GetBufferParameteriv(GR_GL_ARRAY_BUFFER, GR_GL_BUFFER_MAPPED, &mapped));
GrAssert(!!mapped == !!fLockPtr);
}
#endif
diff --git a/gpu/src/GrGpuGL.cpp b/gpu/src/GrGpuGL.cpp
index 9604650..e944551 100644
--- a/gpu/src/GrGpuGL.cpp
+++ b/gpu/src/GrGpuGL.cpp
@@ -142,13 +142,13 @@
GrGLint savedFBO;
GrGLint savedTexUnit;
GR_GL_GetIntegerv(GR_GL_ACTIVE_TEXTURE, &savedTexUnit);
- GR_GL_GetIntegerv(GR_FRAMEBUFFER_BINDING, &savedFBO);
+ GR_GL_GetIntegerv(GR_GL_FRAMEBUFFER_BINDING, &savedFBO);
GR_GL(ActiveTexture(GR_GL_TEXTURE0 + SPARE_TEX_UNIT));
GrGLuint testFBO;
GR_GL(GenFramebuffers(1, &testFBO));
- GR_GL(BindFramebuffer(GR_FRAMEBUFFER, testFBO));
+ GR_GL(BindFramebuffer(GR_GL_FRAMEBUFFER, testFBO));
GrGLuint testRTTex;
GR_GL(GenTextures(1, &testRTTex));
GR_GL(BindTexture(GR_GL_TEXTURE_2D, testRTTex));
@@ -158,16 +158,16 @@
GR_GL(TexImage2D(GR_GL_TEXTURE_2D, 0, GR_GL_RGBA, w, h,
0, GR_GL_RGBA, GR_GL_UNSIGNED_BYTE, NULL));
GR_GL(BindTexture(GR_GL_TEXTURE_2D, 0));
- GR_GL(FramebufferTexture2D(GR_FRAMEBUFFER, GR_COLOR_ATTACHMENT0,
+ GR_GL(FramebufferTexture2D(GR_GL_FRAMEBUFFER, GR_GL_COLOR_ATTACHMENT0,
GR_GL_TEXTURE_2D, testRTTex, 0));
- GrGLenum status = GR_GL(CheckFramebufferStatus(GR_FRAMEBUFFER));
+ GrGLenum status = GR_GL(CheckFramebufferStatus(GR_GL_FRAMEBUFFER));
GR_GL(DeleteFramebuffers(1, &testFBO));
GR_GL(DeleteTextures(1, &testRTTex));
GR_GL(ActiveTexture(savedTexUnit));
- GR_GL(BindFramebuffer(GR_FRAMEBUFFER, savedFBO));
+ GR_GL(BindFramebuffer(GR_GL_FRAMEBUFFER, savedFBO));
- return status == GR_FRAMEBUFFER_COMPLETE;
+ return status == GR_GL_FRAMEBUFFER_COMPLETE;
}
GrGpuGL::GrGpuGL() {
@@ -213,7 +213,7 @@
GrAutoSTMalloc<10, GrGLint> formats(numFormats);
GR_GL_GetIntegerv(GR_GL_COMPRESSED_TEXTURE_FORMATS, formats);
for (int i = 0; i < numFormats; ++i) {
- if (formats[i] == GR_PALETTE8_RGBA8) {
+ if (formats[i] == GR_GL_PALETTE8_RGBA8) {
f8bitPaletteSupport = true;
break;
}
@@ -261,8 +261,8 @@
if (kNone_MSFBO != fMSFBOType) {
GrGLint maxSamples;
GrGLenum maxSampleGetter = (kIMG_MSFBO == fMSFBOType) ?
- GR_MAX_SAMPLES_IMG :
- GR_MAX_SAMPLES;
+ GR_GL_MAX_SAMPLES_IMG :
+ GR_GL_MAX_SAMPLES;
GR_GL_GetIntegerv(maxSampleGetter, &maxSamples);
if (maxSamples > 1 ) {
fAASamples[kNone_AALevel] = 0;
@@ -323,7 +323,7 @@
if (GR_GL_SUPPORT_ES) {
- if (GR_GL_32BPP_COLOR_FORMAT == GR_BGRA) {
+ if (GR_GL_32BPP_COLOR_FORMAT == GR_GL_BGRA) {
GrAssert(has_gl_extension("GL_EXT_texture_format_BGRA8888"));
}
}
@@ -410,7 +410,7 @@
*/
fMinRenderTargetHeight = GR_INVAL_GLINT;
GrGLint maxRenderSize;
- GR_GL_GetIntegerv(GR_MAX_RENDERBUFFER_SIZE, &maxRenderSize);
+ GR_GL_GetIntegerv(GR_GL_MAX_RENDERBUFFER_SIZE, &maxRenderSize);
if (gPrintStartupSpew) {
GrPrintf("Small height FBO texture experiments\n");
@@ -556,7 +556,7 @@
GrGLRenderTarget::GLRenderTargetIDs rtIDs;
- GR_GL_GetIntegerv(GR_FRAMEBUFFER_BINDING, (GrGLint*)&rtIDs.fRTFBOID);
+ GR_GL_GetIntegerv(GR_GL_FRAMEBUFFER_BINDING, (GrGLint*)&rtIDs.fRTFBOID);
rtIDs.fTexFBOID = rtIDs.fRTFBOID;
rtIDs.fMSColorRenderbufferID = 0;
rtIDs.fStencilRenderbufferID = 0;
@@ -583,19 +583,19 @@
const StencilFormat* GrGLStencilFormats() {
// defines stencil formats from more to less preferred
static const StencilFormat desktopStencilFormats[] = {
- {GR_STENCIL_INDEX8, 8},
- {GR_STENCIL_INDEX16, 16},
- {GR_DEPTH24_STENCIL8, 8},
- {GR_STENCIL_INDEX4, 4},
+ {GR_GL_STENCIL_INDEX8, 8},
+ {GR_GL_STENCIL_INDEX16, 16},
+ {GR_GL_DEPTH24_STENCIL8, 8},
+ {GR_GL_STENCIL_INDEX4, 4},
{GR_GL_STENCIL_INDEX, UNKNOWN_BITS},
- {GR_DEPTH_STENCIL, UNKNOWN_BITS},
+ {GR_GL_DEPTH_STENCIL, UNKNOWN_BITS},
{0, 0}
};
static const StencilFormat esStencilFormats[] = {
- {GR_STENCIL_INDEX8, 8},
- {GR_DEPTH24_STENCIL8, 8},
- {GR_STENCIL_INDEX4, 4},
+ {GR_GL_STENCIL_INDEX8, 8},
+ {GR_GL_DEPTH24_STENCIL8, 8},
+ {GR_GL_STENCIL_INDEX4, 4},
{0, 0}
};
@@ -864,17 +864,17 @@
const StencilFormat* stencilFormats = GrGLStencilFormats();
for (int i = 0; 0 != stencilFormats[i].fEnum; ++i) {
if (rtIDs.fStencilRenderbufferID) {
- GR_GL(BindRenderbuffer(GR_RENDERBUFFER,
+ GR_GL(BindRenderbuffer(GR_GL_RENDERBUFFER,
rtIDs.fStencilRenderbufferID));
if (samples > 1) {
GR_GL_NO_ERR(RenderbufferStorageMultisample(
- GR_RENDERBUFFER,
+ GR_GL_RENDERBUFFER,
samples,
stencilFormats[i].fEnum,
glDesc.fAllocWidth,
glDesc.fAllocHeight));
} else {
- GR_GL_NO_ERR(RenderbufferStorage(GR_RENDERBUFFER,
+ GR_GL_NO_ERR(RenderbufferStorage(GR_GL_RENDERBUFFER,
stencilFormats[i].fEnum,
glDesc.fAllocWidth,
glDesc.fAllocHeight));
@@ -886,10 +886,10 @@
}
if (rtIDs.fRTFBOID != rtIDs.fTexFBOID) {
GrAssert(samples > 1);
- GR_GL(BindRenderbuffer(GR_RENDERBUFFER,
+ GR_GL(BindRenderbuffer(GR_GL_RENDERBUFFER,
rtIDs.fMSColorRenderbufferID));
GR_GL_NO_ERR(RenderbufferStorageMultisample(
- GR_RENDERBUFFER,
+ GR_GL_RENDERBUFFER,
samples,
msColorRenderbufferFormat,
glDesc.fAllocWidth,
@@ -899,76 +899,76 @@
continue;
}
}
- GR_GL(BindFramebuffer(GR_FRAMEBUFFER, rtIDs.fTexFBOID));
+ GR_GL(BindFramebuffer(GR_GL_FRAMEBUFFER, rtIDs.fTexFBOID));
#if GR_COLLECT_STATS
++fStats.fRenderTargetChngCnt;
#endif
if (kIMG_MSFBO == fMSFBOType && samples > 1) {
- GR_GL(FramebufferTexture2DMultisample(GR_FRAMEBUFFER,
- GR_COLOR_ATTACHMENT0,
+ GR_GL(FramebufferTexture2DMultisample(GR_GL_FRAMEBUFFER,
+ GR_GL_COLOR_ATTACHMENT0,
GR_GL_TEXTURE_2D,
glDesc.fTextureID,
0,
samples));
} else {
- GR_GL(FramebufferTexture2D(GR_FRAMEBUFFER,
- GR_COLOR_ATTACHMENT0,
+ GR_GL(FramebufferTexture2D(GR_GL_FRAMEBUFFER,
+ GR_GL_COLOR_ATTACHMENT0,
GR_GL_TEXTURE_2D,
glDesc.fTextureID, 0));
}
if (rtIDs.fRTFBOID != rtIDs.fTexFBOID) {
- GrGLenum status = GR_GL(CheckFramebufferStatus(GR_FRAMEBUFFER));
- if (status != GR_FRAMEBUFFER_COMPLETE) {
+ GrGLenum status = GR_GL(CheckFramebufferStatus(GR_GL_FRAMEBUFFER));
+ if (status != GR_GL_FRAMEBUFFER_COMPLETE) {
GrPrintf("-- glCheckFramebufferStatus %x %d %d\n",
status, desc.fWidth, desc.fHeight);
continue;
}
- GR_GL(BindFramebuffer(GR_FRAMEBUFFER, rtIDs.fRTFBOID));
+ GR_GL(BindFramebuffer(GR_GL_FRAMEBUFFER, rtIDs.fRTFBOID));
#if GR_COLLECT_STATS
++fStats.fRenderTargetChngCnt;
#endif
- GR_GL(FramebufferRenderbuffer(GR_FRAMEBUFFER,
- GR_COLOR_ATTACHMENT0,
- GR_RENDERBUFFER,
+ GR_GL(FramebufferRenderbuffer(GR_GL_FRAMEBUFFER,
+ GR_GL_COLOR_ATTACHMENT0,
+ GR_GL_RENDERBUFFER,
rtIDs.fMSColorRenderbufferID));
}
if (rtIDs.fStencilRenderbufferID) {
// bind the stencil to rt fbo if present, othewise the tex fbo
- GR_GL(FramebufferRenderbuffer(GR_FRAMEBUFFER,
- GR_STENCIL_ATTACHMENT,
- GR_RENDERBUFFER,
+ GR_GL(FramebufferRenderbuffer(GR_GL_FRAMEBUFFER,
+ GR_GL_STENCIL_ATTACHMENT,
+ GR_GL_RENDERBUFFER,
rtIDs.fStencilRenderbufferID));
}
- status = GR_GL(CheckFramebufferStatus(GR_FRAMEBUFFER));
+ status = GR_GL(CheckFramebufferStatus(GR_GL_FRAMEBUFFER));
if (GR_GL_SUPPORT_DESKTOP) {
// On some implementations you have to be bound as DEPTH_STENCIL.
// (Even binding to DEPTH and STENCIL separately with the same
// buffer doesn't work.)
if (rtIDs.fStencilRenderbufferID &&
- status != GR_FRAMEBUFFER_COMPLETE) {
- GR_GL(FramebufferRenderbuffer(GR_FRAMEBUFFER,
- GR_STENCIL_ATTACHMENT,
- GR_RENDERBUFFER,
+ status != GR_GL_FRAMEBUFFER_COMPLETE) {
+ GR_GL(FramebufferRenderbuffer(GR_GL_FRAMEBUFFER,
+ GR_GL_STENCIL_ATTACHMENT,
+ GR_GL_RENDERBUFFER,
0));
- GR_GL(FramebufferRenderbuffer(GR_FRAMEBUFFER,
- GR_DEPTH_STENCIL_ATTACHMENT,
- GR_RENDERBUFFER,
+ GR_GL(FramebufferRenderbuffer(GR_GL_FRAMEBUFFER,
+ GR_GL_DEPTH_STENCIL_ATTACHMENT,
+ GR_GL_RENDERBUFFER,
rtIDs.fStencilRenderbufferID));
- status = GR_GL(CheckFramebufferStatus(GR_FRAMEBUFFER));
+ status = GR_GL(CheckFramebufferStatus(GR_GL_FRAMEBUFFER));
}
}
- if (status != GR_FRAMEBUFFER_COMPLETE) {
+ if (status != GR_GL_FRAMEBUFFER_COMPLETE) {
GrPrintf("-- glCheckFramebufferStatus %x %d %d\n",
status, desc.fWidth, desc.fHeight);
if (GR_GL_SUPPORT_DESKTOP) {
if (rtIDs.fStencilRenderbufferID) {
- GR_GL(FramebufferRenderbuffer(GR_FRAMEBUFFER,
- GR_DEPTH_STENCIL_ATTACHMENT,
- GR_RENDERBUFFER,
+ GR_GL(FramebufferRenderbuffer(GR_GL_FRAMEBUFFER,
+ GR_GL_DEPTH_STENCIL_ATTACHMENT,
+ GR_GL_RENDERBUFFER,
0));
}
}
@@ -1212,14 +1212,14 @@
if (fHWDrawState.fRenderTarget != fCurrDrawState.fRenderTarget) {
GrGLRenderTarget* rt = (GrGLRenderTarget*)fCurrDrawState.fRenderTarget;
- GR_GL(BindFramebuffer(GR_FRAMEBUFFER, rt->renderFBOID()));
+ GR_GL(BindFramebuffer(GR_GL_FRAMEBUFFER, rt->renderFBOID()));
#if GR_COLLECT_STATS
++fStats.fRenderTargetChngCnt;
#endif
rt->setDirty(true);
#if GR_DEBUG
- GrGLenum status = GR_GL(CheckFramebufferStatus(GR_FRAMEBUFFER));
- if (status != GR_FRAMEBUFFER_COMPLETE) {
+ GrGLenum status = GR_GL(CheckFramebufferStatus(GR_GL_FRAMEBUFFER));
+ if (status != GR_GL_FRAMEBUFFER_COMPLETE) {
GrPrintf("-- glCheckFramebufferStatus %x\n", status);
}
#endif
@@ -1330,9 +1330,9 @@
if (NULL != rt && rt->needsResolve()) {
GrAssert(kNone_MSFBO != fMSFBOType);
GrAssert(rt->textureFBOID() != rt->renderFBOID());
- GR_GL(BindFramebuffer(GR_READ_FRAMEBUFFER,
+ GR_GL(BindFramebuffer(GR_GL_READ_FRAMEBUFFER,
rt->renderFBOID()));
- GR_GL(BindFramebuffer(GR_DRAW_FRAMEBUFFER,
+ GR_GL(BindFramebuffer(GR_GL_DRAW_FRAMEBUFFER,
rt->textureFBOID()));
#if GR_COLLECT_STATS
++fStats.fRenderTargetChngCnt;
@@ -1799,8 +1799,8 @@
break;
case GrTexture::kIndex_8_PixelConfig:
if (this->supports8BitPalette()) {
- *format = GR_PALETTE8_RGBA8;
- *internalFormat = GR_PALETTE8_RGBA8;
+ *format = GR_GL_PALETTE8_RGBA8;
+ *internalFormat = GR_GL_PALETTE8_RGBA8;
*type = GR_GL_UNSIGNED_BYTE; // unused I think
} else {
return false;
@@ -1843,7 +1843,7 @@
case GrTexture::kRGBA_8888_PixelConfig:
case GrTexture::kRGBX_8888_PixelConfig:
if (fRGBA8Renderbuffer) {
- *format = GR_RGBA8;
+ *format = GR_GL_RGBA8;
return true;
} else {
return false;
@@ -1852,7 +1852,7 @@
GrAssert(GR_GL_SUPPORT_ES); // ES2 supports 565. ES1 supports it
// with FBO extension desktop GL has
// no such internal format
- *format = GR_RGB565;
+ *format = GR_GL_RGB565;
return true;
case GrTexture::kRGBA_4444_PixelConfig:
*format = GR_GL_RGBA4;
diff --git a/vs/SampleApp/SampleApp.vcxproj b/vs/SampleApp/SampleApp.vcxproj
index 602fda0..9bcce60 100644
--- a/vs/SampleApp/SampleApp.vcxproj
+++ b/vs/SampleApp/SampleApp.vcxproj
@@ -104,6 +104,7 @@
<ClInclude Include="..\..\gpu\include\GrFontScaler.h" />
<ClInclude Include="..\..\gpu\include\GrGeometryBuffer.h" />
<ClInclude Include="..\..\gpu\include\GrGLConfig.h" />
+ <ClInclude Include="..\..\gpu\include\GrGLDefines.h" />
<ClInclude Include="..\..\gpu\include\GrGLIndexBuffer.h" />
<ClInclude Include="..\..\gpu\include\GrGLInterface.h" />
<ClInclude Include="..\..\gpu\include\GrGLIRect.h" />
@@ -207,7 +208,6 @@
<ClInclude Include="..\..\src\effects\SkRadialGradient_Table.h" />
<ClInclude Include="..\..\src\views\SkTagList.h" />
<ClInclude Include="..\..\src\views\SkViewPriv.h" />
- <ClInclude Include="GrGLDefines.h" />
<ClInclude Include="Resource.h" />
<ClInclude Include="SampleApp.h" />
<ClInclude Include="stdafx.h" />
diff --git a/vs/SampleApp/SampleApp.vcxproj.filters b/vs/SampleApp/SampleApp.vcxproj.filters
index 6414843..ba2d106 100644
--- a/vs/SampleApp/SampleApp.vcxproj.filters
+++ b/vs/SampleApp/SampleApp.vcxproj.filters
@@ -725,7 +725,7 @@
<ClInclude Include="..\..\gpu\include\GrGLPlatformIncludes.h">
<Filter>Gr\include</Filter>
</ClInclude>
- <ClInclude Include="GrGLDefines.h">
+ <ClInclude Include="..\..\gpu\include\GrGLDefines.h">
<Filter>Gr\include</Filter>
</ClInclude>
</ItemGroup>