diff --git a/build/sdk.atree b/build/sdk.atree index 48675b712..7cbad3977 100644 --- a/build/sdk.atree +++ b/build/sdk.atree @@ -174,7 +174,6 @@ developers/build/prebuilts/gradle/AdvancedImmersiveMode/ sam developers/build/prebuilts/gradle/ImmersiveMode/ samples/${PLATFORM_NAME}/ui/ImmersiveMode developers/build/prebuilts/gradle/RepeatingAlarm/ samples/${PLATFORM_NAME}/background/RepeatingAlarm developers/build/prebuilts/gradle/TextLinkify/ samples/${PLATFORM_NAME}/ui/TextLinkify -developers/build/prebuilts/gradle/BasicRenderScript samples/${PLATFORM_NAME}/renderscript/BasicRenderScript developers/build/prebuilts/gradle/RenderScriptIntrinsic samples/${PLATFORM_NAME}/renderscript/RenderScriptIntrinsic developers/build/prebuilts/gradle/SlidingTabsBasic samples/${PLATFORM_NAME}/ui/SlidingTabsBasic developers/build/prebuilts/gradle/SlidingTabsColors samples/${PLATFORM_NAME}/ui/SlidingTabsColors @@ -199,7 +198,6 @@ developers/build/prebuilts/gradle/ElevationBasic sam developers/build/prebuilts/gradle/ElevationDrag samples/${PLATFORM_NAME}/ui/views/Elevation/ElevationDrag developers/build/prebuilts/gradle/ClippingBasic samples/${PLATFORM_NAME}/ui/views/Clipping/ClippingBasic developers/build/prebuilts/gradle/JobScheduler samples/${PLATFORM_NAME}/background/JobScheduler -developers/build/prebuilts/gradle/HdrViewfinder samples/${PLATFORM_NAME}/media/HdrViewfinder developers/build/prebuilts/gradle/DocumentCentricApps samples/${PLATFORM_NAME}/ui/activitytasks/DocumentCentricApps developers/build/prebuilts/gradle/DocumentCentricRelinquishIdentity samples/${PLATFORM_NAME}/ui/activitytasks/DocumentCentricRelinquishIdentity developers/build/prebuilts/gradle/AppRestrictionEnforcer samples/${PLATFORM_NAME}/admin/AppRestrictionEnforcer @@ -304,7 +302,6 @@ development/samples/WiFiDirectServiceDiscovery samples/${PLATFORM_NAME}/legacy/W development/samples/Wiktionary samples/${PLATFORM_NAME}/legacy/Wiktionary development/samples/WiktionarySimple samples/${PLATFORM_NAME}/legacy/WiktionarySimple development/samples/XmlAdapters samples/${PLATFORM_NAME}/legacy/XmlAdapters -development/samples/RenderScript/HelloCompute samples/${PLATFORM_NAME}/legacy/RenderScript/HelloCompute # NOTICE files are copied by build/core/Makefile from sdk.git development/sdk/sdk_files_NOTICE.txt samples/${PLATFORM_NAME}/NOTICE.txt diff --git a/samples/RenderScript/Android.mk b/samples/RenderScript/Android.mk deleted file mode 100644 index 5053e7d64..000000000 --- a/samples/RenderScript/Android.mk +++ /dev/null @@ -1 +0,0 @@ -include $(call all-subdir-makefiles) diff --git a/samples/RenderScript/HelloCompute/Android.bp b/samples/RenderScript/HelloCompute/Android.bp deleted file mode 100644 index 76a82b983..000000000 --- a/samples/RenderScript/HelloCompute/Android.bp +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright (C) 2011 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 { - // See: http://go/android-license-faq - default_applicable_licenses: ["Android-Apache-2.0"], -} - -// This variable is used to match the 'LOCAL_SDK_VERSION' field in the former Android.mk file. -local_sdk_version = "14" -// This variable is used to set the value of the '-target-api' option for the 'llvm-rs-cc' command. -// Note: it may NOT always be the same as the 'local_sdk_version', due to the existing logic in the Make build system. -// For the Android.mk to Android.bp conversion, it is recommend to run the build before and after -// the conversion, to make sure the value of the '-target-api' option to be the same. -target_api_level = local_sdk_version - -android_app { - name: "RsHelloCompute", - srcs: [ - "src/**/*.java", - ":RsHelloCompute-rscript{RsHelloCompute.srcjar}", - ], - resource_zips: [ - ":RsHelloCompute-rscript{RsHelloCompute.res.zip}", - ], - sdk_version: local_sdk_version, -} - -genrule { - name: "RsHelloCompute-rscript", - srcs: [ - "src/**/*.rscript", - ":rs_script_api", - ":rs_clang_headers", - ], - tools: [ - "llvm-rs-cc", - "soong_zip", - ], - out: [ - "RsHelloCompute.srcjar", - "RsHelloCompute.res.zip", - ], - cmd: "for f in $(locations src/**/*.rscript); do " + - " $(location llvm-rs-cc) -target-api " + target_api_level + - " -o $(genDir)/res/raw -p $(genDir)/src " + - " -I $$(dirname $$(echo $(locations :rs_script_api) | awk '{ print $$1 }')) " + - " -I $$(dirname $$(echo $(locations :rs_clang_headers) | awk '{ print $$1 }')) $${f}; " + - "done && " + - "$(location soong_zip) -srcjar -o $(location RsHelloCompute.srcjar) -C $(genDir)/src -D $(genDir)/src &&" + - "$(location soong_zip) -o $(location RsHelloCompute.res.zip) -C $(genDir)/res -D $(genDir)/res", -} diff --git a/samples/RenderScript/HelloCompute/AndroidManifest.xml b/samples/RenderScript/HelloCompute/AndroidManifest.xml deleted file mode 100644 index 73e1110f0..000000000 --- a/samples/RenderScript/HelloCompute/AndroidManifest.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/samples/RenderScript/HelloCompute/_index.html b/samples/RenderScript/HelloCompute/_index.html deleted file mode 100644 index abfd9784a..000000000 --- a/samples/RenderScript/HelloCompute/_index.html +++ /dev/null @@ -1,2 +0,0 @@ -

A Renderscript compute sample that filters a bitmap. No Renderscript graphics APIs are used -in this sample.

\ No newline at end of file diff --git a/samples/RenderScript/HelloCompute/res/drawable/data.jpg b/samples/RenderScript/HelloCompute/res/drawable/data.jpg deleted file mode 100644 index b7a0cbd39..000000000 Binary files a/samples/RenderScript/HelloCompute/res/drawable/data.jpg and /dev/null differ diff --git a/samples/RenderScript/HelloCompute/res/layout/main.xml b/samples/RenderScript/HelloCompute/res/layout/main.xml deleted file mode 100644 index 3f7de4313..000000000 --- a/samples/RenderScript/HelloCompute/res/layout/main.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - diff --git a/samples/RenderScript/HelloCompute/src/com/example/android/rs/hellocompute/HelloCompute.java b/samples/RenderScript/HelloCompute/src/com/example/android/rs/hellocompute/HelloCompute.java deleted file mode 100644 index 643df9b2a..000000000 --- a/samples/RenderScript/HelloCompute/src/com/example/android/rs/hellocompute/HelloCompute.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2011 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.example.android.rs.hellocompute; - -import android.app.Activity; -import android.os.Bundle; -import android.graphics.BitmapFactory; -import android.graphics.Bitmap; -import android.renderscript.RenderScript; -import android.renderscript.Allocation; -import android.widget.ImageView; - -public class HelloCompute extends Activity { - private Bitmap mBitmapIn; - private Bitmap mBitmapOut; - - private RenderScript mRS; - private Allocation mInAllocation; - private Allocation mOutAllocation; - private ScriptC_mono mScript; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.main); - - mBitmapIn = loadBitmap(R.drawable.data); - mBitmapOut = Bitmap.createBitmap(mBitmapIn.getWidth(), mBitmapIn.getHeight(), - mBitmapIn.getConfig()); - - ImageView in = (ImageView) findViewById(R.id.displayin); - in.setImageBitmap(mBitmapIn); - - ImageView out = (ImageView) findViewById(R.id.displayout); - out.setImageBitmap(mBitmapOut); - - createScript(); - } - - - private void createScript() { - mRS = RenderScript.create(this); - - mInAllocation = Allocation.createFromBitmap(mRS, mBitmapIn, - Allocation.MipmapControl.MIPMAP_NONE, - Allocation.USAGE_SCRIPT); - mOutAllocation = Allocation.createFromBitmap(mRS, mBitmapOut, - Allocation.MipmapControl.MIPMAP_NONE, - Allocation.USAGE_SCRIPT); - - mScript = new ScriptC_mono(mRS); - - mScript.forEach_root(mInAllocation, mOutAllocation); - mOutAllocation.copyTo(mBitmapOut); - } - - private Bitmap loadBitmap(int resource) { - final BitmapFactory.Options options = new BitmapFactory.Options(); - options.inPreferredConfig = Bitmap.Config.ARGB_8888; - return BitmapFactory.decodeResource(getResources(), resource, options); - } -} diff --git a/samples/RenderScript/HelloCompute/src/com/example/android/rs/hellocompute/mono.rscript b/samples/RenderScript/HelloCompute/src/com/example/android/rs/hellocompute/mono.rscript deleted file mode 100644 index 08592f558..000000000 --- a/samples/RenderScript/HelloCompute/src/com/example/android/rs/hellocompute/mono.rscript +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2011 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. - */ - -#pragma version(1) -#pragma rs java_package_name(com.example.android.rs.hellocompute) - -const static float3 gMonoMult = {0.299f, 0.587f, 0.114f}; - -void root(const uchar4 *v_in, uchar4 *v_out) { - float4 f4 = rsUnpackColor8888(*v_in); - - float3 mono = dot(f4.rgb, gMonoMult); - *v_out = rsPackColorTo8888(mono); -} - diff --git a/samples/RenderScript/Levels/Android.bp b/samples/RenderScript/Levels/Android.bp deleted file mode 100644 index fd1876f11..000000000 --- a/samples/RenderScript/Levels/Android.bp +++ /dev/null @@ -1,56 +0,0 @@ -// -// Copyright (C) 2012 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 { - // See: http://go/android-license-faq - default_applicable_licenses: ["Android-Apache-2.0"], -} - -android_app { - name: "LevelsRS", - srcs: [ - "src/**/*.java", - ":LevelsRS-rscript{LevelsRS.srcjar}", - ], - resource_zips: [ - ":LevelsRS-rscript{LevelsRS.res.zip}", - ], - sdk_version: "current", -} - -genrule { - name: "LevelsRS-rscript", - srcs: [ - "src/**/*.rscript", - ":rs_script_api", - ":rs_clang_headers", - ], - tools: [ - "llvm-rs-cc", - "soong_zip", - ], - out: [ - "LevelsRS.srcjar", - "LevelsRS.res.zip", - ], - cmd: "for f in $(locations src/**/*.rscript); do " + - " $(location llvm-rs-cc) -o $(genDir)/res/raw -p $(genDir)/src " + - " -I $$(dirname $$(echo $(locations :rs_script_api) | awk '{ print $$1 }')) " + - " -I $$(dirname $$(echo $(locations :rs_clang_headers) | awk '{ print $$1 }')) $${f}; " + - "done && " + - "$(location soong_zip) -srcjar -o $(location LevelsRS.srcjar) -C $(genDir)/src -D $(genDir)/src &&" + - "$(location soong_zip) -o $(location LevelsRS.res.zip) -C $(genDir)/res -D $(genDir)/res", -} diff --git a/samples/RenderScript/Levels/AndroidManifest.xml b/samples/RenderScript/Levels/AndroidManifest.xml deleted file mode 100644 index 829404843..000000000 --- a/samples/RenderScript/Levels/AndroidManifest.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/RenderScript/Levels/res/drawable-nodpi/city.png b/samples/RenderScript/Levels/res/drawable-nodpi/city.png deleted file mode 100644 index 856eeff59..000000000 Binary files a/samples/RenderScript/Levels/res/drawable-nodpi/city.png and /dev/null differ diff --git a/samples/RenderScript/Levels/res/layout/main.xml b/samples/RenderScript/Levels/res/layout/main.xml deleted file mode 100644 index a6a075cbe..000000000 --- a/samples/RenderScript/Levels/res/layout/main.xml +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - -