Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
bench
CodecBench.h
Go to the documentation of this file.
1
/*
2
* Copyright 2015 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 CodecBench_DEFINED
9
#define CodecBench_DEFINED
10
11
#include "
bench/Benchmark.h
"
12
#include "
include/core/SkData.h
"
13
#include "
include/core/SkImageInfo.h
"
14
#include "
include/core/SkRefCnt.h
"
15
#include "
include/core/SkString.h
"
16
#include "
src/base/SkAutoMalloc.h
"
17
18
/**
19
* Time SkCodec.
20
*/
21
class
CodecBench
:
public
Benchmark
{
22
public
:
23
// Calls encoded->ref()
24
CodecBench
(
SkString
basename,
SkData
* encoded,
SkColorType
colorType
,
SkAlphaType
alphaType);
25
26
protected
:
27
const
char
*
onGetName
()
override
;
28
bool
isSuitableFor
(
Backend
backend
)
override
;
29
void
onDraw
(
int
n,
SkCanvas
* canvas)
override
;
30
void
onDelayedSetup
()
override
;
31
32
private
:
33
SkString
fName;
34
const
SkColorType
fColorType;
35
const
SkAlphaType
fAlphaType;
36
sk_sp<SkData>
fData;
37
SkImageInfo
fInfo;
// Set in onDelayedSetup.
38
SkAutoMalloc
fPixelStorage;
39
using
INHERITED
=
Benchmark
;
40
};
41
#endif
// CodecBench_DEFINED
Benchmark.h
backend
const char * backend
Definition
CommonFlagsConfig.cpp:42
SkAlphaType
SkAlphaType
Definition
SkAlphaType.h:26
SkAutoMalloc.h
SkColorType
SkColorType
Definition
SkColorType.h:19
SkData.h
colorType
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
Definition
SkImageGeneratorNDK.cpp:53
SkImageInfo.h
SkRefCnt.h
SkString.h
Benchmark
Definition
Benchmark.h:36
Benchmark::Backend
Backend
Definition
Benchmark.h:44
Benchmark::Benchmark
Benchmark()
Definition
Benchmark.cpp:16
CodecBench
Definition
CodecBench.h:21
CodecBench::isSuitableFor
bool isSuitableFor(Backend backend) override
Definition
CodecBench.cpp:36
CodecBench::onDelayedSetup
void onDelayedSetup() override
Definition
CodecBench.cpp:40
CodecBench::onGetName
const char * onGetName() override
Definition
CodecBench.cpp:32
CodecBench::onDraw
void onDraw(int n, SkCanvas *canvas) override
Definition
CodecBench.cpp:50
SkAutoMalloc
Definition
SkAutoMalloc.h:25
SkCanvas
Definition
SkCanvas.h:106
SkData
Definition
SkData.h:25
SkString
Definition
SkString.h:118
sk_sp
Definition
SkRefCnt.h:220
SkImageInfo
Definition
SkImageInfo.h:208
Generated on Fri Apr 26 2024 06:15:24 for Flutter Engine by
1.9.8