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
6
8
9namespace flutter {
10
11sk_sp<DlImage> DlImage::Make(const SkImage* image) {
12 return Make(sk_ref_sp(image));
13}
14
15sk_sp<DlImage> DlImage::Make(sk_sp<SkImage> image) {
16 return sk_make_sp<DlImageSkia>(std::move(image));
17}
18
19DlImage::DlImage() = default;
20
21DlImage::~DlImage() = default;
22
23int DlImage::width() const {
24 return GetSize().width;
25};
26
27int DlImage::height() const {
28 return GetSize().height;
29};
30
34
35std::optional<std::string> DlImage::get_error() const {
36 return std::nullopt;
37}
38
39} // namespace flutter
virtual DlISize GetSize() const =0
virtual std::optional< std::string > get_error() const
Definition dl_image.cc:35
int height() const
Definition dl_image.cc:27
DlIRect GetBounds() const
Definition dl_image.cc:31
static sk_sp< DlImage > Make(const SkImage *image)
Definition dl_image.cc:11
virtual ~DlImage()
int width() const
Definition dl_image.cc:23
FlutterVulkanImage * image
static constexpr TRect MakeSize(const TSize< U > &size)
Definition rect.h:150
Type height
Definition size.h:29
Type width
Definition size.h:28