Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
GrVkBackendRenderTargetData Class Referencefinal
Inheritance diagram for GrVkBackendRenderTargetData:
GrBackendRenderTargetData

Public Member Functions

 GrVkBackendRenderTargetData (const GrVkImageInfo &info, sk_sp< skgpu::MutableTextureState > mutableState=nullptr)
 
const GrVkImageInfoinfo () const
 
sk_sp< skgpu::MutableTextureStategetMutableState () const override
 
void setMutableState (const skgpu::MutableTextureState &state) override
 
skgpu::MutableTextureStatemutableState ()
 
const skgpu::MutableTextureStatemutableState () const
 
- Public Member Functions inherited from GrBackendRenderTargetData
virtual ~GrBackendRenderTargetData ()
 

Private Member Functions

GrBackendFormat getBackendFormat () const override
 
bool isProtected () const override
 
bool equal (const GrBackendRenderTargetData *that) const override
 
void copyTo (AnyRenderTargetData &rtData) const override
 

Additional Inherited Members

- Protected Types inherited from GrBackendRenderTargetData
using AnyRenderTargetData = GrBackendRenderTarget::AnyRenderTargetData
 
- Protected Member Functions inherited from GrBackendRenderTargetData
 GrBackendRenderTargetData ()=default
 
 GrBackendRenderTargetData (const GrBackendRenderTargetData &)=default
 

Detailed Description

Definition at line 324 of file GrVkBackendSurface.cpp.

Constructor & Destructor Documentation

◆ GrVkBackendRenderTargetData()

GrVkBackendRenderTargetData::GrVkBackendRenderTargetData ( const GrVkImageInfo info,
sk_sp< skgpu::MutableTextureState mutableState = nullptr 
)
inline

Definition at line 326 of file GrVkBackendSurface.cpp.

328 : fVkInfo(info) {
329 if (mutableState) {
330 fMutableState = std::move(mutableState);
331 } else {
332 fMutableState =
333 sk_make_sp<skgpu::MutableTextureState>(skgpu::MutableTextureStates::MakeVulkan(
335 }
336 }
const GrVkImageInfo & info() const
skgpu::MutableTextureState * mutableState()
SK_API MutableTextureState MakeVulkan(VkImageLayout layout, uint32_t queueFamilyIndex)
uint32_t fCurrentQueueFamily
Definition GrVkTypes.h:34
VkImageLayout fImageLayout
Definition GrVkTypes.h:29

Member Function Documentation

◆ copyTo()

void GrVkBackendRenderTargetData::copyTo ( AnyRenderTargetData rtData) const
inlineoverrideprivatevirtual

Implements GrBackendRenderTargetData.

Definition at line 376 of file GrVkBackendSurface.cpp.

376 {
377 rtData.emplace<GrVkBackendRenderTargetData>(fVkInfo, fMutableState);
378 }

◆ equal()

bool GrVkBackendRenderTargetData::equal ( const GrBackendRenderTargetData that) const
inlineoverrideprivatevirtual

Implements GrBackendRenderTargetData.

Definition at line 362 of file GrVkBackendSurface.cpp.

362 {
363 SkASSERT(!that || that->type() == GrBackendApi::kVulkan);
364 if (auto otherVk = static_cast<const GrVkBackendRenderTargetData*>(that)) {
365 // For our tests when checking equality we are assuming both objects will be using the
366 // same mutable state object.
367 if (fMutableState != otherVk->fMutableState) {
368 return false;
369 }
370 return GrVkImageInfoWithMutableState(fVkInfo, fMutableState.get()) ==
371 GrVkImageInfoWithMutableState(otherVk->fVkInfo, fMutableState.get());
372 }
373 return false;
374 }
GrVkImageInfo GrVkImageInfoWithMutableState(const GrVkImageInfo &info, const skgpu::MutableTextureState *mutableState)
#define SkASSERT(cond)
Definition SkAssert.h:116
T * get() const
Definition SkRefCnt.h:303

◆ getBackendFormat()

GrBackendFormat GrVkBackendRenderTargetData::getBackendFormat ( ) const
inlineoverrideprivatevirtual

Implements GrBackendRenderTargetData.

Definition at line 351 of file GrVkBackendSurface.cpp.

351 {
352 auto info = GrVkImageInfoWithMutableState(fVkInfo, fMutableState.get());
356 }
358 }
SK_API GrBackendFormat MakeVk(VkFormat format, bool willUseDRMFormatModifiers=false)
GrVkYcbcrConversionInfo fYcbcrConversionInfo
Definition GrVkTypes.h:36
VkFormat fFormat
Definition GrVkTypes.h:30

◆ getMutableState()

sk_sp< skgpu::MutableTextureState > GrVkBackendRenderTargetData::getMutableState ( ) const
inlineoverridevirtual

Reimplemented from GrBackendRenderTargetData.

Definition at line 340 of file GrVkBackendSurface.cpp.

340 {
341 return fMutableState;
342 }

◆ info()

const GrVkImageInfo & GrVkBackendRenderTargetData::info ( ) const
inline

Definition at line 338 of file GrVkBackendSurface.cpp.

338{ return fVkInfo; }

◆ isProtected()

bool GrVkBackendRenderTargetData::isProtected ( ) const
inlineoverrideprivatevirtual

Implements GrBackendRenderTargetData.

Definition at line 360 of file GrVkBackendSurface.cpp.

360{ return fVkInfo.fProtected == skgpu::Protected::kYes; }
skgpu::Protected fProtected
Definition GrVkTypes.h:35

◆ mutableState() [1/2]

skgpu::MutableTextureState * GrVkBackendRenderTargetData::mutableState ( )
inline

Definition at line 347 of file GrVkBackendSurface.cpp.

347{ return fMutableState.get(); }

◆ mutableState() [2/2]

const skgpu::MutableTextureState * GrVkBackendRenderTargetData::mutableState ( ) const
inline

Definition at line 348 of file GrVkBackendSurface.cpp.

348{ return fMutableState.get(); }

◆ setMutableState()

void GrVkBackendRenderTargetData::setMutableState ( const skgpu::MutableTextureState state)
inlineoverridevirtual

Reimplemented from GrBackendRenderTargetData.

Definition at line 343 of file GrVkBackendSurface.cpp.

343 {
344 fMutableState->set(state);
345 }
void set(const MutableTextureState &that)
AtkStateType state

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