• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include "soft_engine.h"
17 #include "MockGlobalResult.h"
18 
19 namespace OHOS {
20     // all functions only for mock test, no specific implementation
DrawArc(BufferInfo & dst,ArcInfo & arcInfo,const Rect & mask,const Style & style,OpacityType opacity,uint8_t cap)21     void SoftEngine::DrawArc(BufferInfo& dst, ArcInfo& arcInfo, const Rect& mask, const Style& style,
22         OpacityType opacity, uint8_t cap) {}
23 
DrawLine(BufferInfo & dst,const Point & start,const Point & end,const Rect & mask,int16_t width,ColorType color,OpacityType opacity)24     void SoftEngine::DrawLine(BufferInfo& dst, const Point& start, const Point& end, const Rect& mask,
25         int16_t width, ColorType color, OpacityType opacity) {}
26 
DrawLetter(BufferInfo & gfxDstBuffer,const uint8_t * fontMap,const Rect & fontRect,const Rect & subRect,const uint8_t fontWeight,const ColorType & color,const OpacityType opa)27     void SoftEngine::DrawLetter(BufferInfo& gfxDstBuffer, const uint8_t* fontMap, const Rect& fontRect,
28         const Rect& subRect, const uint8_t fontWeight, const ColorType& color, const OpacityType opa) {}
29 
DrawCubicBezier(BufferInfo & dst,const Point & start,const Point & control1,const Point & control2,const Point & end,const Rect & mask,int16_t width,ColorType color,OpacityType opacity)30     void SoftEngine::DrawCubicBezier(BufferInfo& dst, const Point& start, const Point& control1,
31         const Point& control2, const Point& end, const Rect& mask, int16_t width, ColorType color,
32         OpacityType opacity) {}
33 
DrawRect(BufferInfo & dst,const Rect & rect,const Rect & dirtyRect,const Style & style,OpacityType opacity)34     void SoftEngine::DrawRect(BufferInfo& dst, const Rect& rect, const Rect& dirtyRect, const Style& style,
35         OpacityType opacity) {}
36 
DrawTransform(BufferInfo & dst,const Rect & mask,const Point & position,ColorType color,OpacityType opacity,const TransformMap & transMap,const TransformDataInfo & dataInfo)37     void SoftEngine::DrawTransform(BufferInfo& dst, const Rect& mask, const Point& position, ColorType color,
38         OpacityType opacity, const TransformMap& transMap, const TransformDataInfo& dataInfo) {}
39 
ClipCircle(const ImageInfo * info,float x,float y,float radius)40     void SoftEngine::ClipCircle(const ImageInfo* info, float x, float y, float radius) {}
41 
Blit(BufferInfo & dst,const Point & dstPos,const BufferInfo & src,const Rect & subRect,const BlendOption & blendOption)42     void SoftEngine::Blit(BufferInfo& dst, const Point& dstPos, const BufferInfo& src, const Rect& subRect,
43         const BlendOption& blendOption) {}
44 
Fill(BufferInfo & dst,const Rect & fillArea,const ColorType color,const OpacityType opacity)45     void SoftEngine::Fill(BufferInfo& dst, const Rect& fillArea, const ColorType color,
46         const OpacityType opacity) {}
47 
DrawPath(BufferInfo & dst,void * param,const Paint & paint,const Rect & rect,const Rect & invalidatedArea,const Style & style)48     void SoftEngine::DrawPath(BufferInfo& dst, void* param, const Paint& paint, const Rect& rect,
49         const Rect& invalidatedArea, const Style& style) {}
50 
FillPath(BufferInfo & dst,void * param,const Paint & paint,const Rect & rect,const Rect & invalidatedArea,const Style & style)51     void SoftEngine::FillPath(BufferInfo& dst, void* param, const Paint& paint, const Rect& rect,
52         const Rect& invalidatedArea, const Style& style) {}
53 
AllocBuffer(uint32_t size,uint32_t usage)54     uint8_t* SoftEngine::AllocBuffer(uint32_t size, uint32_t usage)
55     {
56         return nullptr;
57     }
58 
FreeBuffer(uint8_t * buffer,uint32_t usage)59     void SoftEngine::FreeBuffer(uint8_t* buffer, uint32_t usage) {}
60 }