1# drawing_surface.h 2 3 4## Overview 5 6The **drawing_surface.h** file declares the functions related to the surface in the drawing module, including creating, destroying, and using the surface. 7 8**File to include**: <native_drawing/drawing_surface.h> 9 10**Library**: libnative_drawing.so 11 12**Since**: 12 13 14**Related module**: [Drawing](_drawing.md) 15 16 17## Summary 18 19### Functions 20 21| Name| Description| 22| -------- | -------- | 23| [OH_Drawing_Surface](_drawing.md#oh_drawing_surface) \* [OH_Drawing_SurfaceCreateFromGpuContext](_drawing.md#oh_drawing_surfacecreatefromgpucontext) ([OH_Drawing_GpuContext](_drawing.md#oh_drawing_gpucontext) \*, bool budgeted, [OH_Drawing_Image_Info](_o_h___drawing___image___info.md)) | Creates an **OH_Drawing_Surface** object using the GPU context to manage the content drawn on the canvas. | 24| [OH_Drawing_Surface](_drawing.md#oh_drawing_surface) \* [OH_Drawing_SurfaceCreateOnScreen](_drawing.md#oh_drawing_surfacecreateonscreen) ([OH_Drawing_GpuContext](_drawing.md#oh_drawing_gpucontext) \*gpuContext, [OH_Drawing_Image_Info](_o_h___drawing___image___info.md) imageInfo, void \*window) | Creates an **OH_Drawing_Surface** object bound to the window using the GPU context to manage the content drawn on the canvas. | 25| [OH_Drawing_Canvas](_drawing.md#oh_drawing_canvas) \* [OH_Drawing_SurfaceGetCanvas](_drawing.md#oh_drawing_surfacegetcanvas) ([OH_Drawing_Surface](_drawing.md#oh_drawing_surface) \*) | Obtains a canvas from an **OH_Drawing_Surface** object. | 26| [OH_Drawing_ErrorCode](_drawing.md#oh_drawing_errorcode) [OH_Drawing_SurfaceFlush](_drawing.md#oh_drawing_surfaceflush) ([OH_Drawing_Surface](_drawing.md#oh_drawing_surface) \*surface) | Pushes the drawing content from an **OH_Drawing_Surface** object to the GPU for rendering. | 27| void [OH_Drawing_SurfaceDestroy](_drawing.md#oh_drawing_surfacedestroy) ([OH_Drawing_Surface](_drawing.md#oh_drawing_surface) \*) | Destroys an **OH_Drawing_Surface** object and reclaims the memory occupied. | 28