I can't find any real documentation about them. Example codes seem outdated as they use mostly deprecated and/or internal functions at key steps.
--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss+unsubscribe@googlegroups.com.
Hi David,
That looks correct to me. Though, I should add that readPixels is pretty expensive and, depending on what you're drawing, using it may mitigate any benefit of the gpu backend.Brian
On Thu Nov 20 2014 at 4:20:59 AM <david...@ptvgroup.com> wrote:
Hi Brian,--
thank you very much for your detailed answer and sorry for the delay on mine :)If I got everything right, all it takes to use the GPU as rasterizing backend for a bitmap is:
context = GrContext::Create(kOpenGL_GrBackend, NULL); // default opengl backend
surface = SkSurface::NewRenderTarget(context, image_info); // opengl backed surface
canvas = surface->getCanvas();
// draw to canvas here
bitmap->setInfo(canvas->imageInfo()); // setup bitmap
canvas->readPixels(bitmap); // write to bitmap
To be clear, I don't need to use any OpenGL functionality directly (yet), I just want to make sure, drawing operations make use of hardware acceleration.
Blessings,
David
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
--