Flutter Engine
The Flutter Engine
GrImageInfo.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2022 Google LLC
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
9
12
13#include <utility>
14
15GrImageInfo::GrImageInfo() = default;
16
18 : fColorInfo(info.colorInfo()), fDimensions(info.dimensions()) {}
19
21 : fColorInfo(ct, at, std::move(cs)), fDimensions{w,h} {}
22
24 const SkISize& dimensions)
25 : fColorInfo(ct, at, std::move(cs)), fDimensions(dimensions) {}
26
28 : fColorInfo(info), fDimensions(dimensions) {}
29
31 : fColorInfo(std::move(info)), fDimensions(dimensions) {}
32
37
39 return {this->colorInfo().makeColorType(ct), this->dimensions()};
40}
41
43 return {this->colorType(), at, this->refColorSpace(), this->width(), this->height()};
44}
45
47 return {this->colorType(), this->alphaType(), std::move(cs), this->width(), this->height()};
48}
49
51 return {this->colorType(), this->alphaType(), this->refColorSpace(), dimensions};
52}
53
55 return {this->colorType(), this->alphaType(), this->refColorSpace(), width, height};
56}
57
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213
GrColorType
Definition: GrTypesPriv.h:540
SkAlphaType
Definition: SkAlphaType.h:26
sk_sp< SkColorSpace > refColorSpace() const
Definition: GrColorInfo.cpp:49
GrColorInfo makeColorType(GrColorType ct) const
Definition: GrColorInfo.cpp:40
SkAlphaType alphaType() const
Definition: GrImageInfo.h:46
int width() const
Definition: GrImageInfo.h:54
GrImageInfo makeWH(int width, int height) const
Definition: GrImageInfo.cpp:54
GrImageInfo makeColorSpace(sk_sp< SkColorSpace > cs) const
Definition: GrImageInfo.cpp:46
GrImageInfo makeColorType(GrColorType ct) const
Definition: GrImageInfo.cpp:38
SkISize dimensions() const
Definition: GrImageInfo.h:52
GrImageInfo makeDimensions(SkISize dimensions) const
Definition: GrImageInfo.cpp:50
const GrColorInfo & colorInfo() const
Definition: GrImageInfo.h:42
sk_sp< SkColorSpace > refColorSpace() const
Definition: GrImageInfo.cpp:58
GrImageInfo & operator=(const GrImageInfo &)
GrColorType colorType() const
Definition: GrImageInfo.h:44
int height() const
Definition: GrImageInfo.h:56
GrImageInfo makeAlphaType(SkAlphaType at) const
Definition: GrImageInfo.cpp:42
Definition: ref_ptr.h:256
SkScalar w
SkScalar h
int32_t height
int32_t width
Definition: SkSize.h:16