1b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams/*
2b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams * Copyright (C) 2012 The Android Open Source Project
3b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams *
4b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams * Licensed under the Apache License, Version 2.0 (the "License");
5b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams * you may not use this file except in compliance with the License.
6b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams * You may obtain a copy of the License at
7b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams *
8b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams *      http://www.apache.org/licenses/LICENSE-2.0
9b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams *
10b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams * Unless required by applicable law or agreed to in writing, software
11b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams * distributed under the License is distributed on an "AS IS" BASIS,
12b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams * See the License for the specific language governing permissions and
14b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams * limitations under the License.
15b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams */
16b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams
17b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Samspackage com.android.rs.image2;
18b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams
19b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Samsimport java.lang.Math;
20b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams
21b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Samsimport android.support.v8.renderscript.*;
22b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Samsimport android.util.Log;
23b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams
24b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Samspublic class Copy extends TestBase {
25b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams    private ScriptC_copy mScript;
26b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams
27b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams    public void createTest(android.content.res.Resources res) {
28b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams        mScript = new ScriptC_copy(mRS, res, R.raw.copy);
29b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams    }
30b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams
31b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams    public void runTest() {
32b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams        mScript.forEach_root(mInPixelsAllocation, mOutPixelsAllocation);
33b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams    }
34b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams
35b2ae7a1a18ab278f6aed8d2b16576aa8361b358eJason Sams}
36