From 6970557055acaed619d7bb89451868e1570249b2 Mon Sep 17 00:00:00 2001 From: "robertphillips@google.com" Date: Wed, 21 Mar 2012 19:46:50 +0000 Subject: [PATCH] Re-attempting Linux debug GL interface compiler complaint fix. Fixed two additional compiler complaints. http://codereview.appspot.com/5845068/ git-svn-id: http://skia.googlecode.com/svn/trunk@3456 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/core/SkPaint.h | 2 +- src/gpu/GrInOrderDrawBuffer.cpp | 6 +++--- src/gpu/gl/GrGLCreateDebugInterface.cpp | 6 +++--- src/utils/SkDumpCanvas.cpp | 8 ++++++++ 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h index 1f8ef5a..26c4e6a 100644 --- a/include/core/SkPaint.h +++ b/include/core/SkPaint.h @@ -696,7 +696,7 @@ public: enum TextEncoding { kUTF8_TextEncoding, //!< the text parameters are UTF8 kUTF16_TextEncoding, //!< the text parameters are UTF16 - kUTF32_TextEncoding, //!< teh text parameters are UTF32 + kUTF32_TextEncoding, //!< the text parameters are UTF32 kGlyphID_TextEncoding //!< the text parameters are glyph indices }; diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp index cab4bdd..05f9a3f 100644 --- a/src/gpu/GrInOrderDrawBuffer.cpp +++ b/src/gpu/GrInOrderDrawBuffer.cpp @@ -21,12 +21,12 @@ GrInOrderDrawBuffer::GrInOrderDrawBuffer(const GrGpu* gpu, GrIndexBufferAllocPool* indexPool) : fAutoFlushTarget(NULL) , fClipSet(true) + , fVertexPool(*vertexPool) + , fIndexPool(*indexPool) , fLastRectVertexLayout(0) , fQuadIndexBuffer(NULL) , fMaxQuads(0) - , fCurrQuad(0) - , fVertexPool(*vertexPool) - , fIndexPool(*indexPool) { + , fCurrQuad(0) { fCaps = gpu->getCaps(); diff --git a/src/gpu/gl/GrGLCreateDebugInterface.cpp b/src/gpu/gl/GrGLCreateDebugInterface.cpp index b6e2e58..de73fa2 100644 --- a/src/gpu/gl/GrGLCreateDebugInterface.cpp +++ b/src/gpu/gl/GrGLCreateDebugInterface.cpp @@ -122,7 +122,7 @@ public: GrAlwaysAssert(size >= 0); // delete pre-existing data - delete fDataPtr; + delete[] fDataPtr; fSize = size; fDataPtr = new GrGLchar[size]; @@ -132,7 +132,7 @@ public: // TODO: w/ no dataPtr the data is unitialized - this could be tracked } GrGLint getSize() const { return fSize; } - GrGLvoid *getDataPtr() { return fDataPtr; } + GrGLchar *getDataPtr() { return fDataPtr; } GrGLint getUsage() const { return fUsage; } void setUsage(GrGLint usage) { fUsage = usage; } @@ -494,7 +494,7 @@ GrDebugGL GrDebugGL::Obj; //////////////////////////////////////////////////////////////////////////////// GrGLvoid GR_GL_FUNCTION_TYPE debugGLActiveTexture(GrGLenum texture) { - GrAlwaysAssert(0 <= texture); +// GrAlwaysAssert(0 <= texture); // GrAlwaysAssert(texture < GrDebugGL::getInstance()->getMaxTextureUnits()); GrDebugGL::getInstance()->setCurTextureUnit(texture); diff --git a/src/utils/SkDumpCanvas.cpp b/src/utils/SkDumpCanvas.cpp index c9b4a95..3b28fe7 100644 --- a/src/utils/SkDumpCanvas.cpp +++ b/src/utils/SkDumpCanvas.cpp @@ -138,9 +138,17 @@ static void toString(const void* text, size_t len, SkPaint::TextEncoding enc, str->printf("\"%.*S\"%s", SkMax32(len, 32), text, len > 64 ? "..." : ""); break; + case SkPaint::kUTF32_TextEncoding: + str->printf("\"%.*S\"%s", SkMax32(len, 32), text, + len > 128 ? "..." : ""); + break; case SkPaint::kGlyphID_TextEncoding: str->set(""); break; + + default: + SkASSERT(false); + break; } } -- 2.7.4