Fix bug where createTexture may bind a texture to GL without ever updating fHWState.fTexture (when texture is not bound to FBO).

Other minor changes:
Add commented out GL logging define to GrUserConfig
Remove dead GrGpuD3D9 file from xcode proj



git-svn-id: http://skia.googlecode.com/svn/trunk@663 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
bsalomon@google.com 2010-12-23 20:59:40 +00:00
Родитель 57c3a863fc
Коммит e9557f946e
3 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -42,6 +42,12 @@
*/
//#define GR_DUMP_TEXTURE_UPLOAD 1
/*
* To log all GL calls define this. Can be turned on and off at runtime by
* gPrintGL global variable.
*/
//#define GR_GL_LOG_CALLS 1
////////////////////////////////////////////////////////////////////////////////
// Decide Ganesh types

Просмотреть файл

@ -629,6 +629,7 @@ GrTexture* GrGpuGL::createTexture(const TextureDesc& desc,
#if GR_COLLECT_STATS
++fStats.fTextureChngCnt;
#endif
fHWDrawState.fTexture = NULL;
GR_GL(PixelStorei(GL_UNPACK_ALIGNMENT, glDesc.fUploadByteCount));
if (GrTexture::kIndex_8_PixelConfig == desc.fFormat &&
@ -770,8 +771,7 @@ GrTexture* GrGpuGL::createTexture(const TextureDesc& desc,
#if GR_COLLECT_STATS
++fStats.fTextureChngCnt;
#endif
fHWDrawState.fTexture = NULL;
GrAssert(NULL == fHWDrawState.fTexture);
err = ~GL_NO_ERROR;
for (int i = 0; i < attempts; ++i) {
@ -1440,6 +1440,7 @@ void GrGpuGL::flushGLStateCommon(PrimitiveType type) {
//GrPrintf("---- bindtexture %d\n", nextTexture->textureID());
fHWDrawState.fTexture = nextTexture;
}
const GrGLTexture::TexParams& oldTexParams = nextTexture->getTexParams();
GrGLTexture::TexParams newTexParams;
newTexParams.fFilter = fCurrDrawState.fSamplerState.isFilter() ?

Просмотреть файл

@ -54,7 +54,6 @@
00115E8312C116CA008296FE /* GrGLVertexBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 00115E4712C116CA008296FE /* GrGLVertexBuffer.h */; };
00115E8412C116CA008296FE /* GrGlyph.h in Headers */ = {isa = PBXBuildFile; fileRef = 00115E4812C116CA008296FE /* GrGlyph.h */; };
00115E8512C116CA008296FE /* GrGpu.h in Headers */ = {isa = PBXBuildFile; fileRef = 00115E4912C116CA008296FE /* GrGpu.h */; };
00115E8612C116CA008296FE /* GrGpuD3D9.h in Headers */ = {isa = PBXBuildFile; fileRef = 00115E4A12C116CA008296FE /* GrGpuD3D9.h */; };
00115E8712C116CA008296FE /* GrGpuVertex.h in Headers */ = {isa = PBXBuildFile; fileRef = 00115E4B12C116CA008296FE /* GrGpuVertex.h */; };
00115E8812C116CA008296FE /* GrIndexBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 00115E4C12C116CA008296FE /* GrIndexBuffer.h */; };
00115E8912C116CA008296FE /* GrInOrderDrawBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 00115E4D12C116CA008296FE /* GrInOrderDrawBuffer.h */; };
@ -142,7 +141,6 @@
00115E4712C116CA008296FE /* GrGLVertexBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GrGLVertexBuffer.h; path = ../../gpu/include/GrGLVertexBuffer.h; sourceTree = SOURCE_ROOT; };
00115E4812C116CA008296FE /* GrGlyph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GrGlyph.h; path = ../../gpu/include/GrGlyph.h; sourceTree = SOURCE_ROOT; };
00115E4912C116CA008296FE /* GrGpu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GrGpu.h; path = ../../gpu/include/GrGpu.h; sourceTree = SOURCE_ROOT; };
00115E4A12C116CA008296FE /* GrGpuD3D9.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GrGpuD3D9.h; path = ../../gpu/include/GrGpuD3D9.h; sourceTree = SOURCE_ROOT; };
00115E4B12C116CA008296FE /* GrGpuVertex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GrGpuVertex.h; path = ../../gpu/include/GrGpuVertex.h; sourceTree = SOURCE_ROOT; };
00115E4C12C116CA008296FE /* GrIndexBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GrIndexBuffer.h; path = ../../gpu/include/GrIndexBuffer.h; sourceTree = SOURCE_ROOT; };
00115E4D12C116CA008296FE /* GrInOrderDrawBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GrInOrderDrawBuffer.h; path = ../../gpu/include/GrInOrderDrawBuffer.h; sourceTree = SOURCE_ROOT; };
@ -214,7 +212,6 @@
00115E4712C116CA008296FE /* GrGLVertexBuffer.h */,
00115E4812C116CA008296FE /* GrGlyph.h */,
00115E4912C116CA008296FE /* GrGpu.h */,
00115E4A12C116CA008296FE /* GrGpuD3D9.h */,
00115E4B12C116CA008296FE /* GrGpuVertex.h */,
00115E4C12C116CA008296FE /* GrIndexBuffer.h */,
00115E4D12C116CA008296FE /* GrInOrderDrawBuffer.h */,
@ -348,7 +345,6 @@
00115E8312C116CA008296FE /* GrGLVertexBuffer.h in Headers */,
00115E8412C116CA008296FE /* GrGlyph.h in Headers */,
00115E8512C116CA008296FE /* GrGpu.h in Headers */,
00115E8612C116CA008296FE /* GrGpuD3D9.h in Headers */,
00115E8712C116CA008296FE /* GrGpuVertex.h in Headers */,
00115E8812C116CA008296FE /* GrIndexBuffer.h in Headers */,
00115E8912C116CA008296FE /* GrInOrderDrawBuffer.h in Headers */,