• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 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 #ifndef RENDER_SERVICE_CLIENT_CORE_RENDER_SKIA_RS_SKIA_FILTER_H
16 #define RENDER_SERVICE_CLIENT_CORE_RENDER_SKIA_RS_SKIA_FILTER_H
17 
18 #include "include/core/SkCanvas.h"
19 #include "include/core/SkImageFilter.h"
20 #include "include/core/SkPaint.h"
21 
22 #include "render/rs_filter.h"
23 
24 namespace OHOS {
25 namespace Rosen {
26 class RSPaintFilterCanvas;
27 class RSSkiaFilter : public RSFilter {
28 public:
29     ~RSSkiaFilter() override;
30     SkPaint GetPaint() const;
PreProcess(sk_sp<SkImage> image)31     virtual void PreProcess(sk_sp<SkImage> image) {};
PostProcess(RSPaintFilterCanvas & canvas)32     virtual void PostProcess(RSPaintFilterCanvas& canvas) {};
33 
34 protected:
35     RSSkiaFilter(sk_sp<SkImageFilter> imagefilter);
36 
37 private:
38     sk_sp<SkImageFilter> imageFilter_;
39 };
40 } // namespace Rosen
41 } // namespace OHOS
42 
43 #endif // RENDER_SERVICE_CLIENT_CORE_RENDER_SKIA_RS_SKIA_FILTER_H