17777dab0Sopenharmony_ci/*
27777dab0Sopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
37777dab0Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
47777dab0Sopenharmony_ci * you may not use this file except in compliance with the License.
57777dab0Sopenharmony_ci * You may obtain a copy of the License at
67777dab0Sopenharmony_ci *
77777dab0Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
87777dab0Sopenharmony_ci *
97777dab0Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
107777dab0Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
117777dab0Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
127777dab0Sopenharmony_ci * See the License for the specific language governing permissions and
137777dab0Sopenharmony_ci * limitations under the License.
147777dab0Sopenharmony_ci */
157777dab0Sopenharmony_ci
167777dab0Sopenharmony_ci#ifndef C_INCLUDE_DRAWING_GPU_SURFACE_H
177777dab0Sopenharmony_ci#define C_INCLUDE_DRAWING_GPU_SURFACE_H
187777dab0Sopenharmony_ci
197777dab0Sopenharmony_ci/**
207777dab0Sopenharmony_ci * @addtogroup Drawing
217777dab0Sopenharmony_ci * @{
227777dab0Sopenharmony_ci *
237777dab0Sopenharmony_ci * @brief Provides functions such as 2D graphics rendering, text drawing, and image display.
247777dab0Sopenharmony_ci *
257777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
267777dab0Sopenharmony_ci *
277777dab0Sopenharmony_ci * @since 8
287777dab0Sopenharmony_ci * @version 1.0
297777dab0Sopenharmony_ci */
307777dab0Sopenharmony_ci
317777dab0Sopenharmony_ci/**
327777dab0Sopenharmony_ci * @file drawing_surface.h
337777dab0Sopenharmony_ci *
347777dab0Sopenharmony_ci * @brief Declares functions related to the <b>OH_Drawing_Surface</b> object in the drawing module.
357777dab0Sopenharmony_ci *
367777dab0Sopenharmony_ci * @kit ArkGraphics2D
377777dab0Sopenharmony_ci * @library libnative_drawing.so
387777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
397777dab0Sopenharmony_ci * @since 12
407777dab0Sopenharmony_ci * @version 1.0
417777dab0Sopenharmony_ci */
427777dab0Sopenharmony_ci
437777dab0Sopenharmony_ci#include "drawing_types.h"
447777dab0Sopenharmony_ci
457777dab0Sopenharmony_ci#ifdef __cplusplus
467777dab0Sopenharmony_ciextern "C" {
477777dab0Sopenharmony_ci#endif
487777dab0Sopenharmony_ci
497777dab0Sopenharmony_ci/**
507777dab0Sopenharmony_ci * @brief Creates an <b>OH_Drawing_Surface</b> object on GPU indicated by context.
517777dab0Sopenharmony_ci *
527777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
537777dab0Sopenharmony_ci * @param OH_Drawing_GpuContext Indicates the pointer to an <b>OH_Drawing_GpuContext</b> object.
547777dab0Sopenharmony_ci * @param bool Indicates whether an allocation should count against a cache budget.
557777dab0Sopenharmony_ci * @param OH_Drawing_Image_Info Indicates the image info.
567777dab0Sopenharmony_ci * @return Returns the pointer to the <b>OH_Drawing_Surface</b> object created.
577777dab0Sopenharmony_ci * @since 12
587777dab0Sopenharmony_ci * @version 1.0
597777dab0Sopenharmony_ci */
607777dab0Sopenharmony_ciOH_Drawing_Surface* OH_Drawing_SurfaceCreateFromGpuContext(
617777dab0Sopenharmony_ci    OH_Drawing_GpuContext*, bool, OH_Drawing_Image_Info);
627777dab0Sopenharmony_ci
637777dab0Sopenharmony_ci/**
647777dab0Sopenharmony_ci * @brief Gets the canvas that draws into surface.
657777dab0Sopenharmony_ci *
667777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
677777dab0Sopenharmony_ci * @param OH_Drawing_Surface Indicates the pointer to an <b>OH_Drawing_Surface</b> object.
687777dab0Sopenharmony_ci * @return Returns the pointer to the <b>OH_Drawing_Canvas</b> object. The returned pointer does not need to be managed
697777dab0Sopenharmony_ci *         by the caller.
707777dab0Sopenharmony_ci * @since 12
717777dab0Sopenharmony_ci * @version 1.0
727777dab0Sopenharmony_ci */
737777dab0Sopenharmony_ciOH_Drawing_Canvas* OH_Drawing_SurfaceGetCanvas(OH_Drawing_Surface*);
747777dab0Sopenharmony_ci
757777dab0Sopenharmony_ci/**
767777dab0Sopenharmony_ci * @brief Destroys an <b>OH_Drawing_Surface</b> object and reclaims the memory occupied by the object.
777777dab0Sopenharmony_ci *
787777dab0Sopenharmony_ci * @syscap SystemCapability.Graphic.Graphic2D.NativeDrawing
797777dab0Sopenharmony_ci * @param OH_Drawing_Surface Indicates the pointer to an <b>OH_Drawing_Surface</b> object.
807777dab0Sopenharmony_ci * @since 12
817777dab0Sopenharmony_ci * @version 1.0
827777dab0Sopenharmony_ci */
837777dab0Sopenharmony_civoid OH_Drawing_SurfaceDestroy(OH_Drawing_Surface*);
847777dab0Sopenharmony_ci
857777dab0Sopenharmony_ci#ifdef __cplusplus
867777dab0Sopenharmony_ci}
877777dab0Sopenharmony_ci#endif
887777dab0Sopenharmony_ci/** @} */
897777dab0Sopenharmony_ci#endif