#include <dl_test_surface_provider.h>
Public Member Functions | |
| virtual | ~DlSurfaceInstance ()=default |
| virtual void | Clear (const DlColor &color)=0 |
| Clear the entire surface to the indicated color. | |
| virtual DlCanvas * | GetCanvas ()=0 |
| virtual void | RenderDisplayList (const sk_sp< DisplayList > &display_list)=0 |
| virtual void | FlushSubmitCpuSync ()=0 |
| virtual std::unique_ptr< DlPixelData > | SnapshotToPixelData () const =0 |
| virtual sk_sp< DlImage > | SnapshotToImage () const =0 |
| virtual bool | SnapshotToFile (std::string &filename) const =0 |
| Store a snapshot of this Surface to the file indicated by the filename. | |
| DlISize | GetSize () const |
| The size of the underlying surface. | |
| virtual int | width () const =0 |
| The width of the underlying surface. | |
| virtual int | height () const =0 |
| The height of the underlying surface. | |
| virtual sk_sp< SkSurface > | sk_surface () |
Definition at line 31 of file dl_test_surface_provider.h.
|
virtualdefault |
|
pure virtual |
Clear the entire surface to the indicated color.
Implemented in flutter::testing::DlSurfaceInstanceImpeller, and flutter::testing::DlSurfaceInstanceSkiaBase.
|
pure virtual |
Ensure that all outstanding calls executed on the DlCanvas instance are rendered to the surface.
Implemented in flutter::testing::DlSurfaceInstanceImpeller, and flutter::testing::DlSurfaceInstanceSkiaBase.
|
pure virtual |
Return a DlCanvas instance that renders to this surface. Note that actual execution of the rendering calls are not guaranteed until the FlushSubmitCpuSync method is called. The DlCanvas will also be reset by the operations of the sync method so transform and clip state will not be carried over to subsequent calls.
Rendering to this canvas does not necessarily render the commands immediately in all backends, some backends accumulate the commands into a DisplayList and only flush that DisplayList when the FlushSubmitCpuSync is called. Tests should strongly prefer using RenderDisplayList instead of multiple calls on this canvas object.
Implemented in flutter::testing::DlSurfaceInstanceImpeller, and flutter::testing::DlSurfaceInstanceSkiaBase.
|
inline |
The size of the underlying surface.
Definition at line 76 of file dl_test_surface_provider.h.
|
pure virtual |
The height of the underlying surface.
Implemented in flutter::testing::DlSurfaceInstanceImpeller, and flutter::testing::DlSurfaceInstanceSkiaBase.
Referenced by GetSize().
|
pure virtual |
Render the indicated DisplayList to the surface. Note that the commands may be enqueued by this call and will be rendered at some time in the future, but the caller must call FlushSubmitCpuSync to be sure they are done being rendered.
In some cases this may be faster than using: GetCanvas().DrawDisplayList(display_list);
Implemented in flutter::testing::DlSurfaceInstanceImpeller, and flutter::testing::DlSurfaceInstanceSkiaBase.
|
inlinevirtual |
Return a pointer to an underlying SkSurface if the image instance has one. THIS METHOD IS DEPRECATED AND ONLY USED IN DL_RENDERING_UNITTESTS.
Reimplemented in flutter::testing::DlSurfaceInstanceSkiaBase.
Definition at line 87 of file dl_test_surface_provider.h.
|
pure virtual |
Store a snapshot of this Surface to the file indicated by the filename.
Implemented in flutter::testing::DlSurfaceInstanceImpeller, and flutter::testing::DlSurfaceInstanceSkiaBase.
|
pure virtual |
Return the current contents of the surface as a DlImage compatible with the DlCanvas that it provides.
Implemented in flutter::testing::DlSurfaceInstanceImpeller, and flutter::testing::DlSurfaceInstanceSkiaBase.
|
pure virtual |
Read back the current contents of the surface and return it as a DlPixelData structure.
Implemented in flutter::testing::DlSurfaceInstanceImpeller, and flutter::testing::DlSurfaceInstanceSkiaBase.
|
pure virtual |
The width of the underlying surface.
Implemented in flutter::testing::DlSurfaceInstanceImpeller, and flutter::testing::DlSurfaceInstanceSkiaBase.
Referenced by GetSize().