Flutter Engine
The Flutter Engine
third_party
skia
gm
make_raster_image.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2018 Google Inc.
3
*
4
* Use of this source code is governed by a BSD-style license that can be
5
* found in the LICENSE file.
6
*/
7
8
#include "
gm/gm.h
"
9
#include "
include/core/SkCanvas.h
"
10
#include "
include/core/SkImage.h
"
11
#include "
include/core/SkRefCnt.h
"
12
#include "
tools/DecodeUtils.h
"
13
#include "
tools/Resources.h
"
14
15
DEF_SIMPLE_GM
(makeRasterImage, canvas, 128,128) {
16
if
(
auto
img =
ToolUtils::GetResourceAsImage
(
"images/color_wheel.png"
)) {
17
canvas->drawImage(img->makeRasterImage(), 0,0);
18
}
19
}
DecodeUtils.h
Resources.h
SkCanvas.h
SkImage.h
SkRefCnt.h
gm.h
DEF_SIMPLE_GM
DEF_SIMPLE_GM(makeRasterImage, canvas, 128, 128)
Definition:
make_raster_image.cpp:15
ToolUtils::GetResourceAsImage
sk_sp< SkImage > GetResourceAsImage(const char *resource)
Definition:
DecodeUtils.h:25
Generated on Sun Jun 23 2024 21:56:00 for Flutter Engine by
1.9.4