Flutter Engine
The Flutter Engine
Functions
make_raster_image.cpp File Reference
#include "gm/gm.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkImage.h"
#include "include/core/SkRefCnt.h"
#include "tools/DecodeUtils.h"
#include "tools/Resources.h"

Go to the source code of this file.

Functions

 DEF_SIMPLE_GM (makeRasterImage, canvas, 128, 128)
 

Function Documentation

◆ DEF_SIMPLE_GM()

DEF_SIMPLE_GM ( makeRasterImage  ,
canvas  ,
128  ,
128   
)

Definition at line 15 of file make_raster_image.cpp.

15 {
16 if (auto img = ToolUtils::GetResourceAsImage("images/color_wheel.png")) {
17 canvas->drawImage(img->makeRasterImage(), 0,0);
18 }
19}
sk_sp< SkImage > GetResourceAsImage(const char *resource)
Definition: DecodeUtils.h:25