diff options
author | Shih-wei Liao <sliao@google.com> | 2010-07-20 00:28:46 -0700 |
---|---|---|
committer | Shih-wei Liao <sliao@google.com> | 2010-07-20 00:36:47 -0700 |
commit | 3485976e84ff97cf54f640d8434affb6bec1a484 (patch) | |
tree | 18744553aaa6c5563df5172644dc0b3f1fc5b081 | |
parent | c0ac193b9415680f0a69e20a3f5f22d16f8053be (diff) | |
download | frameworks_base-3485976e84ff97cf54f640d8434affb6bec1a484.zip frameworks_base-3485976e84ff97cf54f640d8434affb6bec1a484.tar.gz frameworks_base-3485976e84ff97cf54f640d8434affb6bec1a484.tar.bz2 |
Port ModelViewer to use the new build system.
Fix the simulator build on Fountain.
Change-Id: I89b05c31595f0a8c3001171957eeeb2fec253c74
-rw-r--r-- | libs/rs/java/Fountain/Android.mk | 4 | ||||
-rw-r--r-- | libs/rs/java/ModelViewer/Android.mk | 6 | ||||
-rw-r--r-- | libs/rs/java/ModelViewer/res/raw/modelviewer_bc.bc | bin | 6216 -> 0 bytes | |||
-rw-r--r-- | libs/rs/java/ModelViewer/src/com/android/modelviewer/ModelViewerRS.java | 2 | ||||
-rw-r--r-- | libs/rs/java/ModelViewer/src/com/android/modelviewer/ScriptC_Modelviewer.java | 118 | ||||
-rw-r--r-- | libs/rs/java/ModelViewer/src/com/android/modelviewer/modelviewer.rs (renamed from libs/rs/java/ModelViewer/res/raw/modelviewer.rs) | 0 |
6 files changed, 10 insertions, 120 deletions
diff --git a/libs/rs/java/Fountain/Android.mk b/libs/rs/java/Fountain/Android.mk index 814d2ae..71944b2 100644 --- a/libs/rs/java/Fountain/Android.mk +++ b/libs/rs/java/Fountain/Android.mk @@ -14,6 +14,8 @@ # limitations under the License. # +ifneq ($(TARGET_SIMULATOR),true) + LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) @@ -25,3 +27,5 @@ LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-renderscript-fil LOCAL_PACKAGE_NAME := Fountain include $(BUILD_PACKAGE) + +endif diff --git a/libs/rs/java/ModelViewer/Android.mk b/libs/rs/java/ModelViewer/Android.mk index 8bec6d6..efe77d7 100644 --- a/libs/rs/java/ModelViewer/Android.mk +++ b/libs/rs/java/ModelViewer/Android.mk @@ -14,14 +14,18 @@ # limitations under the License. # +ifneq ($(TARGET_SIMULATOR),true) + LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional -LOCAL_SRC_FILES := $(call all-java-files-under, src) +LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-renderscript-files-under, src) #LOCAL_STATIC_JAVA_LIBRARIES := android.renderscript LOCAL_PACKAGE_NAME := ModelViewer include $(BUILD_PACKAGE) + +endif diff --git a/libs/rs/java/ModelViewer/res/raw/modelviewer_bc.bc b/libs/rs/java/ModelViewer/res/raw/modelviewer_bc.bc Binary files differdeleted file mode 100644 index fb85028..0000000 --- a/libs/rs/java/ModelViewer/res/raw/modelviewer_bc.bc +++ /dev/null diff --git a/libs/rs/java/ModelViewer/src/com/android/modelviewer/ModelViewerRS.java b/libs/rs/java/ModelViewer/src/com/android/modelviewer/ModelViewerRS.java index 37eb9c1..479aaf3 100644 --- a/libs/rs/java/ModelViewer/src/com/android/modelviewer/ModelViewerRS.java +++ b/libs/rs/java/ModelViewer/src/com/android/modelviewer/ModelViewerRS.java @@ -139,7 +139,7 @@ public class ModelViewerRS { private void initRS() { - mScript = new ScriptC_Modelviewer(mRS, mRes, R.raw.modelviewer_bc, true); + mScript = new ScriptC_Modelviewer(mRS, mRes, R.raw.modelviewer, true); initPFS(); initPF(); diff --git a/libs/rs/java/ModelViewer/src/com/android/modelviewer/ScriptC_Modelviewer.java b/libs/rs/java/ModelViewer/src/com/android/modelviewer/ScriptC_Modelviewer.java deleted file mode 100644 index 06c10ab..0000000 --- a/libs/rs/java/ModelViewer/src/com/android/modelviewer/ScriptC_Modelviewer.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (C) 2010 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.modelviewer; - -import android.renderscript.*; -import android.content.res.Resources; -import android.util.Log; - -public class ScriptC_Modelviewer extends ScriptC { - // Constructor - public ScriptC_Modelviewer(RenderScript rs, Resources resources, int id, boolean isRoot) { - super(rs, resources, id, isRoot); - } - - private final static int mExportVarIdx_gPVBackground = 0; - private ProgramVertex mExportVar_gPVBackground; - public void set_gPVBackground(ProgramVertex v) { - mExportVar_gPVBackground = v; - setVar(mExportVarIdx_gPVBackground, (v == null) ? 0 : v.getID()); - } - - public ProgramVertex get_gPVBackground() { - return mExportVar_gPVBackground; - } - - private final static int mExportVarIdx_gPFBackground = 1; - private ProgramFragment mExportVar_gPFBackground; - public void set_gPFBackground(ProgramFragment v) { - mExportVar_gPFBackground = v; - setVar(mExportVarIdx_gPFBackground, (v == null) ? 0 : v.getID()); - } - - public ProgramFragment get_gPFBackground() { - return mExportVar_gPFBackground; - } - - private final static int mExportVarIdx_gTGrid = 2; - private Allocation mExportVar_gTGrid; - public void set_gTGrid(Allocation v) { - mExportVar_gTGrid = v; - setVar(mExportVarIdx_gTGrid, (v == null) ? 0 : v.getID()); - } - - public Allocation get_gTGrid() { - return mExportVar_gTGrid; - } - - private final static int mExportVarIdx_gTestMesh = 3; - private Mesh mExportVar_gTestMesh; - public void set_gTestMesh(Mesh v) { - mExportVar_gTestMesh = v; - setVar(mExportVarIdx_gTestMesh, (v == null) ? 0 : v.getID()); - } - - public Mesh get_gTestMesh() { - return mExportVar_gTestMesh; - } - - private final static int mExportVarIdx_gPFSBackground = 4; - private ProgramStore mExportVar_gPFSBackground; - public void set_gPFSBackground(ProgramStore v) { - mExportVar_gPFSBackground = v; - setVar(mExportVarIdx_gPFSBackground, (v == null) ? 0 : v.getID()); - } - - public ProgramStore get_gPFSBackground() { - return mExportVar_gPFSBackground; - } - - private final static int mExportVarIdx_gRotate = 5; - private float mExportVar_gRotate; - public void set_gRotate(float v) { - mExportVar_gRotate = v; - setVar(mExportVarIdx_gRotate, v); - } - - public float get_gRotate() { - return mExportVar_gRotate; - } - - private final static int mExportVarIdx_gItalic = 6; - private Font mExportVar_gItalic; - public void set_gItalic(Font v) { - mExportVar_gItalic = v; - setVar(mExportVarIdx_gItalic, (v == null) ? 0 : v.getID()); - } - - public Font get_gItalic() { - return mExportVar_gItalic; - } - - private final static int mExportVarIdx_gTextAlloc = 7; - private Allocation mExportVar_gTextAlloc; - public void set_gTextAlloc(Allocation v) { - mExportVar_gTextAlloc = v; - setVar(mExportVarIdx_gTextAlloc, (v == null) ? 0 : v.getID()); - } - - public Allocation get_gTextAlloc() { - return mExportVar_gTextAlloc; - } - -} - diff --git a/libs/rs/java/ModelViewer/res/raw/modelviewer.rs b/libs/rs/java/ModelViewer/src/com/android/modelviewer/modelviewer.rs index 559bf48..559bf48 100644 --- a/libs/rs/java/ModelViewer/res/raw/modelviewer.rs +++ b/libs/rs/java/ModelViewer/src/com/android/modelviewer/modelviewer.rs |