Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
GrRecordingContext::OwnedArenas Class Reference

#include <GrRecordingContext.h>

Public Member Functions

 OwnedArenas (bool ddlRecording)
 
 ~OwnedArenas ()
 
Arenas get ()
 
OwnedArenasoperator= (OwnedArenas &&)
 

Detailed Description

Definition at line 131 of file GrRecordingContext.h.

Constructor & Destructor Documentation

◆ OwnedArenas()

GrRecordingContext::OwnedArenas::OwnedArenas ( bool  ddlRecording)

Definition at line 114 of file GrRecordingContext.cpp.

114: fDDLRecording(ddlRecording) {}

◆ ~OwnedArenas()

GrRecordingContext::OwnedArenas::~OwnedArenas ( )

Definition at line 115 of file GrRecordingContext.cpp.

115{}

Member Function Documentation

◆ get()

GrRecordingContext::Arenas GrRecordingContext::OwnedArenas::get ( )

Definition at line 124 of file GrRecordingContext.cpp.

124 {
125 if (!fRecordTimeAllocator && fDDLRecording) {
126 // TODO: empirically determine a better number for SkArenaAlloc's firstHeapAllocation param
127 fRecordTimeAllocator = std::make_unique<SkArenaAlloc>(1024);
128 }
129
130 if (!fRecordTimeSubRunAllocator) {
131 fRecordTimeSubRunAllocator = std::make_unique<sktext::gpu::SubRunAllocator>();
132 }
133
134 return {fRecordTimeAllocator.get(), fRecordTimeSubRunAllocator.get()};
135}

◆ operator=()

GrRecordingContext::OwnedArenas & GrRecordingContext::OwnedArenas::operator= ( OwnedArenas &&  a)

Definition at line 117 of file GrRecordingContext.cpp.

117 {
118 fDDLRecording = a.fDDLRecording;
119 fRecordTimeAllocator = std::move(a.fRecordTimeAllocator);
120 fRecordTimeSubRunAllocator = std::move(a.fRecordTimeSubRunAllocator);
121 return *this;
122}
struct MyStruct a[10]

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