#include <SkMipmapAccessor.h>
Definition at line 26 of file SkMipmapAccessor.h.
◆ SkMipmapAccessor()
Definition at line 35 of file SkMipmapAccessor.cpp.
36 {
38 fLowerWeight = 0;
39
40 auto load_upper_from_base = [&]() {
41
42 if (fBaseStorage.
getPixels() ==
nullptr) {
44 (void)
image->getROPixels(dContext, &fBaseStorage);
46 }
47 };
48
52 if (!
inv.decomposeScale(&
scale,
nullptr)) {
54 } else {
59 }
60 }
61 }
62
66 };
67
68
69
74
75 if (levelNum == 0) {
76 load_upper_from_base();
77 }
78
81 if (!fCurrMip) {
82 load_upper_from_base();
84 } else {
86
88 if (levelNum > 0) {
89 if (fCurrMip->
getLevel(levelNum - 1, &levelRec)) {
91 } else {
92 load_upper_from_base();
94 }
95 }
96
98 if (fCurrMip->
getLevel(levelNum, &levelRec)) {
101 fLowerInv =
scale(fLower);
102 } else {
104 }
105 }
106 }
107 }
108 fUpperInv =
scale(fUpper);
109}
static SkM44 inv(const SkM44 &m)
#define sk_float_round2int(x)
#define sk_float_floor2int(x)
static SkImage_Base * as_IB(SkImage *image)
static sk_sp< const SkMipmap > try_load_mips(const SkImage_Base *image)
const SkImageInfo & info() const
virtual GrDirectContext * directContext() const
static SkMatrix Scale(SkScalar sx, SkScalar sy)
float lowerWeight() const
std::pair< SkPixmap, SkMatrix > level() const
static float ComputeLevel(SkSize scaleSize)
bool getLevel(int index, Level *) const
◆ level()
Definition at line 31 of file SkMipmapAccessor.h.
31 {
33 return std::make_pair(fUpper, fUpperInv);
34 }
const void * addr() const
◆ lowerLevel()
Definition at line 36 of file SkMipmapAccessor.h.
36 {
38 return std::make_pair(fLower, fLowerInv);
39 }
◆ lowerWeight()
float SkMipmapAccessor::lowerWeight |
( |
| ) |
const |
|
inline |
◆ Make()
Definition at line 111 of file SkMipmapAccessor.cpp.
112 {
114
115 return access->fUpper.
addr() ? access :
nullptr;
116}
auto make(Ctor &&ctor) -> decltype(ctor(nullptr))
The documentation for this class was generated from the following files: