summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/allapps.rs
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2010-09-13 20:44:01 -0700
committerAlex Sakhartchouk <alexst@google.com>2010-09-13 20:44:01 -0700
commit95252b4cbde4ec9ebc60265bcc837d7a366b6101 (patch)
treee8946d0480b798f4461337e6e59373f34673e3f0 /src/com/android/launcher2/allapps.rs
parent201058d9c9866f3328291e495bcdfbeebe76d632 (diff)
downloadandroid_packages_apps_Trebuchet-95252b4cbde4ec9ebc60265bcc837d7a366b6101.tar.gz
android_packages_apps_Trebuchet-95252b4cbde4ec9ebc60265bcc837d7a366b6101.tar.bz2
android_packages_apps_Trebuchet-95252b4cbde4ec9ebc60265bcc837d7a366b6101.zip
Changing Launcher2 to use more generic shader param binding.
Change-Id: I5550a5ce88e5edc5ce11689e828001e28bb29e04
Diffstat (limited to 'src/com/android/launcher2/allapps.rs')
-rw-r--r--src/com/android/launcher2/allapps.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/launcher2/allapps.rs b/src/com/android/launcher2/allapps.rs
index b07e1fe8a..acee82bf0 100644
--- a/src/com/android/launcher2/allapps.rs
+++ b/src/com/android/launcher2/allapps.rs
@@ -28,6 +28,7 @@ rs_allocation *gIconIDs;
rs_allocation *gLabelIDs;
typedef struct VpConsts {
+ rs_matrix4x4 Proj;
float4 Position;
float4 ScaleOffset;
float2 BendPos;
@@ -65,6 +66,8 @@ static float g_MoveToOldPos = 0.f;
static int g_Cols;
static int g_Rows;
+rs_allocation g_VPConstAlloc;
+
// Drawing constants, should be parameters ======
#define VIEW_ANGLE 1.28700222f
@@ -300,6 +303,7 @@ static void drawFrontGrid(float rowOffset, float p)
vpConstants->ImgSize.y = rsAllocationGetDimY(gSelectedIconTexture);
vpConstants->Position.y = y - (rsAllocationGetDimY(gSelectedIconTexture)
- rsAllocationGetDimY(gIconIDs[iconNum])) * 0.5f;
+ rsAllocationMarkDirty(g_VPConstAlloc);
rsgDrawMesh(gSMCell);
}
@@ -307,6 +311,7 @@ static void drawFrontGrid(float rowOffset, float p)
vpConstants->ImgSize.x = rsAllocationGetDimX(gIconIDs[iconNum]);
vpConstants->ImgSize.y = rsAllocationGetDimY(gIconIDs[iconNum]);
vpConstants->Position.y = y - 0.2f;
+ rsAllocationMarkDirty(g_VPConstAlloc);
rsgBindTexture(gPFTexMip, 0, gIconIDs[iconNum]);
rsgDrawMesh(gSMCell);
@@ -314,6 +319,7 @@ static void drawFrontGrid(float rowOffset, float p)
vpConstants->ImgSize.x = rsAllocationGetDimX(gLabelIDs[iconNum]);
vpConstants->ImgSize.y = rsAllocationGetDimY(gLabelIDs[iconNum]);
vpConstants->Position.y = y - 64.f - 0.2f;
+ rsAllocationMarkDirty(g_VPConstAlloc);
rsgBindTexture(gPFTexMipAlpha, 0, gLabelIDs[iconNum]);
rsgDrawMesh(gSMCell);
}
@@ -328,6 +334,7 @@ int root()
// Compute dt in seconds.
// physics may break if DT is large.
g_DT = min(rsGetDt(), 0.1f);
+ g_VPConstAlloc = rsGetAllocation(vpConstants);
if (g_Zoom != gZoomTarget) {
float dz = g_DT * 1.7f;