Jason Sams | 221a4b1 | 2012-02-22 15:22:41 -0800 | [diff] [blame^] | 1 | |
| 2 | #include "RenderScript.h" |
| 3 | #include "Element.h" |
| 4 | #include "Type.h" |
| 5 | #include "Allocation.h" |
| 6 | |
| 7 | int main(int argc, char** argv) |
| 8 | { |
| 9 | |
| 10 | RenderScript *rs = new RenderScript(); |
| 11 | printf("New RS %p\n", rs); |
| 12 | |
| 13 | //usleep(100000); |
| 14 | |
| 15 | bool r = rs->init(16); |
| 16 | printf("Init returned %i\n", r); |
| 17 | |
| 18 | const Element *e = Element::RGBA_8888(rs); |
| 19 | printf("Element %p\n", e); |
| 20 | |
| 21 | Type::Builder tb(rs, e); |
| 22 | tb.setX(128); |
| 23 | tb.setY(128); |
| 24 | const Type *t = tb.create(); |
| 25 | printf("Type %p\n", t); |
| 26 | |
| 27 | |
| 28 | const Allocation *a1 = Allocation::createSized(rs, e, 1000); |
| 29 | printf("Allocation %p\n", a1); |
| 30 | |
| 31 | |
| 32 | //usleep(1000000); |
| 33 | |
| 34 | |
| 35 | printf("Deleting stuff\n"); |
| 36 | delete t; |
| 37 | delete a1; |
| 38 | delete e; |
| 39 | delete rs; |
| 40 | printf("Delete OK\n"); |
| 41 | } |