Flutter Engine
Loading...
Searching...
No Matches
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"
15
#include "
third_party/tonic/typed_data/typed_list.h
"
16
17
namespace
flutter
{
18
19
class
ImageShader
:
public
Shader
{
20
DEFINE_WRAPPERTYPEINFO();
21
FML_FRIEND_MAKE_REF_COUNTED
(
ImageShader
);
22
23
public
:
24
~ImageShader
()
override
;
25
static
void
Create
(Dart_Handle wrapper);
26
27
Dart_Handle
initWithImage
(
CanvasImage
*
image
,
28
DlTileMode
tmx,
29
DlTileMode
tmy,
30
int
filter_quality_index,
31
Dart_Handle matrix_handle);
32
33
std::shared_ptr<DlColorSource>
shader
(
DlImageSampling
)
override
;
34
35
int
width
();
36
int
height
();
37
38
void
dispose
();
39
40
private
:
41
ImageShader
();
42
43
sk_sp<const DlImage> image_;
44
bool
sampling_is_locked_;
45
46
std::shared_ptr<DlColorSource> cached_shader_;
47
};
48
49
}
// namespace flutter
50
51
#endif
// FLUTTER_LIB_UI_PAINTING_IMAGE_SHADER_H_
flutter::CanvasImage
Definition
image.h:21
flutter::ImageShader
Definition
image_shader.h:19
flutter::ImageShader::height
int height()
Definition
image_shader.cc:64
flutter::ImageShader::dispose
void dispose()
Definition
image_shader.cc:68
flutter::ImageShader::shader
std::shared_ptr< DlColorSource > shader(DlImageSampling) override
Definition
image_shader.cc:51
flutter::ImageShader::~ImageShader
~ImageShader() override
flutter::ImageShader::initWithImage
Dart_Handle initWithImage(CanvasImage *image, DlTileMode tmx, DlTileMode tmy, int filter_quality_index, Dart_Handle matrix_handle)
Definition
image_shader.cc:27
flutter::ImageShader::width
int width()
Definition
image_shader.cc:60
flutter::ImageShader::Create
static void Create(Dart_Handle wrapper)
Definition
image_shader.cc:22
flutter::Shader
Definition
shader.h:13
dart_wrapper.h
image
FlutterVulkanImage * image
Definition
embedder_test_backingstore_producer_vulkan.cc:19
gradient.h
image.h
matrix.h
flutter
Definition
asset_manager.cc:10
flutter::DlImageSampling
DlImageSampling
Definition
dl_sampling_options.h:17
flutter::DlTileMode
DlTileMode
Definition
dl_tile_mode.h:13
FML_FRIEND_MAKE_REF_COUNTED
#define FML_FRIEND_MAKE_REF_COUNTED(T)
Definition
ref_counted.h:132
typed_list.h
shader.h
lib
ui
painting
image_shader.h
Generated on Thu Nov 6 2025 16:11:24 for Flutter Engine by
1.9.8