summaryrefslogtreecommitdiffstats
path: root/tests/CanvasCompare
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2013-07-09 19:17:28 -0700
committerChris Craik <ccraik@google.com>2013-07-09 19:22:37 -0700
commita2d519e03b8993a59d16c8b5fef6cb06a7d51983 (patch)
tree0f9aca53d2aa030afdc8780df19ce5f337ebfba2 /tests/CanvasCompare
parente969964c80a20b2d968b4ee54495176c9049d3e3 (diff)
downloadframeworks_base-a2d519e03b8993a59d16c8b5fef6cb06a7d51983.zip
frameworks_base-a2d519e03b8993a59d16c8b5fef6cb06a7d51983.tar.gz
frameworks_base-a2d519e03b8993a59d16c8b5fef6cb06a7d51983.tar.bz2
Remove NearestImageView from CanvasCompare
Change-Id: I69b0539df704d80a34cc8f22096657210f5d78ad
Diffstat (limited to 'tests/CanvasCompare')
-rw-r--r--tests/CanvasCompare/res/layout/manual_layout.xml2
-rw-r--r--tests/CanvasCompare/src/com/android/test/hwuicompare/ManualActivity.java1
-rw-r--r--tests/CanvasCompare/src/com/android/test/hwuicompare/NearestImageView.java47
3 files changed, 2 insertions, 48 deletions
diff --git a/tests/CanvasCompare/res/layout/manual_layout.xml b/tests/CanvasCompare/res/layout/manual_layout.xml
index d7838eb..1a9288c 100644
--- a/tests/CanvasCompare/res/layout/manual_layout.xml
+++ b/tests/CanvasCompare/res/layout/manual_layout.xml
@@ -64,7 +64,7 @@
</LinearLayout>
</LinearLayout>
- <com.android.test.hwuicompare.NearestImageView
+ <ImageView
android:id="@+id/compare_image_view"
android:layout_width="@dimen/layer_width_double"
android:layout_height="@dimen/layer_height_double"
diff --git a/tests/CanvasCompare/src/com/android/test/hwuicompare/ManualActivity.java b/tests/CanvasCompare/src/com/android/test/hwuicompare/ManualActivity.java
index 400dff0..405ff65 100644
--- a/tests/CanvasCompare/src/com/android/test/hwuicompare/ManualActivity.java
+++ b/tests/CanvasCompare/src/com/android/test/hwuicompare/ManualActivity.java
@@ -82,6 +82,7 @@ public class ManualActivity extends CompareActivity {
mCompareImageView.setImageBitmap(mCompareBitmap);
break;
}
+ mCompareImageView.getDrawable().setFilterBitmap(false);
mCompareImageView.invalidate();
}
diff --git a/tests/CanvasCompare/src/com/android/test/hwuicompare/NearestImageView.java b/tests/CanvasCompare/src/com/android/test/hwuicompare/NearestImageView.java
deleted file mode 100644
index 542b55a..0000000
--- a/tests/CanvasCompare/src/com/android/test/hwuicompare/NearestImageView.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.test.hwuicompare;
-
-import android.content.Context;
-import android.graphics.Canvas;
-import android.graphics.Paint;
-import android.graphics.PaintFlagsDrawFilter;
-import android.util.AttributeSet;
-import android.widget.ImageView;
-
-public class NearestImageView extends ImageView {
- public NearestImageView(Context context) {
- super(context);
- }
-
- public NearestImageView(Context context, AttributeSet attrs) {
- super(context, attrs);
- }
-
- public NearestImageView(Context context, AttributeSet attrs, int defStyle) {
- super(context, attrs, defStyle);
- }
-
- final PaintFlagsDrawFilter mFilter = new PaintFlagsDrawFilter(Paint.FILTER_BITMAP_FLAG, 0);
-
- @Override
- public void onDraw(Canvas canvas) {
- canvas.setDrawFilter(mFilter);
- super.onDraw(canvas);
- canvas.setDrawFilter(null);
- }
-} \ No newline at end of file