Loading libs/rs/java/ImageProcessing/AndroidManifest.xml +1 −2 Original line number Original line Diff line number Diff line Loading @@ -6,8 +6,7 @@ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-sdk android:minSdkVersion="11" /> <uses-sdk android:minSdkVersion="11" /> <application android:label="Image Processing"> <application android:label="Image Processing"> <activity android:name="ImageProcessingActivity" <activity android:name="ImageProcessingActivity"> android:screenOrientation="portrait"> <intent-filter> <intent-filter> <action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" /> Loading libs/rs/java/ImageProcessing/res/layout/main.xml +128 −162 Original line number Original line Diff line number Diff line Loading @@ -14,174 +14,140 @@ limitations under the License. limitations under the License. --> --> <merge xmlns:android="http://schemas.android.com/apk/res/android"> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <SurfaceView <SurfaceView android:id="@+id/surface" android:id="@+id/surface" android:layout_width="1dip" android:layout_width="1dip" android:layout_height="1dip" /> android:layout_height="1dip" /> <ImageView <ImageView android:id="@+id/display" android:id="@+id/display" android:layout_width="320dip" android:layout_width="320dip" android:layout_height="266dip" /> android:layout_height="266dip" /> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> <Button <Button android:layout_marginBottom="170dip" android:layout_width="wrap_content" android:layout_width="wrap_content" android:layout_height="40dip" android:layout_height="wrap_content" android:text="@string/benchmark" android:text="@string/benchmark" android:onClick="benchmark" android:onClick="benchmark"/> android:layout_gravity="bottom"/> <TextView <TextView android:id="@+id/benchmarkText" android:id="@+id/benchmarkText" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:textSize="18sp" android:textSize="8pt" android:layout_marginLeft="100dip" android:layout_marginBottom="175dip" android:layout_gravity="bottom" android:text="@string/saturation"/> android:text="@string/saturation"/> </LinearLayout> <SeekBar <ScrollView android:id="@+id/inSaturation" android:layout_width="fill_parent" android:layout_marginBottom="140dip" android:layout_height="fill_parent"> android:layout_marginLeft="10dip" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_marginRight="10dip" android:orientation="vertical" android:layout_width="match_parent" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_height="fill_parent"> android:layout_gravity="bottom" /> <TextView <TextView android:id="@+id/inSaturationText" android:id="@+id/inSaturationText" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:textSize="18sp" android:textSize="8pt" android:layout_marginLeft="50dip" android:layout_marginLeft="10sp" android:layout_marginBottom="142dip" android:layout_marginTop="15sp" android:textColor="#000" android:layout_gravity="bottom" android:text="@string/saturation"/> android:text="@string/saturation"/> <SeekBar <SeekBar android:id="@+id/inGamma" android:id="@+id/inSaturation" android:layout_marginBottom="110dip" android:layout_marginLeft="10sp" android:layout_marginLeft="10dip" android:layout_marginRight="10sp" android:layout_marginRight="10dip" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content"/> android:layout_gravity="bottom" /> <TextView <TextView android:id="@+id/inGammaText" android:id="@+id/inGammaText" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:textSize="18sp" android:textSize="8pt" android:layout_marginLeft="50dip" android:layout_marginLeft="10sp" android:layout_marginBottom="112dip" android:layout_marginTop="15sp" android:textColor="#000" android:layout_gravity="bottom" android:text="@string/gamma"/> android:text="@string/gamma"/> <SeekBar <SeekBar android:id="@+id/outWhite" android:id="@+id/inGamma" android:layout_marginBottom="80dip" android:layout_marginLeft="10sp" android:layout_marginLeft="170dip" android:layout_marginRight="10sp" android:layout_marginRight="10dip" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content"/> android:layout_gravity="bottom" /> <TextView <TextView android:id="@+id/outWhiteText" android:id="@+id/outWhiteText" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:textSize="18sp" android:layout_marginLeft="10sp" android:layout_marginLeft="220dip" android:layout_marginTop="15sp" android:layout_marginBottom="82dip" android:textSize="8pt" android:textColor="#000" android:layout_gravity="bottom" android:text="@string/out_white"/> android:text="@string/out_white"/> <SeekBar <SeekBar android:id="@+id/inWhite" android:id="@+id/outWhite" android:layout_marginBottom="80dip" android:layout_marginLeft="10sp" android:layout_marginLeft="10dip" android:layout_marginRight="10sp" android:layout_marginRight="170dip" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content"/> android:layout_gravity="bottom" /> <TextView <TextView android:id="@+id/inWhiteText" android:id="@+id/inWhiteText" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:textSize="18sp" android:textSize="8pt" android:layout_marginLeft="50dip" android:layout_marginLeft="10sp" android:layout_marginBottom="82dip" android:layout_marginTop="15sp" android:textColor="#000" android:layout_gravity="bottom" android:text="@string/in_white"/> android:text="@string/in_white"/> <SeekBar <SeekBar android:id="@+id/outBlack" android:id="@+id/inWhite" android:layout_marginBottom="50dip" android:layout_marginLeft="10sp" android:layout_marginLeft="170dip" android:layout_marginRight="10sp" android:layout_marginRight="10dip" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content"/> android:layout_gravity="bottom" /> <TextView <TextView android:id="@+id/outBlackText" android:id="@+id/outBlackText" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:textSize="18sp" android:textSize="8pt" android:layout_marginLeft="220dip" android:layout_marginLeft="10sp" android:layout_marginBottom="52dip" android:layout_marginTop="15sp" android:textColor="#000" android:layout_gravity="bottom" android:text="@string/out_black"/> android:text="@string/out_black"/> <SeekBar <SeekBar android:id="@+id/inBlack" android:id="@+id/outBlack" android:layout_marginBottom="50dip" android:layout_marginLeft="10sp" android:layout_marginLeft="10dip" android:layout_marginRight="10sp" android:layout_marginRight="170dip" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content"/> android:layout_gravity="bottom" /> <TextView <TextView android:id="@+id/inBlackText" android:id="@+id/inBlackText" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:textSize="18sp" android:textSize="8pt" android:layout_marginLeft="50dip" android:layout_marginLeft="10sp" android:layout_marginBottom="52dip" android:layout_marginTop="15sp" android:textColor="#000" android:layout_gravity="bottom" android:text="@string/in_black"/> android:text="@string/in_black"/> <SeekBar <SeekBar android:id="@+id/radius" android:id="@+id/inBlack" android:layout_marginBottom="10dip" android:layout_marginLeft="10sp" android:layout_marginLeft="10dip" android:layout_marginRight="10sp" android:layout_marginRight="10dip" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content"/> android:layout_gravity="bottom" /> <TextView <TextView android:id="@+id/blurText" android:id="@+id/blurText" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:textSize="18sp" android:textSize="8pt" android:layout_marginLeft="50dip" android:layout_marginLeft="10sp" android:layout_marginBottom="12dip" android:layout_marginTop="15sp" android:textColor="#000" android:layout_gravity="bottom" android:text="@string/blur_description"/> android:text="@string/blur_description"/> <SeekBar android:id="@+id/radius" android:layout_marginLeft="10sp" android:layout_marginRight="10sp" android:layout_width="match_parent" android:layout_height="wrap_content"/> </LinearLayout> </ScrollView> </LinearLayout> </merge> No newline at end of file libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -346,7 +346,7 @@ public class ImageProcessingActivity extends Activity mSaturationSeekBar.setProgress(50); mSaturationSeekBar.setProgress(50); mBenchmarkResult = (TextView) findViewById(R.id.benchmarkText); mBenchmarkResult = (TextView) findViewById(R.id.benchmarkText); mBenchmarkResult.setText("Benchmark not yet run"); mBenchmarkResult.setText("Result: not run"); } } public void surfaceCreated(SurfaceHolder holder) { public void surfaceCreated(SurfaceHolder holder) { Loading Loading @@ -430,7 +430,7 @@ public class ImageProcessingActivity extends Activity //long javaTime = javaFilter(); //long javaTime = javaFilter(); //mBenchmarkResult.setText("RS: " + t + " ms Java: " + javaTime + " ms"); //mBenchmarkResult.setText("RS: " + t + " ms Java: " + javaTime + " ms"); mBenchmarkResult.setText("RS: " + t + " ms"); mBenchmarkResult.setText("Result: " + t + " ms"); mRadius = oldRadius; mRadius = oldRadius; mScript.set_radius(mRadius); mScript.set_radius(mRadius); Loading Loading
libs/rs/java/ImageProcessing/AndroidManifest.xml +1 −2 Original line number Original line Diff line number Diff line Loading @@ -6,8 +6,7 @@ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-sdk android:minSdkVersion="11" /> <uses-sdk android:minSdkVersion="11" /> <application android:label="Image Processing"> <application android:label="Image Processing"> <activity android:name="ImageProcessingActivity" <activity android:name="ImageProcessingActivity"> android:screenOrientation="portrait"> <intent-filter> <intent-filter> <action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" /> Loading
libs/rs/java/ImageProcessing/res/layout/main.xml +128 −162 Original line number Original line Diff line number Diff line Loading @@ -14,174 +14,140 @@ limitations under the License. limitations under the License. --> --> <merge xmlns:android="http://schemas.android.com/apk/res/android"> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <SurfaceView <SurfaceView android:id="@+id/surface" android:id="@+id/surface" android:layout_width="1dip" android:layout_width="1dip" android:layout_height="1dip" /> android:layout_height="1dip" /> <ImageView <ImageView android:id="@+id/display" android:id="@+id/display" android:layout_width="320dip" android:layout_width="320dip" android:layout_height="266dip" /> android:layout_height="266dip" /> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"> <Button <Button android:layout_marginBottom="170dip" android:layout_width="wrap_content" android:layout_width="wrap_content" android:layout_height="40dip" android:layout_height="wrap_content" android:text="@string/benchmark" android:text="@string/benchmark" android:onClick="benchmark" android:onClick="benchmark"/> android:layout_gravity="bottom"/> <TextView <TextView android:id="@+id/benchmarkText" android:id="@+id/benchmarkText" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:textSize="18sp" android:textSize="8pt" android:layout_marginLeft="100dip" android:layout_marginBottom="175dip" android:layout_gravity="bottom" android:text="@string/saturation"/> android:text="@string/saturation"/> </LinearLayout> <SeekBar <ScrollView android:id="@+id/inSaturation" android:layout_width="fill_parent" android:layout_marginBottom="140dip" android:layout_height="fill_parent"> android:layout_marginLeft="10dip" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_marginRight="10dip" android:orientation="vertical" android:layout_width="match_parent" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_height="fill_parent"> android:layout_gravity="bottom" /> <TextView <TextView android:id="@+id/inSaturationText" android:id="@+id/inSaturationText" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:textSize="18sp" android:textSize="8pt" android:layout_marginLeft="50dip" android:layout_marginLeft="10sp" android:layout_marginBottom="142dip" android:layout_marginTop="15sp" android:textColor="#000" android:layout_gravity="bottom" android:text="@string/saturation"/> android:text="@string/saturation"/> <SeekBar <SeekBar android:id="@+id/inGamma" android:id="@+id/inSaturation" android:layout_marginBottom="110dip" android:layout_marginLeft="10sp" android:layout_marginLeft="10dip" android:layout_marginRight="10sp" android:layout_marginRight="10dip" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content"/> android:layout_gravity="bottom" /> <TextView <TextView android:id="@+id/inGammaText" android:id="@+id/inGammaText" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:textSize="18sp" android:textSize="8pt" android:layout_marginLeft="50dip" android:layout_marginLeft="10sp" android:layout_marginBottom="112dip" android:layout_marginTop="15sp" android:textColor="#000" android:layout_gravity="bottom" android:text="@string/gamma"/> android:text="@string/gamma"/> <SeekBar <SeekBar android:id="@+id/outWhite" android:id="@+id/inGamma" android:layout_marginBottom="80dip" android:layout_marginLeft="10sp" android:layout_marginLeft="170dip" android:layout_marginRight="10sp" android:layout_marginRight="10dip" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content"/> android:layout_gravity="bottom" /> <TextView <TextView android:id="@+id/outWhiteText" android:id="@+id/outWhiteText" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:textSize="18sp" android:layout_marginLeft="10sp" android:layout_marginLeft="220dip" android:layout_marginTop="15sp" android:layout_marginBottom="82dip" android:textSize="8pt" android:textColor="#000" android:layout_gravity="bottom" android:text="@string/out_white"/> android:text="@string/out_white"/> <SeekBar <SeekBar android:id="@+id/inWhite" android:id="@+id/outWhite" android:layout_marginBottom="80dip" android:layout_marginLeft="10sp" android:layout_marginLeft="10dip" android:layout_marginRight="10sp" android:layout_marginRight="170dip" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content"/> android:layout_gravity="bottom" /> <TextView <TextView android:id="@+id/inWhiteText" android:id="@+id/inWhiteText" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:textSize="18sp" android:textSize="8pt" android:layout_marginLeft="50dip" android:layout_marginLeft="10sp" android:layout_marginBottom="82dip" android:layout_marginTop="15sp" android:textColor="#000" android:layout_gravity="bottom" android:text="@string/in_white"/> android:text="@string/in_white"/> <SeekBar <SeekBar android:id="@+id/outBlack" android:id="@+id/inWhite" android:layout_marginBottom="50dip" android:layout_marginLeft="10sp" android:layout_marginLeft="170dip" android:layout_marginRight="10sp" android:layout_marginRight="10dip" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content"/> android:layout_gravity="bottom" /> <TextView <TextView android:id="@+id/outBlackText" android:id="@+id/outBlackText" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:textSize="18sp" android:textSize="8pt" android:layout_marginLeft="220dip" android:layout_marginLeft="10sp" android:layout_marginBottom="52dip" android:layout_marginTop="15sp" android:textColor="#000" android:layout_gravity="bottom" android:text="@string/out_black"/> android:text="@string/out_black"/> <SeekBar <SeekBar android:id="@+id/inBlack" android:id="@+id/outBlack" android:layout_marginBottom="50dip" android:layout_marginLeft="10sp" android:layout_marginLeft="10dip" android:layout_marginRight="10sp" android:layout_marginRight="170dip" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content"/> android:layout_gravity="bottom" /> <TextView <TextView android:id="@+id/inBlackText" android:id="@+id/inBlackText" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:textSize="18sp" android:textSize="8pt" android:layout_marginLeft="50dip" android:layout_marginLeft="10sp" android:layout_marginBottom="52dip" android:layout_marginTop="15sp" android:textColor="#000" android:layout_gravity="bottom" android:text="@string/in_black"/> android:text="@string/in_black"/> <SeekBar <SeekBar android:id="@+id/radius" android:id="@+id/inBlack" android:layout_marginBottom="10dip" android:layout_marginLeft="10sp" android:layout_marginLeft="10dip" android:layout_marginRight="10sp" android:layout_marginRight="10dip" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content"/> android:layout_gravity="bottom" /> <TextView <TextView android:id="@+id/blurText" android:id="@+id/blurText" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:textSize="18sp" android:textSize="8pt" android:layout_marginLeft="50dip" android:layout_marginLeft="10sp" android:layout_marginBottom="12dip" android:layout_marginTop="15sp" android:textColor="#000" android:layout_gravity="bottom" android:text="@string/blur_description"/> android:text="@string/blur_description"/> <SeekBar android:id="@+id/radius" android:layout_marginLeft="10sp" android:layout_marginRight="10sp" android:layout_width="match_parent" android:layout_height="wrap_content"/> </LinearLayout> </ScrollView> </LinearLayout> </merge> No newline at end of file
libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -346,7 +346,7 @@ public class ImageProcessingActivity extends Activity mSaturationSeekBar.setProgress(50); mSaturationSeekBar.setProgress(50); mBenchmarkResult = (TextView) findViewById(R.id.benchmarkText); mBenchmarkResult = (TextView) findViewById(R.id.benchmarkText); mBenchmarkResult.setText("Benchmark not yet run"); mBenchmarkResult.setText("Result: not run"); } } public void surfaceCreated(SurfaceHolder holder) { public void surfaceCreated(SurfaceHolder holder) { Loading Loading @@ -430,7 +430,7 @@ public class ImageProcessingActivity extends Activity //long javaTime = javaFilter(); //long javaTime = javaFilter(); //mBenchmarkResult.setText("RS: " + t + " ms Java: " + javaTime + " ms"); //mBenchmarkResult.setText("RS: " + t + " ms Java: " + javaTime + " ms"); mBenchmarkResult.setText("RS: " + t + " ms"); mBenchmarkResult.setText("Result: " + t + " ms"); mRadius = oldRadius; mRadius = oldRadius; mScript.set_radius(mRadius); mScript.set_radius(mRadius); Loading