Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
GrSurfaceProxyView Class Reference

#include <GrSurfaceProxyView.h>

Public Types

using sk_is_trivially_relocatable = std::true_type
 

Public Member Functions

 GrSurfaceProxyView ()=default
 
 GrSurfaceProxyView (sk_sp< GrSurfaceProxy > proxy, GrSurfaceOrigin origin, skgpu::Swizzle swizzle)
 
 GrSurfaceProxyView (sk_sp< GrSurfaceProxy > proxy)
 
 GrSurfaceProxyView (GrSurfaceProxyView &&view)=default
 
 GrSurfaceProxyView (const GrSurfaceProxyView &)=default
 
 operator bool () const
 
GrSurfaceProxyViewoperator= (const GrSurfaceProxyView &)=default
 
GrSurfaceProxyViewoperator= (GrSurfaceProxyView &&view)=default
 
bool operator== (const GrSurfaceProxyView &view) const
 
bool operator!= (const GrSurfaceProxyView &other) const
 
int width () const
 
int height () const
 
SkISize dimensions () const
 
skgpu::Mipmapped mipmapped () const
 
GrSurfaceProxyproxy () const
 
sk_sp< GrSurfaceProxyrefProxy () const
 
GrTextureProxyasTextureProxy () const
 
sk_sp< GrTextureProxyasTextureProxyRef () const
 
GrRenderTargetProxyasRenderTargetProxy () const
 
sk_sp< GrRenderTargetProxyasRenderTargetProxyRef () const
 
GrSurfaceOrigin origin () const
 
skgpu::Swizzle swizzle () const
 
void concatSwizzle (skgpu::Swizzle swizzle)
 
GrSurfaceProxyView makeSwizzle (skgpu::Swizzle swizzle) const &
 
GrSurfaceProxyView makeSwizzle (skgpu::Swizzle swizzle) &&
 
void reset ()
 
sk_sp< GrSurfaceProxydetachProxy ()
 

Static Public Member Functions

static GrSurfaceProxyView Copy (GrRecordingContext *context, GrSurfaceProxyView src, skgpu::Mipmapped mipmapped, SkIRect srcRect, SkBackingFit fit, skgpu::Budgeted budgeted, std::string_view label)
 
static GrSurfaceProxyView Copy (GrRecordingContext *rContext, GrSurfaceProxyView src, skgpu::Mipmapped mipmapped, SkBackingFit fit, skgpu::Budgeted budgeted, std::string_view label)
 

Detailed Description

Definition at line 34 of file GrSurfaceProxyView.h.

Member Typedef Documentation

◆ sk_is_trivially_relocatable

Definition at line 103 of file GrSurfaceProxyView.h.

Constructor & Destructor Documentation

◆ GrSurfaceProxyView() [1/5]

GrSurfaceProxyView::GrSurfaceProxyView ( )
default

◆ GrSurfaceProxyView() [2/5]

GrSurfaceProxyView::GrSurfaceProxyView ( sk_sp< GrSurfaceProxy proxy,
GrSurfaceOrigin  origin,
skgpu::Swizzle  swizzle 
)
inline

Definition at line 38 of file GrSurfaceProxyView.h.

39 : fProxy(std::move(proxy)), fOrigin(origin), fSwizzle(swizzle) {}
skgpu::Swizzle swizzle() const
GrSurfaceOrigin origin() const
GrSurfaceProxy * proxy() const

◆ GrSurfaceProxyView() [3/5]

GrSurfaceProxyView::GrSurfaceProxyView ( sk_sp< GrSurfaceProxy proxy)
inlineexplicit

Definition at line 42 of file GrSurfaceProxyView.h.

43 : fProxy(std::move(proxy)), fOrigin(kTopLeft_GrSurfaceOrigin) {}
@ kTopLeft_GrSurfaceOrigin
Definition GrTypes.h:148

◆ GrSurfaceProxyView() [4/5]

GrSurfaceProxyView::GrSurfaceProxyView ( GrSurfaceProxyView &&  view)
default

◆ GrSurfaceProxyView() [5/5]

GrSurfaceProxyView::GrSurfaceProxyView ( const GrSurfaceProxyView )
default

Member Function Documentation

◆ asRenderTargetProxy()

GrRenderTargetProxy * GrSurfaceProxyView::asRenderTargetProxy ( ) const

Definition at line 38 of file GrSurfaceProxyView.cpp.

38 {
39 if (!fProxy) {
40 return nullptr;
41 }
42 return fProxy->asRenderTargetProxy();
43}
virtual GrRenderTargetProxy * asRenderTargetProxy()

◆ asRenderTargetProxyRef()

sk_sp< GrRenderTargetProxy > GrSurfaceProxyView::asRenderTargetProxyRef ( ) const

Definition at line 45 of file GrSurfaceProxyView.cpp.

45 {
46 return sk_ref_sp<GrRenderTargetProxy>(this->asRenderTargetProxy());
47}
GrRenderTargetProxy * asRenderTargetProxy() const

◆ asTextureProxy()

GrTextureProxy * GrSurfaceProxyView::asTextureProxy ( ) const

Definition at line 27 of file GrSurfaceProxyView.cpp.

27 {
28 if (!fProxy) {
29 return nullptr;
30 }
31 return fProxy->asTextureProxy();
32}
virtual GrTextureProxy * asTextureProxy()

◆ asTextureProxyRef()

sk_sp< GrTextureProxy > GrSurfaceProxyView::asTextureProxyRef ( ) const

Definition at line 34 of file GrSurfaceProxyView.cpp.

34 {
35 return sk_ref_sp<GrTextureProxy>(this->asTextureProxy());
36}
GrTextureProxy * asTextureProxy() const

◆ concatSwizzle()

void GrSurfaceProxyView::concatSwizzle ( skgpu::Swizzle  swizzle)

Definition at line 49 of file GrSurfaceProxyView.cpp.

49 {
50 fSwizzle = skgpu::Swizzle::Concat(fSwizzle, swizzle);
51}
static constexpr Swizzle Concat(const Swizzle &a, const Swizzle &b)
Definition Swizzle.h:156

◆ Copy() [1/2]

GrSurfaceProxyView GrSurfaceProxyView::Copy ( GrRecordingContext context,
GrSurfaceProxyView  src,
skgpu::Mipmapped  mipmapped,
SkIRect  srcRect,
SkBackingFit  fit,
skgpu::Budgeted  budgeted,
std::string_view  label 
)
static

Definition at line 63 of file GrSurfaceProxyView.cpp.

69 {
71 context, src.refProxy(), src.origin(), mipmapped, srcRect, fit, budgeted, label);
72 return {std::move(copy), src.origin(), src.swizzle()};
73}
skgpu::Mipmapped mipmapped() const
static sk_sp< GrSurfaceProxy > Copy(GrRecordingContext *, sk_sp< GrSurfaceProxy > src, GrSurfaceOrigin, skgpu::Mipmapped, SkIRect srcRect, SkBackingFit, skgpu::Budgeted, std::string_view label, RectsMustMatch=RectsMustMatch::kNo, sk_sp< GrRenderTask > *outTask=nullptr)
Definition copy.py:1

◆ Copy() [2/2]

GrSurfaceProxyView GrSurfaceProxyView::Copy ( GrRecordingContext rContext,
GrSurfaceProxyView  src,
skgpu::Mipmapped  mipmapped,
SkBackingFit  fit,
skgpu::Budgeted  budgeted,
std::string_view  label 
)
static

Definition at line 75 of file GrSurfaceProxyView.cpp.

80 {
82 rContext, src.refProxy(), src.origin(), mipmapped, fit, budgeted, label);
83 return {std::move(copy), src.origin(), src.swizzle()};
84}

◆ detachProxy()

sk_sp< GrSurfaceProxy > GrSurfaceProxyView::detachProxy ( )
inline

Definition at line 101 of file GrSurfaceProxyView.h.

101{ return std::move(fProxy); }

◆ dimensions()

SkISize GrSurfaceProxyView::dimensions ( ) const
inline

Definition at line 58 of file GrSurfaceProxyView.h.

58{ return this->proxy()->dimensions(); }
SkISize dimensions() const

◆ height()

int GrSurfaceProxyView::height ( ) const
inline

Definition at line 57 of file GrSurfaceProxyView.h.

57{ return this->proxy()->height(); }
int height() const

◆ makeSwizzle() [1/2]

GrSurfaceProxyView GrSurfaceProxyView::makeSwizzle ( skgpu::Swizzle  swizzle) &&

Definition at line 57 of file GrSurfaceProxyView.cpp.

57 {
58 return {std::move(fProxy), fOrigin, skgpu::Swizzle::Concat(fSwizzle, swizzle)};
59}

◆ makeSwizzle() [2/2]

GrSurfaceProxyView GrSurfaceProxyView::makeSwizzle ( skgpu::Swizzle  swizzle) const &

Definition at line 53 of file GrSurfaceProxyView.cpp.

53 {
54 return {fProxy, fOrigin, skgpu::Swizzle::Concat(fSwizzle, swizzle)};
55}

◆ mipmapped()

skgpu::Mipmapped GrSurfaceProxyView::mipmapped ( ) const

Definition at line 20 of file GrSurfaceProxyView.cpp.

20 {
21 if (const GrTextureProxy* proxy = this->asTextureProxy()) {
22 return proxy->mipmapped();
23 }
24 return skgpu::Mipmapped::kNo;
25}

◆ operator bool()

GrSurfaceProxyView::operator bool ( ) const
inlineexplicit

Definition at line 48 of file GrSurfaceProxyView.h.

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

◆ operator!=()

bool GrSurfaceProxyView::operator!= ( const GrSurfaceProxyView other) const
inline

Definition at line 54 of file GrSurfaceProxyView.h.

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

◆ operator=() [1/2]

GrSurfaceProxyView & GrSurfaceProxyView::operator= ( const GrSurfaceProxyView )
default

◆ operator=() [2/2]

GrSurfaceProxyView & GrSurfaceProxyView::operator= ( GrSurfaceProxyView &&  view)
default

◆ operator==()

bool GrSurfaceProxyView::operator== ( const GrSurfaceProxyView view) const

Definition at line 15 of file GrSurfaceProxyView.cpp.

15 {
16 return fProxy->uniqueID() == view.fProxy->uniqueID() && fOrigin == view.fOrigin &&
17 fSwizzle == view.fSwizzle;
18}
UniqueID uniqueID() const

◆ origin()

GrSurfaceOrigin GrSurfaceProxyView::origin ( ) const
inline

Definition at line 71 of file GrSurfaceProxyView.h.

71{ return fOrigin; }

◆ proxy()

GrSurfaceProxy * GrSurfaceProxyView::proxy ( ) const
inline

Definition at line 62 of file GrSurfaceProxyView.h.

62{ return fProxy.get(); }

◆ refProxy()

sk_sp< GrSurfaceProxy > GrSurfaceProxyView::refProxy ( ) const
inline

Definition at line 63 of file GrSurfaceProxyView.h.

63{ return fProxy; }

◆ reset()

void GrSurfaceProxyView::reset ( )

Definition at line 61 of file GrSurfaceProxyView.cpp.

61{ *this = {}; }

◆ swizzle()

skgpu::Swizzle GrSurfaceProxyView::swizzle ( ) const
inline

Definition at line 72 of file GrSurfaceProxyView.h.

72{ return fSwizzle; }

◆ width()

int GrSurfaceProxyView::width ( ) const
inline

Definition at line 56 of file GrSurfaceProxyView.h.

56{ return this->proxy()->width(); }
int width() const

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