1 /*
2 * Copyright (c) 2023 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 "pixel_map_preview.h"
17
18 #include "base/image/pixel_map.h"
19 #include "base/log/log_wrapper.h"
20 #include "base/utils/utils.h"
21
22 namespace OHOS::Ace {
23
24 #if defined(ACE_STATIC)
Create(const InitializationOptions & opts)25 RefPtr<PixelMap> PixelMap::Create(const InitializationOptions& opts)
26 {
27 return nullptr;
28 }
29 #endif
30
CreatePixelMap(void * rawPtr)31 RefPtr<PixelMap> PixelMap::CreatePixelMap(void* rawPtr)
32 {
33 return nullptr;
34 }
35
GetFromDrawable(void * ptr)36 RefPtr<PixelMap> PixelMap::GetFromDrawable(void* ptr)
37 {
38 return nullptr;
39 }
40
GetPxielMapListFromAnimatedDrawable(void * ptr,std::vector<RefPtr<PixelMap>> & pixelMaps,int32_t & duration,int32_t & iterations)41 bool PixelMap::GetPxielMapListFromAnimatedDrawable(void* ptr, std::vector<RefPtr<PixelMap>>& pixelMaps,
42 int32_t& duration, int32_t& iterations)
43 {
44 return false;
45 }
46
CreatePixelMapFromDataAbility(void * uniquePtr)47 RefPtr<PixelMap> PixelMap::CreatePixelMapFromDataAbility(void* uniquePtr)
48 {
49 return nullptr;
50 }
51
ConvertSkImageToPixmap(const uint32_t * colors,uint32_t colorLength,int32_t width,int32_t height)52 RefPtr<PixelMap> PixelMap::ConvertSkImageToPixmap(
53 const uint32_t* colors, uint32_t colorLength, int32_t width, int32_t height)
54 {
55 return nullptr;
56 }
57
DecodeTlv(std::vector<uint8_t> & buff)58 RefPtr<PixelMap> PixelMap::DecodeTlv(std::vector<uint8_t>& buff)
59 {
60 return nullptr;
61 }
62
GetWidth() const63 int32_t PixelMapPreview::GetWidth() const
64 {
65 return -1;
66 }
67
GetHeight() const68 int32_t PixelMapPreview::GetHeight() const
69 {
70 return -1;
71 }
72
GetPixels() const73 const uint8_t* PixelMapPreview::GetPixels() const
74 {
75 return nullptr;
76 }
77
GetPixelsVec(std::vector<uint8_t> & data) const78 bool PixelMapPreview::GetPixelsVec(std::vector<uint8_t>& data) const
79 {
80 return false;
81 }
82
GetPixelFormat() const83 PixelFormat PixelMapPreview::GetPixelFormat() const
84 {
85 return PixelFormat::UNKNOWN;
86 }
87
GetAlphaType() const88 AlphaType PixelMapPreview::GetAlphaType() const
89 {
90 return AlphaType::IMAGE_ALPHA_TYPE_UNKNOWN;
91 }
92
GetRowStride() const93 int32_t PixelMapPreview::GetRowStride() const
94 {
95 return 0;
96 }
97
GetRowBytes() const98 int32_t PixelMapPreview::GetRowBytes() const
99 {
100 return 0;
101 }
102
GetByteCount() const103 int32_t PixelMapPreview::GetByteCount() const
104 {
105 return 0;
106 }
107
GetPixelManager() const108 void* PixelMapPreview::GetPixelManager() const
109 {
110 return nullptr;
111 }
112
GetRawPixelMapPtr() const113 void* PixelMapPreview::GetRawPixelMapPtr() const
114 {
115 return nullptr;
116 }
117
GetId()118 std::string PixelMapPreview::GetId()
119 {
120 return "";
121 }
122
GetModifyId()123 std::string PixelMapPreview::GetModifyId()
124 {
125 return "";
126 }
127
EncodeTlv(std::vector<uint8_t> & buff)128 bool PixelMapPreview::EncodeTlv(std::vector<uint8_t>& buff)
129 {
130 return false;
131 }
132
Scale(float xAxis,float yAxis)133 void PixelMapPreview::Scale(float xAxis, float yAxis) {}
134
Scale(float xAxis,float yAxis,const AceAntiAliasingOption & option)135 void PixelMapPreview::Scale(float xAxis, float yAxis, const AceAntiAliasingOption &option) {}
136
WritePixels(const WritePixelsOptions & opts)137 uint32_t PixelMapPreview::WritePixels(const WritePixelsOptions& opts)
138 {
139 return 0;
140 }
141
SetMemoryName(std::string pixelMapName) const142 void PixelMapPreview::SetMemoryName(std::string pixelMapName) const {}
143 } // namespace OHOS::Ace
144