From 386aa031793bb037ec43b6cdbd8908c343cc86cb Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Mon, 7 Dec 2015 17:08:25 -0800 Subject: Add more shape drawing to new reorderer/renderer bug:22480459 Add support for outsetting final bounds based on stroke. Change-Id: I659318ccec51882bba1906ce3c7042288ce35c30 --- libs/hwui/OpenGLRenderer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libs/hwui/OpenGLRenderer.cpp') diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 2cb32c404525..f49237c9c069 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -1908,9 +1909,6 @@ void OpenGLRenderer::drawArc(float left, float top, float right, float bottom, drawConvexPath(path, p); } -// See SkPaintDefaults.h -#define SkPaintDefaults_MiterLimit SkIntToScalar(4) - void OpenGLRenderer::drawRect(float left, float top, float right, float bottom, const SkPaint* p) { if (mState.currentlyIgnored() @@ -1921,6 +1919,7 @@ void OpenGLRenderer::drawRect(float left, float top, float right, float bottom, if (p->getStyle() != SkPaint::kFill_Style) { // only fill style is supported by drawConvexPath, since others have to handle joins + static_assert(SkPaintDefaults_MiterLimit == 4.0f, "Miter limit has changed"); if (p->getPathEffect() != nullptr || p->getStrokeJoin() != SkPaint::kMiter_Join || p->getStrokeMiter() != SkPaintDefaults_MiterLimit) { mCaches.textureState().activateTexture(0); -- cgit v1.2.3-59-g8ed1b