diff options
| author | Chet Haase <chet@google.com> | 2011-04-26 07:28:09 -0700 |
|---|---|---|
| committer | Chet Haase <chet@google.com> | 2011-04-27 14:23:29 -0700 |
| commit | 8a5cc92a150bae38ec43732d941b38bb381fe153 (patch) | |
| tree | 24bf32e7fcc20ab94e64f57e6f72bd8762d3bdf9 /libs/hwui/OpenGLRenderer.h | |
| parent | b4a56f10d875dc62a9c73008f98596c7e32fc249 (diff) | |
| download | frameworks_base-8a5cc92a150bae38ec43732d941b38bb381fe153.zip frameworks_base-8a5cc92a150bae38ec43732d941b38bb381fe153.tar.gz frameworks_base-8a5cc92a150bae38ec43732d941b38bb381fe153.tar.bz2 | |
Fix various hw-accelerated line/point bugs
All accelerated lines are now rendered as quads. Hairlines used to
be rendered as GL_LINES, but these lines don't render the same as our
non-accelerated lines, so we're using quads for everything. Also, fixed
a bug in the way that we were offsetting quads (and not offseting points)
to ensure that our lines/points actuall start on the same pixels as
Skia's.
Change-Id: I51b923cc08a9858444c430ba07bc8aa0c83cbe6a
Diffstat (limited to 'libs/hwui/OpenGLRenderer.h')
| -rw-r--r-- | libs/hwui/OpenGLRenderer.h | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h index 0276095..918e1fb 100644 --- a/libs/hwui/OpenGLRenderer.h +++ b/libs/hwui/OpenGLRenderer.h @@ -283,19 +283,6 @@ private: void drawAlphaBitmap(Texture* texture, float left, float top, SkPaint* paint); /** - * Draws a line as a quad. Called by drawLines() for all cases except hairline without AA. - * - * @param points The vertices of the lines. Every four entries specifies the x/y points - * of a single line segment. - * @param count The number of entries in the points array. - * @param isAA Whether the line is anti-aliased - * @param isHairline Whether the line has strokeWidth==0, which results in the line being - * one pixel wide on the display regardless of scale. - */ - void drawLinesAsQuads(float *points, int count, bool isAA, bool isHairline, - float strokeWidth); - - /** * Draws a textured rectangle with the specified texture. The specified coordinates * are transformed by the current snapshot's transform matrix. * @@ -453,7 +440,7 @@ private: bool swapSrcDst = false); void setupDrawProgram(); void setupDrawDirtyRegionsDisabled(); - void setupDrawModelViewIdentity(); + void setupDrawModelViewIdentity(bool offset = false); void setupDrawModelView(float left, float top, float right, float bottom, bool ignoreTransform = false, bool ignoreModelView = false); void setupDrawModelViewTranslate(float left, float top, float right, float bottom, |
