diff options
author | Chris Craik <ccraik@google.com> | 2013-07-10 19:06:41 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-07-10 19:06:41 +0000 |
commit | a582d064868fae4ee2a8d56bab5103430453259d (patch) | |
tree | 8211683ea14025b723933572d713666967544e22 | |
parent | 8ce24f2a6817193b3514bd069c64f44354a42b7b (diff) | |
parent | a2d519e03b8993a59d16c8b5fef6cb06a7d51983 (diff) | |
download | frameworks_base-a582d064868fae4ee2a8d56bab5103430453259d.zip frameworks_base-a582d064868fae4ee2a8d56bab5103430453259d.tar.gz frameworks_base-a582d064868fae4ee2a8d56bab5103430453259d.tar.bz2 |
Merge "Remove NearestImageView from CanvasCompare"
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 |