Flutter Engine
The Flutter Engine
third_party
skia
tools
testrunners
gm
vias
Draw.h
Go to the documentation of this file.
1
/*
2
* Copyright 2023 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
#ifndef Draw_DEFINED
9
#define Draw_DEFINED
10
11
#include "
gm/gm.h
"
12
#include "
include/core/SkBitmap.h
"
13
#include "
include/core/SkSurface.h
"
14
15
#include <string>
16
17
// Holds the result of the draw() function.
18
struct
GMOutput
{
19
skiagm::GM::DrawResult
result
;
20
std::string
msg
;
21
SkBitmap
bitmap
;
22
23
GMOutput
(
skiagm::GM::DrawResult
result
=
skiagm::DrawResult::kFail
,
24
std::string
msg
=
""
,
25
SkBitmap
bitmap
=
SkBitmap
())
26
:
result
(
result
),
msg
(
msg
),
bitmap
(
bitmap
) {}
27
};
28
29
// Draws a GM on a surface.
30
//
31
// To make the Bazel build more modular, multiple implementations of this function exist. Each
32
// implementation lives in a separate .cpp files that is conditionally included based on the
33
// //gm/vias:via Bazel config flag.
34
GMOutput
draw
(
skiagm::GM
* gm,
SkSurface
*
surface
, std::string via);
35
36
#endif
// Draw_DEFINED
draw
GMOutput draw(skiagm::GM *gm, SkSurface *surface, std::string via)
Definition:
SimpleVias.cpp:182
SkBitmap.h
SkSurface.h
SkBitmap
Definition:
SkBitmap.h:59
SkSurface
Definition:
SkSurface.h:161
skiagm::GM
Definition:
gm.h:110
surface
VkSurfaceKHR surface
Definition:
main.cc:49
gm.h
bitmap
Definition:
bitmap.py:1
skiagm::DrawResult
DrawResult
Definition:
gm.h:104
skiagm::DrawResult::kFail
@ kFail
GMOutput
Definition:
Draw.h:18
GMOutput::GMOutput
GMOutput(skiagm::GM::DrawResult result=skiagm::DrawResult::kFail, std::string msg="", SkBitmap bitmap=SkBitmap())
Definition:
Draw.h:23
GMOutput::msg
std::string msg
Definition:
Draw.h:20
GMOutput::bitmap
SkBitmap bitmap
Definition:
Draw.h:21
GMOutput::result
skiagm::GM::DrawResult result
Definition:
Draw.h:19
Generated on Sun Jun 23 2024 21:56:51 for Flutter Engine by
1.9.4