Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Namespaces | Classes | Functions
skia Namespace Reference

Namespaces

namespace  textlayout
 

Classes

class  AutoTArray_SynthProvider
 
class  sk_sp_SynthProvider
 
class  SkSpan_SynthProvider
 
class  SkTArray_SynthProvider
 

Functions

 SkString_SummaryProvider (valobj, dict)
 

Function Documentation

◆ SkString_SummaryProvider()

skia.SkString_SummaryProvider (   valobj,
  dict 
)

Definition at line 20 of file skia.py.

20def SkString_SummaryProvider(valobj, dict):
21 fRec = valobj.GetChildMemberWithName('fRec')
22 # The fPtr inside fRec is automatically consumed by sk_sp_SynthProvider.
23 fLength = fRec.GetChildMemberWithName('fLength')
24 if fLength.GetValueAsUnsigned(0) <= 0:
25 return '""'
26 fBeginningOfData = fRec.GetChildMemberWithName('fBeginningOfData')
27
28 # Fetch string contents into an SBData.
29 string = fBeginningOfData.AddressOf().GetPointeeData(0, fLength.GetValueAsUnsigned(0))
30 # Zero terminate the SBData. (This actually adds four zero bytes, but that's harmless.)
31 string.Append(lldb.SBData.CreateDataFromInt(0))
32 # Convert our SBData into a string.
33 error = lldb.SBError()
34 string = string.GetString(error, 0)
35 if error.Fail():
36 return '<error: ' + error.GetCString() + '>'
37 else:
38 return '"' + string + '"'
39
40