Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
DrawAtlasCommand Class Reference

#include <DrawCommand.h>

Inheritance diagram for DrawAtlasCommand:
DrawCommand

Public Member Functions

 DrawAtlasCommand (const SkImage *, const SkRSXform[], const SkRect[], const SkColor[], int, SkBlendMode, const SkSamplingOptions &, const SkRect *, const SkPaint *)
 
void execute (SkCanvas *canvas) const override
 
- Public Member Functions inherited from DrawCommand
 DrawCommand (OpType opType)
 
virtual ~DrawCommand ()
 
bool isVisible () const
 
void setVisible (bool toggle)
 
virtual bool render (SkCanvas *canvas) const
 
virtual void toJSON (SkJSONWriter &writer, UrlDataManager &urlDataManager) const
 
OpType getOpType () const
 

Additional Inherited Members

- Public Types inherited from DrawCommand
enum  OpType {
  kBeginDrawPicture_OpType , kClear_OpType , kClipPath_OpType , kClipRegion_OpType ,
  kClipRect_OpType , kClipRRect_OpType , kClipShader_OpType , kResetClip_OpType ,
  kConcat_OpType , kConcat44_OpType , kDrawAnnotation_OpType , kDrawBitmap_OpType ,
  kDrawBitmapRect_OpType , kDrawDRRect_OpType , kDrawImage_OpType , kDrawImageLattice_OpType ,
  kDrawImageRect_OpType , kDrawImageRectLayer_OpType , kDrawOval_OpType , kDrawArc_OpType ,
  kDrawPaint_OpType , kDrawPatch_OpType , kDrawPath_OpType , kDrawPoints_OpType ,
  kDrawRect_OpType , kDrawRRect_OpType , kDrawRegion_OpType , kDrawShadow_OpType ,
  kDrawTextBlob_OpType , kDrawVertices_OpType , kDrawAtlas_OpType , kDrawDrawable_OpType ,
  kDrawEdgeAAQuad_OpType , kDrawEdgeAAImageSet_OpType , kEndDrawPicture_OpType , kRestore_OpType ,
  kSave_OpType , kSaveLayer_OpType , kSetMatrix_OpType , kSetM44_OpType ,
  kLast_OpType = kSetM44_OpType
}
 
- Static Public Member Functions inherited from DrawCommand
static void WritePNG (const SkBitmap &bitmap, SkWStream &out)
 
static const char * GetCommandString (OpType type)
 
static void MakeJsonColor (SkJSONWriter &, const SkColor color)
 
static void MakeJsonColor4f (SkJSONWriter &, const SkColor4f &color)
 
static void MakeJsonPoint (SkJSONWriter &, const SkPoint &point)
 
static void MakeJsonPoint (SkJSONWriter &, SkScalar x, SkScalar y)
 
static void MakeJsonPoint3 (SkJSONWriter &, const SkPoint3 &point)
 
static void MakeJsonRect (SkJSONWriter &, const SkRect &rect)
 
static void MakeJsonIRect (SkJSONWriter &, const SkIRect &)
 
static void MakeJsonMatrix (SkJSONWriter &, const SkMatrix &)
 
static void MakeJsonMatrix44 (SkJSONWriter &, const SkM44 &)
 
static void MakeJsonPath (SkJSONWriter &, const SkPath &path)
 
static void MakeJsonRegion (SkJSONWriter &, const SkRegion &region)
 
static void MakeJsonSampling (SkJSONWriter &, const SkSamplingOptions &sampling)
 
static void MakeJsonPaint (SkJSONWriter &, const SkPaint &paint, UrlDataManager &urlDataManager)
 
static void MakeJsonLattice (SkJSONWriter &, const SkCanvas::Lattice &lattice)
 
static void flatten (const SkFlattenable *flattenable, SkJSONWriter &writer, UrlDataManager &urlDataManager)
 
static bool flatten (const SkImage &image, SkJSONWriter &writer, UrlDataManager &urlDataManager)
 
static bool flatten (const SkBitmap &bitmap, SkJSONWriter &writer, UrlDataManager &urlDataManager)
 
- Static Public Attributes inherited from DrawCommand
static const int kOpTypeCount = kLast_OpType + 1
 

Detailed Description

Definition at line 613 of file DrawCommand.h.

Constructor & Destructor Documentation

◆ DrawAtlasCommand()

DrawAtlasCommand::DrawAtlasCommand ( const SkImage image,
const SkRSXform  xform[],
const SkRect  tex[],
const SkColor  colors[],
int  count,
SkBlendMode  bmode,
const SkSamplingOptions sampling,
const SkRect cull,
const SkPaint paint 
)

Definition at line 1992 of file DrawCommand.cpp.

2001 : INHERITED(kDrawAtlas_OpType)
2002 , fImage(SkRef(image))
2003 , fXform(xform, count)
2004 , fTex(tex, count)
2005 , fColors(colors, colors ? count : 0)
2006 , fBlendMode(bmode)
2007 , fSampling(sampling)
2008 , fCull(cull)
2009 , fPaint(paint) {}
int count
static T * SkRef(T *obj)
Definition SkRefCnt.h:132
const Paint & paint
sk_sp< SkImage > image
Definition examples.cpp:29
SkSamplingOptions sampling
Definition SkRecords.h:337

Member Function Documentation

◆ execute()

void DrawAtlasCommand::execute ( SkCanvas canvas) const
overridevirtual

Implements DrawCommand.

Definition at line 2011 of file DrawCommand.cpp.

2011 {
2012 canvas->drawAtlas(fImage.get(),
2013 fXform.begin(),
2014 fTex.begin(),
2015 fColors.empty() ? nullptr : fColors.begin(),
2016 fXform.size(),
2017 fBlendMode,
2018 fSampling,
2019 fCull.getMaybeNull(),
2020 fPaint.getMaybeNull());
2021}
void drawAtlas(const SkImage *atlas, const SkRSXform xform[], const SkRect tex[], const SkColor colors[], int count, SkBlendMode mode, const SkSamplingOptions &sampling, const SkRect *cullRect, const SkPaint *paint)
bool empty() const
Definition SkTDArray.h:135
T * begin()
Definition SkTDArray.h:150
T * get() const
Definition SkRefCnt.h:303
static const char * begin(const StringSlice &s)
Definition editor.cpp:252
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition switches.h:259

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