Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
GrGeometryProcessor::TextureSampler Class Reference

#include <GrGeometryProcessor.h>

Public Member Functions

 TextureSampler ()=default
 
 TextureSampler (GrSamplerState, const GrBackendFormat &, const skgpu::Swizzle &)
 
 TextureSampler (const TextureSampler &)=delete
 
TextureSampleroperator= (const TextureSampler &)=delete
 
 TextureSampler (TextureSampler &&)=default
 
TextureSampleroperator= (TextureSampler &&)=default
 
void reset (GrSamplerState, const GrBackendFormat &, const skgpu::Swizzle &)
 
const GrBackendFormatbackendFormat () const
 
GrTextureType textureType () const
 
GrSamplerState samplerState () const
 
const skgpu::Swizzleswizzle () const
 
bool isInitialized () const
 

Detailed Description

Used to capture the properties of the GrTextureProxies required/expected by a primitiveProcessor along with an associated GrSamplerState. The actual proxies used are stored in either the fixed or dynamic state arrays. TextureSamplers don't perform any coord manipulation to account for texture origin.

Definition at line 468 of file GrGeometryProcessor.h.

Constructor & Destructor Documentation

◆ TextureSampler() [1/4]

GrGeometryProcessor::TextureSampler::TextureSampler ( )
default

◆ TextureSampler() [2/4]

GrGeometryProcessor::TextureSampler::TextureSampler ( GrSamplerState  samplerState,
const GrBackendFormat backendFormat,
const skgpu::Swizzle swizzle 
)

Definition at line 54 of file GrGeometryProcessor.cpp.

56 {
57 this->reset(samplerState, backendFormat, swizzle);
58}
void reset(GrSamplerState, const GrBackendFormat &, const skgpu::Swizzle &)
const GrBackendFormat & backendFormat() const
const skgpu::Swizzle & swizzle() const

◆ TextureSampler() [3/4]

GrGeometryProcessor::TextureSampler::TextureSampler ( const TextureSampler )
delete

◆ TextureSampler() [4/4]

GrGeometryProcessor::TextureSampler::TextureSampler ( TextureSampler &&  )
default

Member Function Documentation

◆ backendFormat()

const GrBackendFormat & GrGeometryProcessor::TextureSampler::backendFormat ( ) const
inline

Definition at line 482 of file GrGeometryProcessor.h.

482{ return fBackendFormat; }

◆ isInitialized()

bool GrGeometryProcessor::TextureSampler::isInitialized ( ) const
inline

Definition at line 488 of file GrGeometryProcessor.h.

488{ return fIsInitialized; }

◆ operator=() [1/2]

TextureSampler & GrGeometryProcessor::TextureSampler::operator= ( const TextureSampler )
delete

◆ operator=() [2/2]

TextureSampler & GrGeometryProcessor::TextureSampler::operator= ( TextureSampler &&  )
default

◆ reset()

void GrGeometryProcessor::TextureSampler::reset ( GrSamplerState  samplerState,
const GrBackendFormat backendFormat,
const skgpu::Swizzle swizzle 
)

Definition at line 60 of file GrGeometryProcessor.cpp.

62 {
63 fSamplerState = samplerState;
64 fSamplerState = GrSamplerState(samplerState.wrapModeX(),
68 fBackendFormat = backendFormat;
69 fSwizzle = swizzle;
70 fIsInitialized = true;
71}
static GrSamplerState::Filter clamp_filter(GrTextureType type, GrSamplerState::Filter requestedFilter)
GrTextureType textureType() const
constexpr WrapMode wrapModeX() const
constexpr Filter filter() const
constexpr MipmapMode mipmapMode() const
constexpr WrapMode wrapModeY() const

◆ samplerState()

GrSamplerState GrGeometryProcessor::TextureSampler::samplerState ( ) const
inline

Definition at line 485 of file GrGeometryProcessor.h.

485{ return fSamplerState; }

◆ swizzle()

const skgpu::Swizzle & GrGeometryProcessor::TextureSampler::swizzle ( ) const
inline

Definition at line 486 of file GrGeometryProcessor.h.

486{ return fSwizzle; }

◆ textureType()

GrTextureType GrGeometryProcessor::TextureSampler::textureType ( ) const
inline

Definition at line 483 of file GrGeometryProcessor.h.

483{ return fBackendFormat.textureType(); }

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