Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
skgpu::graphite::TextureProxyView Class Reference

#include <TextureProxyView.h>

Public Member Functions

 TextureProxyView ()=default
 
 TextureProxyView (sk_sp< TextureProxy > proxy, Swizzle swizzle)
 
 TextureProxyView (sk_sp< TextureProxy > proxy, Swizzle swizzle, Origin origin)
 
 TextureProxyView (sk_sp< TextureProxy > proxy)
 
 TextureProxyView (TextureProxyView &&view)=default
 
 TextureProxyView (const TextureProxyView &)=default
 
 operator bool () const
 
TextureProxyViewoperator= (const TextureProxyView &)=default
 
TextureProxyViewoperator= (TextureProxyView &&view)=default
 
bool operator== (const TextureProxyView &view) const
 
bool operator!= (const TextureProxyView &other) const
 
int width () const
 
int height () const
 
SkISize dimensions () const
 
skgpu::Mipmapped mipmapped () const
 
TextureProxyproxy () const
 
sk_sp< TextureProxyrefProxy () const
 
Swizzle swizzle () const
 
Origin origin () const
 
void concatSwizzle (Swizzle swizzle)
 
TextureProxyView makeSwizzle (Swizzle swizzle) const &
 
TextureProxyView makeSwizzle (Swizzle swizzle) &&
 
TextureProxyView replaceSwizzle (Swizzle swizzle) const
 
void reset ()
 
sk_sp< TextureProxydetachProxy ()
 

Detailed Description

Definition at line 23 of file TextureProxyView.h.

Constructor & Destructor Documentation

◆ TextureProxyView() [1/6]

skgpu::graphite::TextureProxyView::TextureProxyView ( )
default

◆ TextureProxyView() [2/6]

skgpu::graphite::TextureProxyView::TextureProxyView ( sk_sp< TextureProxy proxy,
Swizzle  swizzle 
)
inline

Definition at line 27 of file TextureProxyView.h.

28 : fProxy(std::move(proxy)), fSwizzle(swizzle) {}

◆ TextureProxyView() [3/6]

skgpu::graphite::TextureProxyView::TextureProxyView ( sk_sp< TextureProxy proxy,
Swizzle  swizzle,
Origin  origin 
)
inline

Definition at line 30 of file TextureProxyView.h.

31 : fProxy(std::move(proxy)), fSwizzle(swizzle), fOrigin(origin) {}

◆ TextureProxyView() [4/6]

skgpu::graphite::TextureProxyView::TextureProxyView ( sk_sp< TextureProxy proxy)
inlineexplicit

Definition at line 34 of file TextureProxyView.h.

35 : fProxy(std::move(proxy)) {}

◆ TextureProxyView() [5/6]

skgpu::graphite::TextureProxyView::TextureProxyView ( TextureProxyView &&  view)
default

◆ TextureProxyView() [6/6]

skgpu::graphite::TextureProxyView::TextureProxyView ( const TextureProxyView )
default

Member Function Documentation

◆ concatSwizzle()

void skgpu::graphite::TextureProxyView::concatSwizzle ( Swizzle  swizzle)
inline

Definition at line 69 of file TextureProxyView.h.

69 {
70 fSwizzle = skgpu::Swizzle::Concat(fSwizzle, swizzle);
71 }
static constexpr Swizzle Concat(const Swizzle &a, const Swizzle &b)
Definition: Swizzle.h:156

◆ detachProxy()

sk_sp< TextureProxy > skgpu::graphite::TextureProxyView::detachProxy ( )
inline

Definition at line 93 of file TextureProxyView.h.

93 {
94 return std::move(fProxy);
95 }

◆ dimensions()

SkISize skgpu::graphite::TextureProxyView::dimensions ( ) const
inline

Definition at line 54 of file TextureProxyView.h.

54{ return this->proxy()->dimensions(); }

◆ height()

int skgpu::graphite::TextureProxyView::height ( ) const
inline

Definition at line 53 of file TextureProxyView.h.

53{ return this->proxy()->dimensions().height(); }
constexpr int32_t height() const
Definition: SkSize.h:37

◆ makeSwizzle() [1/2]

TextureProxyView skgpu::graphite::TextureProxyView::makeSwizzle ( Swizzle  swizzle) &&
inline

Definition at line 78 of file TextureProxyView.h.

78 {
79 return {std::move(fProxy), Swizzle::Concat(fSwizzle, swizzle), fOrigin};
80 }

◆ makeSwizzle() [2/2]

TextureProxyView skgpu::graphite::TextureProxyView::makeSwizzle ( Swizzle  swizzle) const &
inline

Definition at line 74 of file TextureProxyView.h.

74 {
75 return {fProxy, Swizzle::Concat(fSwizzle, swizzle), fOrigin};
76 }

◆ mipmapped()

skgpu::Mipmapped skgpu::graphite::TextureProxyView::mipmapped ( ) const
inline

Definition at line 56 of file TextureProxyView.h.

56 {
57 if (const TextureProxy* proxy = this->proxy()) {
58 return proxy->mipmapped();
59 }
61 }
Mipmapped mipmapped() const
Definition: TextureProxy.h:35

◆ operator bool()

skgpu::graphite::TextureProxyView::operator bool ( ) const
inlineexplicit

Definition at line 40 of file TextureProxyView.h.

40{ return SkToBool(fProxy.get()); }
static constexpr bool SkToBool(const T &x)
Definition: SkTo.h:35

◆ operator!=()

bool skgpu::graphite::TextureProxyView::operator!= ( const TextureProxyView other) const
inline

Definition at line 50 of file TextureProxyView.h.

50{ return !(*this == other); }

◆ operator=() [1/2]

TextureProxyView & skgpu::graphite::TextureProxyView::operator= ( const TextureProxyView )
default

◆ operator=() [2/2]

TextureProxyView & skgpu::graphite::TextureProxyView::operator= ( TextureProxyView &&  view)
default

◆ operator==()

bool skgpu::graphite::TextureProxyView::operator== ( const TextureProxyView view) const
inline

Definition at line 45 of file TextureProxyView.h.

45 {
46 return fProxy == view.fProxy &&
47 fSwizzle == view.fSwizzle &&
48 fOrigin == view.fOrigin;
49 }

◆ origin()

Origin skgpu::graphite::TextureProxyView::origin ( ) const
inline

Definition at line 67 of file TextureProxyView.h.

67{ return fOrigin; }

◆ proxy()

TextureProxy * skgpu::graphite::TextureProxyView::proxy ( ) const
inline

Definition at line 63 of file TextureProxyView.h.

63{ return fProxy.get(); }

◆ refProxy()

sk_sp< TextureProxy > skgpu::graphite::TextureProxyView::refProxy ( ) const
inline

Definition at line 64 of file TextureProxyView.h.

64{ return fProxy; }

◆ replaceSwizzle()

TextureProxyView skgpu::graphite::TextureProxyView::replaceSwizzle ( Swizzle  swizzle) const
inline

Definition at line 83 of file TextureProxyView.h.

83 {
84 return {fProxy, swizzle, fOrigin};
85 }

◆ reset()

void skgpu::graphite::TextureProxyView::reset ( )
inline

Definition at line 87 of file TextureProxyView.h.

87 {
88 *this = {};
89 }

◆ swizzle()

Swizzle skgpu::graphite::TextureProxyView::swizzle ( ) const
inline

Definition at line 66 of file TextureProxyView.h.

66{ return fSwizzle; }

◆ width()

int skgpu::graphite::TextureProxyView::width ( ) const
inline

Definition at line 52 of file TextureProxyView.h.

52{ return this->proxy()->dimensions().width(); }
constexpr int32_t width() const
Definition: SkSize.h:36

The documentation for this class was generated from the following file: