From ec715e827a75b839e5ff554bea57d4be42354e18 Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Fri, 24 Mar 2017 12:54:41 -0400 Subject: [PATCH] quick-fix to surface dox BUG=skia: Change-Id: I63cab1d5467fa908358a46199dc44cfe53c20f4f Reviewed-on: https://skia-review.googlesource.com/10115 Commit-Queue: Mike Reed Commit-Queue: Mike Klein Reviewed-by: Mike Klein --- include/core/SkSurface.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h index 52c0e5841a..0e2239a4ad 100644 --- a/include/core/SkSurface.h +++ b/include/core/SkSurface.h @@ -18,12 +18,11 @@ class GrContext; class GrRenderTarget; /** - * SkSurface represents the backend/results of drawing to a canvas. For raster - * drawing, the surface will be pixels, but (for example) when drawing into - * a PDF or Picture canvas, the surface stores the recorded commands. + * SkSurface is responsible for managing the pixels that a canvas draws into. The pixels can be + * allocated either in CPU memory (a Raster surface) or on the GPU (a RenderTarget surface). * - * To draw into a canvas, first create the appropriate type of Surface, and - * then request the canvas from the surface. + * SkSurface takes care of allocating a SkCanvas that will draw into the surface. Call + * surface->getCanvas() to use that canvas (but don't delete it, it is owned by the surface). * * SkSurface always has non-zero dimensions. If there is a request for a new surface, and either * of the requested dimensions are zero, then NULL will be returned.