Flutter Engine
The Flutter Engine
|
#include <SkSLDebugTracePriv.h>
Public Member Functions | |
void | setTraceCoord (const SkIPoint &coord) |
void | setSource (const std::string &source) |
bool | readTrace (SkStream *r) |
void | writeTrace (SkWStream *w) const override |
void | dump (SkWStream *o) const override |
std::string | getSlotComponentSuffix (int slotIndex) const |
std::string | getSlotValue (int slotIndex, int32_t value) const |
double | interpretValueBits (int slotIndex, int32_t valueBits) const |
std::string | slotValueToString (int slotIndex, double value) const |
Public Member Functions inherited from SkRefCntBase | |
SkRefCntBase () | |
virtual | ~SkRefCntBase () |
bool | unique () const |
void | ref () const |
void | unref () const |
Public Attributes | |
SkIPoint | fTraceCoord = {} |
std::vector< SlotDebugInfo > | fUniformInfo |
std::vector< SlotDebugInfo > | fSlotInfo |
std::vector< FunctionDebugInfo > | fFuncInfo |
std::vector< TraceInfo > | fTraceInfo |
std::vector< std::string > | fSource |
std::unique_ptr< SkSL::TraceHook > | fTraceHook |
Definition at line 62 of file SkSLDebugTracePriv.h.
|
overridevirtual |
Generates a human-readable dump of the debug trace.
Implements SkSL::DebugTrace.
Definition at line 103 of file SkSLDebugTracePriv.cpp.
std::string SkSL::DebugTracePriv::getSlotComponentSuffix | ( | int | slotIndex | ) | const |
Returns a slot's component as a variable-name suffix, e.g. ".x" or "[2][2]".
Definition at line 29 of file SkSLDebugTracePriv.cpp.
std::string SkSL::DebugTracePriv::getSlotValue | ( | int | slotIndex, |
int32_t | value | ||
) | const |
Bit-casts a slot's value, then converts to text, e.g. "3.14" or "true" or "12345".
Definition at line 86 of file SkSLDebugTracePriv.cpp.
double SkSL::DebugTracePriv::interpretValueBits | ( | int | slotIndex, |
int32_t | valueBits | ||
) | const |
Bit-casts a value for a given slot into a double, honoring the slot's NumberKind.
Definition at line 49 of file SkSLDebugTracePriv.cpp.
bool SkSL::DebugTracePriv::readTrace | ( | SkStream * | r | ) |
Serializes a debug trace to JSON which can be parsed by our debugger.
Definition at line 270 of file SkSLDebugTracePriv.cpp.
void SkSL::DebugTracePriv::setSource | ( | const std::string & | source | ) |
Attaches the SkSL source to be debugged.
Definition at line 94 of file SkSLDebugTracePriv.cpp.
void SkSL::DebugTracePriv::setTraceCoord | ( | const SkIPoint & | coord | ) |
Sets the device-coordinate pixel to trace. If it's not set, the point at (0, 0) will be used.
Definition at line 90 of file SkSLDebugTracePriv.cpp.
std::string SkSL::DebugTracePriv::slotValueToString | ( | int | slotIndex, |
double | value | ||
) | const |
Converts a numeric value into text, based on the slot's NumberKind.
Definition at line 71 of file SkSLDebugTracePriv.cpp.
|
overridevirtual |
Serializes a debug trace to JSON which can be parsed by our debugger.
Implements SkSL::DebugTrace.
Definition at line 202 of file SkSLDebugTracePriv.cpp.
std::vector<FunctionDebugInfo> SkSL::DebugTracePriv::fFuncInfo |
Definition at line 99 of file SkSLDebugTracePriv.h.
std::vector<SlotDebugInfo> SkSL::DebugTracePriv::fSlotInfo |
A 1:1 mapping of slot numbers to debug information.
Definition at line 98 of file SkSLDebugTracePriv.h.
std::vector<std::string> SkSL::DebugTracePriv::fSource |
The SkSL code, split line-by-line.
Definition at line 105 of file SkSLDebugTracePriv.h.
SkIPoint SkSL::DebugTracePriv::fTraceCoord = {} |
The device-coordinate pixel to trace (controlled by setTraceCoord)
Definition at line 92 of file SkSLDebugTracePriv.h.
std::unique_ptr<SkSL::TraceHook> SkSL::DebugTracePriv::fTraceHook |
A trace hook which populates fTraceInfo during shader evaluation. This will be created automatically during code generation.
Definition at line 111 of file SkSLDebugTracePriv.h.
std::vector<TraceInfo> SkSL::DebugTracePriv::fTraceInfo |
The SkSL debug trace.
Definition at line 102 of file SkSLDebugTracePriv.h.
std::vector<SlotDebugInfo> SkSL::DebugTracePriv::fUniformInfo |
SkRP stores uniform slot info in fUniformInfo. (In SkVM, they were mixed into fSlotInfo.)
Definition at line 95 of file SkSLDebugTracePriv.h.