Flutter Engine
Loading...
Searching...
No Matches
dl_image.cc
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
#include "
flutter/display_list/image/dl_image.h
"
6
7
#include "
flutter/display_list/image/dl_image_skia.h
"
8
9
namespace
flutter
{
10
11
sk_sp<DlImage>
DlImage::Make
(
const
SkImage*
image
) {
12
return
Make
(sk_ref_sp(
image
));
13
}
14
15
sk_sp<DlImage>
DlImage::Make
(sk_sp<SkImage>
image
) {
16
return
sk_make_sp<DlImageSkia>(std::move(
image
));
17
}
18
19
DlImage::DlImage
() =
default
;
20
21
DlImage::~DlImage
() =
default
;
22
23
int
DlImage::width
()
const
{
24
return
GetSize
().
width
;
25
};
26
27
int
DlImage::height
()
const
{
28
return
GetSize
().
height
;
29
};
30
31
DlIRect
DlImage::GetBounds
()
const
{
32
return
DlIRect::MakeSize
(
GetSize
());
33
}
34
35
std::optional<std::string>
DlImage::get_error
()
const
{
36
return
std::nullopt;
37
}
38
39
}
// namespace flutter
flutter::DlImage::GetSize
virtual DlISize GetSize() const =0
flutter::DlImage::get_error
virtual std::optional< std::string > get_error() const
Definition
dl_image.cc:35
flutter::DlImage::height
int height() const
Definition
dl_image.cc:27
flutter::DlImage::GetBounds
DlIRect GetBounds() const
Definition
dl_image.cc:31
flutter::DlImage::DlImage
DlImage()
flutter::DlImage::Make
static sk_sp< DlImage > Make(const SkImage *image)
Definition
dl_image.cc:11
flutter::DlImage::~DlImage
virtual ~DlImage()
flutter::DlImage::width
int width() const
Definition
dl_image.cc:23
dl_image.h
dl_image_skia.h
image
FlutterVulkanImage * image
Definition
embedder_test_backingstore_producer_vulkan.cc:19
flutter
Definition
asset_manager.cc:10
impeller::TRect
Definition
rect.h:122
impeller::TRect::MakeSize
static constexpr TRect MakeSize(const TSize< U > &size)
Definition
rect.h:150
impeller::TSize::height
Type height
Definition
size.h:29
impeller::TSize::width
Type width
Definition
size.h:28
display_list
image
dl_image.cc
Generated on Wed Nov 5 2025 21:33:11 for Flutter Engine by
1.9.8