diff options
author | Romain Guy <romainguy@google.com> | 2011-04-26 15:33:10 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2011-04-26 15:33:10 -0700 |
commit | 740bf2bb2e900d3db2292b5909b4b4c6e90320e6 (patch) | |
tree | 9c6759f83ab467d849ef8072e262fe7ac55b8c71 /tests/HwAccelerationTest/src/com/android/test | |
parent | 3a03eeedafb3e3335b56bdb9c0a2f02104d32299 (diff) | |
download | frameworks_base-740bf2bb2e900d3db2292b5909b4b4c6e90320e6.zip frameworks_base-740bf2bb2e900d3db2292b5909b4b4c6e90320e6.tar.gz frameworks_base-740bf2bb2e900d3db2292b5909b4b4c6e90320e6.tar.bz2 |
Apply shaders/filters to text drop shadows.
Bug #4318323
This change also fixes the fact that shaders were not modulated
by the paint's color when drawing paths.
Change-Id: Id88804143aea06c895d4cbcdbe106d660230aa5a
Diffstat (limited to 'tests/HwAccelerationTest/src/com/android/test')
-rw-r--r-- | tests/HwAccelerationTest/src/com/android/test/hwui/MoreShadersActivity.java | 10 | ||||
-rw-r--r-- | tests/HwAccelerationTest/src/com/android/test/hwui/PathsActivity.java | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/MoreShadersActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/MoreShadersActivity.java index 92f8be8..02cb4b6 100644 --- a/tests/HwAccelerationTest/src/com/android/test/hwui/MoreShadersActivity.java +++ b/tests/HwAccelerationTest/src/com/android/test/hwui/MoreShadersActivity.java @@ -97,7 +97,7 @@ public class MoreShadersActivity extends Activity { mLargePaint.setTextSize(36.0f); mLargePaint.setColor(0xff000000); mLargePaint.setShadowLayer(3.0f, 0.0f, 3.0f, 0x7f00ff00); - + mPaint = new Paint(); } @@ -123,19 +123,19 @@ public class MoreShadersActivity extends Activity { mLargePaint.setShader(mHorGradient); canvas.drawText("OpenGL rendering", 0.0f, 20.0f, mLargePaint); - + mLargePaint.setShader(mScaled2Shader); canvas.drawText("OpenGL rendering", 0.0f, 60.0f, mLargePaint); - + mLargePaint.setShader(mCompose2Shader); mLargePaint.setColorFilter(mColorFilter); canvas.drawText("OpenGL rendering", 0.0f, 100.0f, mLargePaint); mLargePaint.setColorFilter(null); - + canvas.translate(0.0f, 40.0f + mDrawHeight); mLargePaint.setShader(mVertGradient); canvas.drawText("OpenGL rendering", 0.0f, 20.0f, mLargePaint); - + canvas.restore(); } } diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/PathsActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/PathsActivity.java index 5ddcd20..833b61c 100644 --- a/tests/HwAccelerationTest/src/com/android/test/hwui/PathsActivity.java +++ b/tests/HwAccelerationTest/src/com/android/test/hwui/PathsActivity.java @@ -75,7 +75,7 @@ public class PathsActivity extends Activity { mLargePaint = new Paint(); mLargePaint.setAntiAlias(true); - mLargePaint.setColor(0xff00ff00); + mLargePaint.setColor(0x7f00ff00); mLargePaint.setStrokeWidth(15.0f); mLargePaint.setStyle(Paint.Style.FILL); |