diff options
author | 2009-06-03 02:35:01 +0000 | |
---|---|---|
committer | 2009-06-03 02:35:01 +0000 | |
commit | 6b82d1adc6a4726e36674e468ff1157e0b75373f (patch) | |
tree | b54346ec55abc1e2ed1986883ea5e6931287a6ba /src/gl/SkGLDevice.cpp | |
parent | 4a7fd2bd275446ecad0e70aff2b9fd31d2bc8e95 (diff) |
add isConvex() hit to SkPath, to be used to speed up fills and opengl
set linewidth in gldevice for hair rects
remove some cruft from samples
add more gl-unimpl messages
git-svn-id: http://skia.googlecode.com/svn/trunk@199 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gl/SkGLDevice.cpp')
-rw-r--r-- | src/gl/SkGLDevice.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gl/SkGLDevice.cpp b/src/gl/SkGLDevice.cpp index 148f9e92f4..d839498dec 100644 --- a/src/gl/SkGLDevice.cpp +++ b/src/gl/SkGLDevice.cpp @@ -169,6 +169,7 @@ SkGLDevice::TexCache* SkGLDevice::setupGLPaintShader(const SkPaint& paint) { SkMatrix matrix; SkShader::TileMode tileModes[2]; if (!shader->asABitmap(&bitmap, &matrix, tileModes)) { + SkGL_unimpl("shader->asABitmap() == false"); return NULL; } @@ -232,6 +233,7 @@ void SkGLDevice::drawPaint(const SkDraw& draw, const SkPaint& paint) { this->updateMatrixClip()); } +// must be in SkCanvas::PointMode order static const GLenum gPointMode2GL[] = { GL_POINTS, GL_LINES, @@ -339,6 +341,7 @@ void SkGLDevice::drawRect(const SkDraw& draw, const SkRect& rect, vertex[2].setScalars(rect.fRight, rect.fBottom); vertex[3].setScalars(rect.fLeft, rect.fBottom); vertex[4].setScalars(rect.fLeft, rect.fTop); + glLineWidth(1); } } else { vertCount = 4; @@ -355,6 +358,7 @@ void SkGLDevice::drawPath(const SkDraw& draw, const SkPath& path, const SkPaint& paint) { TRACE_DRAW("coreDrawPath", this, draw); if (paint.getStyle() == SkPaint::kStroke_Style) { + SkGL_unimpl("stroke path"); return; } @@ -599,7 +603,7 @@ static void SkGL_Draw1Glyph(const SkDraw1Glyph& state, const SkGlyph& glyph, SkGLDrawProcs* procs = (SkGLDrawProcs*)state.fDraw->fProcs; x += glyph.fLeft; - y += glyph.fTop; + y += glyph.fTop; // check if we're clipped out (nothing to draw) SkIRect bounds; @@ -636,6 +640,7 @@ static void SkGL_Draw1Glyph(const SkDraw1Glyph& state, const SkGlyph& glyph, } strike = textCache->addGlyphAndBind(glyph, aa, &offset); if (NULL == strike) { + SkGL_unimpl("addGlyphAndBind failed, too big"); // too big to cache, need to draw as is... return; } @@ -772,6 +777,7 @@ void SkGLDevice::drawText(const SkDraw& draw, const void* text, - option to have draw call the font cache, which we could patch (?) */ if (draw.fMatrix->getType() & SkMatrix::kPerspective_Mask) { + SkGL_unimpl("drawText in perspective"); return; } @@ -787,6 +793,7 @@ void SkGLDevice::drawPosText(const SkDraw& draw, const void* text, SkScalar constY, int scalarsPerPos, const SkPaint& paint) { if (draw.fMatrix->getType() & SkMatrix::kPerspective_Mask) { + SkGL_unimpl("drawPosText in perspective"); return; } @@ -801,6 +808,6 @@ void SkGLDevice::drawPosText(const SkDraw& draw, const void* text, void SkGLDevice::drawTextOnPath(const SkDraw& draw, const void* text, size_t byteLength, const SkPath& path, const SkMatrix* m, const SkPaint& paint) { - // not supported yet + SkGL_unimpl("drawTextOnPath"); } |