Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Bitmap_readyToDraw.cpp
Go to the documentation of this file.
1// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
4// HASH=e89c78ca992e2e789ed50944fe68f920
5REG_FIDDLE(Bitmap_readyToDraw, 256, 160, false, 5) {
6void draw(SkCanvas* canvas) {
7 if (source.readyToDraw()) {
8 canvas->drawImage(source.asImage(), 10, 10);
9 }
10}
11} // END FIDDLE
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
sk_sp< SkImage > asImage() const
Definition SkBitmap.cpp:645
bool readyToDraw() const
Definition SkBitmap.h:758
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
Definition SkCanvas.h:1528
SkBitmap source
Definition examples.cpp:28
#define REG_FIDDLE(NAME, W, H, TEXT, I)
Definition examples.h:60