Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
grayscalejpg.cpp File Reference
#include "gm/gm.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkImage.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkTypes.h"
#include "tools/DecodeUtils.h"
#include "tools/Resources.h"

Go to the source code of this file.

Functions

 DEF_SIMPLE_GM (grayscalejpg, canvas, 128, 128)
 

Function Documentation

◆ DEF_SIMPLE_GM()

DEF_SIMPLE_GM ( grayscalejpg  ,
canvas  ,
128  ,
128   
)

Definition at line 20 of file grayscalejpg.cpp.

20 {
21 const char kResource[] = "images/grayscale.jpg";
23 if (image) {
24 canvas->drawImage(image, 0.0f, 0.0f);
25 } else {
26 SkDebugf("\nCould not decode file '%s'. Did you forget"
27 " to set the resourcePath?\n", kResource);
28 }
29}
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
sk_sp< SkImage > image
Definition examples.cpp:29
sk_sp< SkImage > GetResourceAsImage(const char *resource)
Definition DecodeUtils.h:25