Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
flavor.api.SkiaFlavorApi Class Reference
Inheritance diagram for flavor.api.SkiaFlavorApi:

Public Member Functions

def get_flavor (self, vars_api, app_name)
 
def setup (self, app_name)
 
def step (self, name, cmd, **kwargs)
 
def device_path_join (self, *args)
 
def copy_directory_contents_to_device (self, host_dir, device_dir)
 
def copy_directory_contents_to_host (self, device_dir, host_dir)
 
def copy_file_to_device (self, host_path, device_path)
 
def create_clean_host_dir (self, path)
 
def create_clean_device_dir (self, path)
 
def read_file_on_device (self, path, **kwargs)
 
def remove_file_on_device (self, path)
 
def install (self, skps=False, images=False, lotties=False, svgs=False, resources=False, texttraces=False)
 
def cleanup_steps (self)
 

Public Attributes

 device_dirs
 
 host_dirs
 

Detailed Description

Definition at line 54 of file api.py.

Member Function Documentation

◆ cleanup_steps()

def flavor.api.SkiaFlavorApi.cleanup_steps (   self)

Definition at line 122 of file api.py.

122 def cleanup_steps(self):
123 return self._f.cleanup_steps()
124

◆ copy_directory_contents_to_device()

def flavor.api.SkiaFlavorApi.copy_directory_contents_to_device (   self,
  host_dir,
  device_dir 
)

Definition at line 80 of file api.py.

80 def copy_directory_contents_to_device(self, host_dir, device_dir):
81 return self._f.copy_directory_contents_to_device(host_dir, device_dir)
82

◆ copy_directory_contents_to_host()

def flavor.api.SkiaFlavorApi.copy_directory_contents_to_host (   self,
  device_dir,
  host_dir 
)

Definition at line 83 of file api.py.

83 def copy_directory_contents_to_host(self, device_dir, host_dir):
84 return self._f.copy_directory_contents_to_host(device_dir, host_dir)
85

◆ copy_file_to_device()

def flavor.api.SkiaFlavorApi.copy_file_to_device (   self,
  host_path,
  device_path 
)

Definition at line 86 of file api.py.

86 def copy_file_to_device(self, host_path, device_path):
87 return self._f.copy_file_to_device(host_path, device_path)
88

◆ create_clean_device_dir()

def flavor.api.SkiaFlavorApi.create_clean_device_dir (   self,
  path 
)

Definition at line 92 of file api.py.

92 def create_clean_device_dir(self, path):
93 return self._f.create_clean_device_dir(path)
94

◆ create_clean_host_dir()

def flavor.api.SkiaFlavorApi.create_clean_host_dir (   self,
  path 
)

Definition at line 89 of file api.py.

89 def create_clean_host_dir(self, path):
90 return self._f.create_clean_host_dir(path)
91

◆ device_path_join()

def flavor.api.SkiaFlavorApi.device_path_join (   self,
args 
)

Definition at line 77 of file api.py.

77 def device_path_join(self, *args):
78 return self._f.device_path_join(*args)
79

◆ get_flavor()

def flavor.api.SkiaFlavorApi.get_flavor (   self,
  vars_api,
  app_name 
)
Return a flavor utils object specific to the given builder.

Definition at line 55 of file api.py.

55 def get_flavor(self, vars_api, app_name):
56 """Return a flavor utils object specific to the given builder."""
57 if is_chromebook(vars_api):
58 return chromebook.ChromebookFlavor(self, app_name)
59 if is_android(vars_api):
60 return android.AndroidFlavor(self, app_name)
61 elif is_ios(vars_api):
62 return ios.iOSFlavor(self, app_name)
63 elif is_valgrind(vars_api):
64 return valgrind.ValgrindFlavor(self, app_name)
65 else:
66 return default.DefaultFlavor(self, app_name)
67
def is_ios(vars_api)
Definition: api.py:46
def is_valgrind(vars_api)
Definition: api.py:50
def is_android(vars_api)
Definition: api.py:38
def is_chromebook(vars_api)
Definition: api.py:42

◆ install()

def flavor.api.SkiaFlavorApi.install (   self,
  skps = False,
  images = False,
  lotties = False,
  svgs = False,
  resources = False,
  texttraces = False 
)

Definition at line 101 of file api.py.

102 resources=False, texttraces=False):
103 self._f.install()
104
105 if texttraces:
106 self._copy_texttraces()
107 # TODO(borenet): Only copy files which have changed.
108 if resources:
109 self.copy_directory_contents_to_device(
110 self.m.path.start_dir.join('skia', 'resources'),
111 self.device_dirs.resource_dir)
112
113 if skps:
114 self._copy_skps()
115 if images:
116 self._copy_images()
117 if lotties:
118 self._copy_lotties()
119 if svgs:
120 self._copy_svgs()
121
static bool install(SkBitmap *bm, const SkImageInfo &info, const SkRasterHandleAllocator::Rec &rec)
Definition: SkCanvas.cpp:2856

◆ read_file_on_device()

def flavor.api.SkiaFlavorApi.read_file_on_device (   self,
  path,
**  kwargs 
)

Definition at line 95 of file api.py.

95 def read_file_on_device(self, path, **kwargs):
96 return self._f.read_file_on_device(path, **kwargs)
97

◆ remove_file_on_device()

def flavor.api.SkiaFlavorApi.remove_file_on_device (   self,
  path 
)

Definition at line 98 of file api.py.

98 def remove_file_on_device(self, path):
99 return self._f.remove_file_on_device(path)
100

◆ setup()

def flavor.api.SkiaFlavorApi.setup (   self,
  app_name 
)

Definition at line 68 of file api.py.

68 def setup(self, app_name):
69 self._f = self.get_flavor(self.m.vars, app_name)
70 self.device_dirs = self._f.device_dirs
71 self.host_dirs = self._f.host_dirs
72 self._skia_dir = self.m.path.start_dir.join('skia')
73
static void setup(SkCanvas *canvas, SkPaint *paint, const SkBitmap &bm, SkFilterMode fm, SkTileMode tmx, SkTileMode tmy)
Definition: tilemodes.cpp:52

◆ step()

def flavor.api.SkiaFlavorApi.step (   self,
  name,
  cmd,
**  kwargs 
)

Definition at line 74 of file api.py.

74 def step(self, name, cmd, **kwargs):
75 return self._f.step(name, cmd, **kwargs)
76
static int step(int x, SkScalar min, SkScalar max)
Definition: BlurTest.cpp:215

Member Data Documentation

◆ device_dirs

flavor.api.SkiaFlavorApi.device_dirs

Definition at line 70 of file api.py.

◆ host_dirs

flavor.api.SkiaFlavorApi.host_dirs

Definition at line 71 of file api.py.


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