From ee47232fc17f31ef2bd95ca480372216a79def56 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 4 May 2018 12:00:53 -0400 Subject: Use Surface for screen capture in Renderer interface (#551) * Remove serialization of screen captures from a renderer implementation, capture now writes to a Surface. Then client code can decide to serialize (or use as needed). * Improved comment for captureScreenSurface. --- tools/render-test/surface.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/render-test/surface.h') diff --git a/tools/render-test/surface.h b/tools/render-test/surface.h index f5f67efc0..c7460238f 100644 --- a/tools/render-test/surface.h +++ b/tools/render-test/surface.h @@ -37,6 +37,9 @@ class Surface /// Set unowned void setUnowned(int width, int height, Format format, int strideInBytes, void* data); + /// Set the contents - the memory will be owned by this surface (ie will be freed by the allocator when goes out of scope or is deallocated) + Slang::Result set(int width, int height, Format format, int strideInBytes, const void* data, SurfaceAllocator* allocator); + template T* calcNextRow(T* ptr) const { return (T*)calcNextRow((void*)ptr); } template -- cgit v1.2.3