summaryrefslogtreecommitdiffstats
path: root/libs/hwui/OpenGLRenderer.h
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-08-11 16:00:44 -0700
committerChris Craik <ccraik@google.com>2014-08-12 12:44:59 -0700
commitbf75945e7a1ae7c1000682716643c942c1e19ba6 (patch)
tree5be8c8acfb85bb0a6077691e2c0255232cace2ae /libs/hwui/OpenGLRenderer.h
parentc28aceb11e736382bc7ee749483ea5f23299ad78 (diff)
downloadframeworks_base-bf75945e7a1ae7c1000682716643c942c1e19ba6.zip
frameworks_base-bf75945e7a1ae7c1000682716643c942c1e19ba6.tar.gz
frameworks_base-bf75945e7a1ae7c1000682716643c942c1e19ba6.tar.bz2
Rework shadow interpolation
bug:16852257 Use pow(alpha, 1.5) to avoid harsh edges on shadow alpha ramps. Also adjusts shadow constants to compensate. Change-Id: I5869956d7d292db2a8e496bc320084b6d64c3fb7
Diffstat (limited to 'libs/hwui/OpenGLRenderer.h')
-rwxr-xr-xlibs/hwui/OpenGLRenderer.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index fd228db..2a9badd 100755
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -94,6 +94,11 @@ enum ClipSideFlags {
kClipSide_ConservativeFull = 0x1F
};
+enum VertexBufferDisplayFlags {
+ kVertexBuffer_Offset = 0x1,
+ kVertexBuffer_ShadowAA = 0x2,
+};
+
/**
* Defines additional transformation that should be applied by the model view matrix, beyond that of
* the currentTransform()
@@ -656,17 +661,17 @@ private:
*
* @param vertexBuffer The VertexBuffer to be drawn
* @param paint The paint to render with
- * @param useOffset Offset the vertexBuffer (used in drawing non-AA lines)
+ * @param flags flags with which to draw
*/
status_t drawVertexBuffer(float translateX, float translateY, const VertexBuffer& vertexBuffer,
- const SkPaint* paint, bool useOffset = false);
+ const SkPaint* paint, int flags = 0);
/**
* Convenience for translating method
*/
status_t drawVertexBuffer(const VertexBuffer& vertexBuffer,
- const SkPaint* paint, bool useOffset = false) {
- return drawVertexBuffer(0.0f, 0.0f, vertexBuffer, paint, useOffset);
+ const SkPaint* paint, int flags = 0) {
+ return drawVertexBuffer(0.0f, 0.0f, vertexBuffer, paint, flags);
}
/**
@@ -842,7 +847,7 @@ private:
void setupDrawWithTextureAndColor(bool isAlpha8 = false);
void setupDrawWithExternalTexture();
void setupDrawNoTexture();
- void setupDrawAA();
+ void setupDrawAA(bool useShadowInterp);
void setupDrawColor(int color, int alpha);
void setupDrawColor(float r, float g, float b, float a);
void setupDrawAlpha8Color(int color, int alpha);