Don't clear the background
Since we always assume background textures are opaque,
do not clear the screen.
Change-Id: I30a11024f5e13d05dd2da04b44b131b3265a5d9c
diff --git a/carousel/java/com/android/ex/carousel/carousel.rs b/carousel/java/com/android/ex/carousel/carousel.rs
index 7140edd..5755a3a 100644
--- a/carousel/java/com/android/ex/carousel/carousel.rs
+++ b/carousel/java/com/android/ex/carousel/carousel.rs
@@ -709,11 +709,6 @@
{
static bool toggle;
if (backgroundTexture.p != 0) {
- // Unfortunately, we also need to clear the background because some textures may be
- // drawn with alpha. This takes about 1ms-2ms in my tests. May be worth optimizing at
- // some point.
- rsgClearColor(backgroundColor.x, backgroundColor.y, backgroundColor.z, backgroundColor.w);
-
rsgClearDepth(1.0f);
rs_matrix4x4 projection, model;
rsMatrixLoadOrtho(&projection, -1.0f, 1.0f, -1.0f, 1.0f, 0.0f, 1.0f);