blob: 24a630c7b92fc3308ee2df073b2066478b4acd49 [file] [log] [blame]
Jason Sams326e0dd2009-05-22 14:03:28 -07001/*
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 "rsContext.h"
18
19using namespace android;
20using namespace android::renderscript;
21
22Script::Script()
23{
24 mClearColor[0] = 0;
25 mClearColor[1] = 0;
26 mClearColor[2] = 0;
27 mClearColor[3] = 1;
28 mClearDepth = 1;
29}
30
31Script::~Script()
32{
33}
34
35namespace android {
36namespace renderscript {
37
38
39void rsi_ScriptDestroy(Context * rsc, RsScript vs)
40{
41 Script *s = static_cast<Script *>(vs);
42 s->decRef();
43}
44
45void rsi_ScriptBindAllocation(Context * rsc, RsScript vs, RsAllocation va, uint32_t slot)
46{
47 Script *s = static_cast<Script *>(vs);
48 s->mSlots[slot].set(static_cast<Allocation *>(va));
49}
50
51
52}
53}
54