blob: 89a07707c0ac6f4f3c661a0467fb69d8b9f71696 [file] [log] [blame]
Jason Sams9e0afb52011-10-31 13:23:43 -07001/*
2 * Copyright (C) 2011 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
22
23Path::Path(Context *rsc) : ObjectBase(rsc) {
24}
25
26Path::Path(Context *rsc, RsPathPrimitive pp, bool isStatic,
27 Allocation *vtx, Allocation *loops, float quality)
28: ObjectBase(rsc) {
29
30 memset(&mHal, 0, sizeof(mHal));
31 mHal.state.quality = quality;
32 mHal.state.primitive = pp;
33
34 LOGE("i1");
35 rsc->mHal.funcs.path.initStatic(rsc, this, vtx, loops);
36
37 LOGE("i2");
38}
39
40Path::Path(Context *rsc, uint32_t vertexBuffersCount, uint32_t primitivesCount)
41: ObjectBase(rsc) {
42
43}
44
45Path::~Path() {
46
47}
48
49
50void Path::rasterize(const BezierSegment_t *s, uint32_t num, Allocation *alloc) {
51
52 for (uint32_t i=0; i < num; i++) {
53
54 }
55
56}
57
58void Path::render(Context *rsc) {
59}
60
61void Path::serialize(OStream *stream) const {
62
63}
64
65RsA3DClassID Path::getClassId() const {
66 return RS_A3D_CLASS_ID_UNKNOWN;
67}
68
69namespace android {
70namespace renderscript {
71
72RsPath rsi_PathCreate(Context *rsc, RsPathPrimitive pp, bool isStatic,
73 RsAllocation vtx, RsAllocation loops, float quality) {
74 return new Path(rsc, pp, isStatic, (Allocation *)vtx, (Allocation *)loops, quality);
75}
76
77}
78}