summaryrefslogtreecommitdiff
path: root/libs/hwui/ProgramCache.h
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2011-03-21 13:11:28 -0700
committer Romain Guy <romainguy@google.com> 2011-03-21 13:11:49 -0700
commited6fcb034b44d9a6ac2fc72fee6030417811f234 (patch)
tree42a469fd5b0eabb1fd3b6a34243d57c081eee764 /libs/hwui/ProgramCache.h
parent67ac217a81f34ee3d35df84b38f3456843c40706 (diff)
Add support for drawPoint() and drawPoints().
Change-Id: I01bef50c08ec3160f8d40dc060b2cf6c2e4d7639
Diffstat (limited to 'libs/hwui/ProgramCache.h')
-rw-r--r--libs/hwui/ProgramCache.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/libs/hwui/ProgramCache.h b/libs/hwui/ProgramCache.h
index ead5b920c1dc..737d91ba12f9 100644
--- a/libs/hwui/ProgramCache.h
+++ b/libs/hwui/ProgramCache.h
@@ -71,7 +71,9 @@ namespace uirenderer {
#define PROGRAM_BITMAP_WRAPT_SHIFT 11
#define PROGRAM_GRADIENT_TYPE_SHIFT 33
-#define PROGRAM_MODULATE 35
+#define PROGRAM_MODULATE_SHIFT 35
+
+#define PROGRAM_IS_POINT_SHIFT 36
///////////////////////////////////////////////////////////////////////////////
// Types
@@ -135,6 +137,9 @@ struct ProgramDescription {
SkXfermode::Mode framebufferMode;
bool swapSrcDst;
+ bool isPoint;
+ float pointSize;
+
/**
* Resets this description. All fields are reset back to the default
* values they hold after building a new instance.
@@ -162,6 +167,9 @@ struct ProgramDescription {
framebufferMode = SkXfermode::kClear_Mode;
swapSrcDst = false;
+
+ isPoint = false;
+ pointSize = 0.0f;
}
/**
@@ -223,7 +231,8 @@ struct ProgramDescription {
}
key |= (framebufferMode & PROGRAM_MAX_XFERMODE) << PROGRAM_XFERMODE_FRAMEBUFFER_SHIFT;
if (swapSrcDst) key |= PROGRAM_KEY_SWAP_SRC_DST;
- if (modulate) key |= programid(0x1) << PROGRAM_MODULATE;
+ if (modulate) key |= programid(0x1) << PROGRAM_MODULATE_SHIFT;
+ if (isPoint) key |= programid(0x1) << PROGRAM_IS_POINT_SHIFT;
return key;
}