Flutter Engine
image_shader.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef FLUTTER_LIB_UI_PAINTING_IMAGE_SHADER_H_
6 #define FLUTTER_LIB_UI_PAINTING_IMAGE_SHADER_H_
7 
8 #include "flutter/lib/ui/dart_wrapper.h"
9 #include "flutter/lib/ui/painting/gradient.h"
10 #include "flutter/lib/ui/painting/image.h"
11 #include "flutter/lib/ui/painting/matrix.h"
12 #include "flutter/lib/ui/painting/shader.h"
13 #include "third_party/skia/include/core/SkMatrix.h"
14 #include "third_party/skia/include/core/SkShader.h"
16 
17 namespace tonic {
18 class DartLibraryNatives;
19 } // namespace tonic
20 
21 namespace flutter {
22 
23 class ImageShader : public Shader {
26 
27  public:
28  ~ImageShader() override;
29  static fml::RefPtr<ImageShader> Create();
30 
31  void initWithImage(CanvasImage* image,
32  SkTileMode tmx,
33  SkTileMode tmy,
34  const tonic::Float64List& matrix4);
35 
36  static void RegisterNatives(tonic::DartLibraryNatives* natives);
37 
38  private:
39  ImageShader();
40 };
41 
42 } // namespace flutter
43 
44 #endif // FLUTTER_LIB_UI_PAINTING_IMAGE_SHADER_H_
#define DEFINE_WRAPPERTYPEINFO()
#define FML_FRIEND_MAKE_REF_COUNTED(T)
Definition: ref_counted.h:131