23 static std::atomic<int32_t> nextID{1};
27 id = nextID.fetch_add(1, std::memory_order_relaxed);
37 paint.setColor(0xFFFF7088);
65 if (0 == fGenerationID) {
static int32_t next_generation_id()
static void draw_bbox(SkCanvas *canvas, const SkRect &r)
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
void concat(const SkMatrix &matrix)
void notifyDrawingChanged()
uint32_t getGenerationID()
size_t approximateBytesUsed()
virtual SkRect onGetBounds()=0
virtual sk_sp< SkPicture > onMakePictureSnapshot()
sk_sp< SkPicture > makePictureSnapshot()
virtual void onDraw(SkCanvas *)=0
virtual size_t onApproximateBytesUsed()
void draw(SkCanvas *, const SkMatrix *=nullptr)
static SkMatrix Translate(SkScalar dx, SkScalar dy)
@ kStroke_Style
set to stroke geometry
SkCanvas * beginRecording(const SkRect &bounds, sk_sp< SkBBoxHierarchy > bbh)
sk_sp< SkPicture > finishRecordingAsPicture()
unsigned useCenter Optional< SkMatrix > matrix
Optional< SkRect > bounds
constexpr float left() const
constexpr float top() const
constexpr float right() const
constexpr float bottom() const