rsdCore.cpp revision bad807405b2b9764372af1ad24bcfd4fb1f33d8e
1/*
2 * Copyright (C) 2009 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "rsdCore.h"
18#include "rsdBcc.h"
19
20#include <malloc.h>
21#include "rsContext.h"
22
23using namespace android;
24using namespace android::renderscript;
25
26static RsdHalFunctions FunctionTable = {
27    NULL,
28    NULL,
29    {
30        rsdScriptInit,
31        rsdScriptInvokeFunction,
32        rsdScriptInvokeRoot,
33        rsdScriptInvokeInit,
34        rsdScriptSetGlobalVar,
35        rsdScriptSetGlobalBind,
36        rsdScriptSetGlobalObj,
37        rsdScriptDestroy
38    }
39};
40
41
42bool rsdHalInit(Context *rsc, uint32_t version_major, uint32_t version_minor) {
43    rsc->mHal.funcs = FunctionTable;
44
45    /*
46    rsc->mHal.drv = (RsHal *)calloc(1, sizeof(RsHal));
47    if (!rsc->mHal.drv) {
48        return false;
49    }
50    */
51
52    return true;
53}
54
55