| Index: dm/DMGpuSupport.cpp
|
| diff --git a/dm/DMGpuSupport.cpp b/dm/DMGpuSupport.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..87a406b4846f110267ca41f7618b75fbfddbb804
|
| --- /dev/null
|
| +++ b/dm/DMGpuSupport.cpp
|
| @@ -0,0 +1,9 @@
|
| +#include "DMGpuSupport.h"
|
| +#include "SkTLS.h"
|
| +
|
| +static void* create_gr_factory() { return new GrContextFactory; }
|
| +static void delete_gr_factory(void* p) { delete (GrContextFactory*)p; }
|
| +
|
| +GrContextFactory* GetThreadLocalGrContextFactory() {
|
| + return (GrContextFactory*)SkTLS::Get(create_gr_factory, delete_gr_factory);
|
| +}
|
|
|