blob: 28b135fba26191624d62ba26c84dd25e469cbae5 [file] [log] [blame]
Jason Samsf70b0fc82012-02-22 15:22:41 -08001
2#include "RenderScript.h"
3#include "Element.h"
4#include "Type.h"
5#include "Allocation.h"
6
7int main(int argc, char** argv)
8{
9
10 RenderScript *rs = new RenderScript();
11 printf("New RS %p\n", rs);
12
Jason Samsf70b0fc82012-02-22 15:22:41 -080013 bool r = rs->init(16);
14 printf("Init returned %i\n", r);
15
16 const Element *e = Element::RGBA_8888(rs);
17 printf("Element %p\n", e);
18
19 Type::Builder tb(rs, e);
20 tb.setX(128);
21 tb.setY(128);
22 const Type *t = tb.create();
23 printf("Type %p\n", t);
24
25
26 const Allocation *a1 = Allocation::createSized(rs, e, 1000);
27 printf("Allocation %p\n", a1);
28
29
Jason Samsf70b0fc82012-02-22 15:22:41 -080030
31 printf("Deleting stuff\n");
32 delete t;
33 delete a1;
34 delete e;
35 delete rs;
36 printf("Delete OK\n");
37}