| 95 | /* creates EvalPatch from a CatmullClarkPatch */ |
| 96 | template<typename Allocator> |
| 97 | __noinline static Ref create(const Allocator& alloc, const CatmullClarkPatch& patch) |
| 98 | { |
| 99 | size_t ofs = 0, bytes = patch.bytes(); |
| 100 | void* ptr = alloc(bytes); |
| 101 | patch.serialize(ptr,ofs); |
| 102 | assert(ofs == bytes); |
| 103 | return Ref(EVAL_PATCH, ptr); |
| 104 | } |
| 105 | }; |
| 106 | |
| 107 | struct BilinearPatch |