GrContext

Coroutines are contexts that hold local data.

final
class GrContext {}

Constructors

this
this(GrEngine engine_)

Default ctor.

Members

Aliases

setBool
alias setBool = setValue!GrBool
Undocumented in source.
setFloat
alias setFloat = setValue!GrFloat
Undocumented in source.
setInt
alias setInt = setValue!GrInt
Undocumented in source.
setPtr
alias setPtr = setValue!GrPtr
Undocumented in source.
setString
alias setString = setValue!GrString
Undocumented in source.

Functions

block
void block(GrBlocker blocker_)

Lock the context until the blocker is cleared

doubleCallStackSize
void doubleCallStackSize()

Double the current callstack size.

doubleFloatLocalsStackSize
void doubleFloatLocalsStackSize(uint localsStackSize)

Double the current float locals stacks' size.

doubleIntLocalsStackSize
void doubleIntLocalsStackSize(uint localsStackSize)

Double the current integer locals stacks' size.

doubleObjectLocalsStackSize
void doubleObjectLocalsStackSize(uint localsStackSize)

Double the current object locals stacks' size.

doubleStringLocalsStackSize
void doubleStringLocalsStackSize(uint localsStackSize)

Double the current string locals stacks' size.

dump
string dump()

Dump stacks info

popState
void popState()

Remove last state of the context

pushState
void pushState()

Register the current state of the context

restoreState
void restoreState()

Restore the last state of the context

setArray
void setArray(GrArray!T value)
Undocumented in source. Be warned that the author may not have intended to support it.
setEnum
void setEnum(T value)
Undocumented in source. Be warned that the author may not have intended to support it.
setFloat32
void setFloat32(float value)
Undocumented in source. Be warned that the author may not have intended to support it.
setFloat64
void setFloat64(double value)
Undocumented in source. Be warned that the author may not have intended to support it.
setFloatArray
void setFloatArray(GrFloatArray value)
Undocumented in source. Be warned that the author may not have intended to support it.
setFloatChannel
void setFloatChannel(GrFloatChannel value)
Undocumented in source. Be warned that the author may not have intended to support it.
setForeign
void setForeign(T value)
Undocumented in source. Be warned that the author may not have intended to support it.
setInt32
void setInt32(int value)
Undocumented in source. Be warned that the author may not have intended to support it.
setInt64
void setInt64(long value)
Undocumented in source. Be warned that the author may not have intended to support it.
setIntArray
void setIntArray(GrIntArray value)
Undocumented in source. Be warned that the author may not have intended to support it.
setIntChannel
void setIntChannel(GrIntChannel value)
Undocumented in source. Be warned that the author may not have intended to support it.
setObject
void setObject(GrObject value)
Undocumented in source. Be warned that the author may not have intended to support it.
setObjectArray
void setObjectArray(GrObjectArray value)
Undocumented in source. Be warned that the author may not have intended to support it.
setObjectChannel
void setObjectChannel(GrObjectChannel value)
Undocumented in source. Be warned that the author may not have intended to support it.
setStringArray
void setStringArray(GrStringArray value)
Undocumented in source. Be warned that the author may not have intended to support it.
setStringChannel
void setStringChannel(GrStringChannel value)
Undocumented in source. Be warned that the author may not have intended to support it.
setupCallStack
void setupCallStack(uint size)

Initialize the call stacks.

setupLocals
void setupLocals(uint isize, uint fsize, uint ssize, uint osize)

Initialize the local variable stacks.

setupStack
void setupStack(uint size)

Initialize the expression stacks.

unblock
void unblock()

Unlock the context from the blocker

Variables

blocker
GrBlocker blocker;

The context will block until the blocker is cleared.

callStack
GrStackFrame[] callStack;

Callstack

callStackLimit
uint callStackLimit;

Current callstack max depth.

engine
GrEngine engine;

Parent engine where the context is running.

flocals
GrFloat[] flocals;

Local variables

flocalsLimit
uint flocalsLimit;

Current max local variable available.

flocalsPos
uint flocalsPos;

Local variables: Access with Xlocals[XlocalsPos + variableIndex]

fstack
GrFloat[] fstack;

Expression stack.

fstackPos
int fstackPos;

Current expression stack top +//// Ditt

ilocals
GrInt[] ilocals;

Local variables

ilocalsLimit
uint ilocalsLimit;

Current max local variable available.

ilocalsPos
uint ilocalsPos;

Local variables: Access with Xlocals[XlocalsPos + variableIndex]

isEvaluatingChannel
bool isEvaluatingChannel;

Set when the context is in a select/case statement. Then, the context is not stopped by a blocking channel.

isKilled
bool isKilled;

Kill state, unwind the call stack and call all registered deferred statements.

isLocked
bool isLocked;

Set when the context is forced to yield by a blocking channel. Release only when the channel is ready.

isPanicking
bool isPanicking;

An exception has been raised an is not caught.

istack
GrInt[] istack;

Expression stack.

istackPos
int istackPos;

Current expression stack top +//// Ditt

olocals
GrPtr[] olocals;

Local variables

olocalsLimit
uint olocalsLimit;

Current max local variable available.

olocalsPos
uint olocalsPos;

Local variables: Access with Xlocals[XlocalsPos + variableIndex]

ostack
GrPtr[] ostack;

Expression stack.

ostackPos
int ostackPos;

Current expression stack top

pc
uint pc;

Operation pointer.

selectPositionJump
uint selectPositionJump;

When evaluating, a blocking jump to this position will occur instead of blocking.

slocals
GrString[] slocals;

Local variables

slocalsLimit
uint slocalsLimit;

Current max local variable available.

slocalsPos
uint slocalsPos;

Local variables: Access with Xlocals[XlocalsPos + variableIndex]

sstack
GrString[] sstack;

Expression stack.

sstackPos
int sstackPos;

Current expression stack top +//// Ditt

stackPos
uint stackPos;

Stack frame pointer for the current function. Each function takes 2 integer: the return pc, and the local variable size.

states
GrContextState[] states;

Backup to restore stack state after select evaluation.

Meta