summaryrefslogtreecommitdiff
path: root/libs/hwui/ProgramCache.h
diff options
context:
space:
mode:
author Chet Haase <chet@google.com> 2011-04-13 17:58:08 -0700
committer Chet Haase <chet@google.com> 2011-04-21 11:47:05 -0700
commit5b0200bd47e8a9a4dc8d2e6c3a110d522b30bf82 (patch)
tree905d0c539f0ed9a4e6ae6538bd6ab7f74efeefb8 /libs/hwui/ProgramCache.h
parent3ad604b3d8a3ae87ee3f7545677bacc8f11159c0 (diff)
Enable anti-aliasing for hw-accelerated lines
Draw anti-aliased lines with OpenGL by constructing a quad with a border that fades out (to mimic fragment coverage). Change-Id: Ib81a3e62d663acdf1b46b401ac4aa7ee9855cc7e
Diffstat (limited to 'libs/hwui/ProgramCache.h')
-rw-r--r--libs/hwui/ProgramCache.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/hwui/ProgramCache.h b/libs/hwui/ProgramCache.h
index 737d91ba12f9..cead75bcae2c 100644
--- a/libs/hwui/ProgramCache.h
+++ b/libs/hwui/ProgramCache.h
@@ -57,6 +57,7 @@ namespace uirenderer {
#define PROGRAM_KEY_COLOR_BLEND 0x80
#define PROGRAM_KEY_BITMAP_NPOT 0x100
#define PROGRAM_KEY_SWAP_SRC_DST 0x2000
+#define PROGRAM_KEY_VERTEX_WIDTH 0x4000
#define PROGRAM_KEY_BITMAP_WRAPS_MASK 0x600
#define PROGRAM_KEY_BITMAP_WRAPT_MASK 0x1800
@@ -119,6 +120,8 @@ struct ProgramDescription {
bool hasBitmap;
bool isBitmapNpot;
+ bool hasWidth;
+
bool hasGradient;
Gradient gradientType;
@@ -148,6 +151,8 @@ struct ProgramDescription {
hasTexture = false;
hasAlpha8Texture = false;
+ hasWidth = false;
+
modulate = false;
hasBitmap = false;
@@ -200,6 +205,7 @@ struct ProgramDescription {
programid key() const {
programid key = 0;
if (hasTexture) key |= PROGRAM_KEY_TEXTURE;
+ if (hasWidth) key |= PROGRAM_KEY_VERTEX_WIDTH;
if (hasAlpha8Texture) key |= PROGRAM_KEY_A8_TEXTURE;
if (hasBitmap) {
key |= PROGRAM_KEY_BITMAP;