• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2016 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #ifndef SkArithmeticImageFilter_DEFINED
9 #define SkArithmeticImageFilter_DEFINED
10 
11 #include "include/core/SkImageFilter.h"
12 
13 struct ArithmeticFPInputs {
ArithmeticFPInputsArithmeticFPInputs14     ArithmeticFPInputs() {
15         memset(this, 0, sizeof(*this));
16     }
17 
18     float k[4];
19     bool enforcePMColor;
20 };
21 
22 // DEPRECATED: Use include/effects/SkImageFilters::Arithmetic
23 class SK_API SkArithmeticImageFilter {
24 public:
25     static sk_sp<SkImageFilter> Make(float k1, float k2, float k3, float k4, bool enforcePMColor,
26                                      sk_sp<SkImageFilter> background,
27                                      sk_sp<SkImageFilter> foreground,
28                                      const SkImageFilter::CropRect* cropRect);
29 
30     static void RegisterFlattenables();
31 
32 private:
33     SkArithmeticImageFilter();  // can't instantiate
34 };
35 
36 #endif
37