diff options
author | Chet Haase <chet@google.com> | 2011-04-21 11:52:59 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-04-21 11:52:59 -0700 |
commit | bf96c356c02c430153c281fb81dc1a00f7ad0b43 (patch) | |
tree | ae1ac4bbd2c2c28b1b498dc87d47564806155c3a /libs/hwui/OpenGLRenderer.h | |
parent | 52c03d2cb9a782366e804d1910a7c8f072b05353 (diff) | |
parent | 5b0200bd47e8a9a4dc8d2e6c3a110d522b30bf82 (diff) | |
download | frameworks_base-bf96c356c02c430153c281fb81dc1a00f7ad0b43.zip frameworks_base-bf96c356c02c430153c281fb81dc1a00f7ad0b43.tar.gz frameworks_base-bf96c356c02c430153c281fb81dc1a00f7ad0b43.tar.bz2 |
Merge "Enable anti-aliasing for hw-accelerated lines"
Diffstat (limited to 'libs/hwui/OpenGLRenderer.h')
-rw-r--r-- | libs/hwui/OpenGLRenderer.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h index 4b93b80..0276095 100644 --- a/libs/hwui/OpenGLRenderer.h +++ b/libs/hwui/OpenGLRenderer.h @@ -283,6 +283,19 @@ 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. * @@ -425,6 +438,7 @@ private: * Various methods to setup OpenGL rendering. */ void setupDrawWithTexture(bool isAlpha8 = false); + void setupDrawAALine(); void setupDrawPoint(float pointSize); void setupDrawColor(int color); void setupDrawColor(int color, int alpha); @@ -453,6 +467,8 @@ private: void setupDrawSimpleMesh(); void setupDrawTexture(GLuint texture); void setupDrawMesh(GLvoid* vertices, GLvoid* texCoords = NULL, GLuint vbo = 0); + void setupDrawVertices(GLvoid* vertices); + void setupDrawAALine(GLvoid* vertices, GLvoid* distanceCoords, float strokeWidth); void finishDrawTexture(); void drawRegionRects(const Region& region); |