Flutter Engine
The Flutter Engine
|
#include "bench/Benchmark.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkStream.h"
#include "include/encode/SkJpegEncoder.h"
#include "include/encode/SkPngEncoder.h"
#include "include/encode/SkWebpEncoder.h"
#include "tools/DecodeUtils.h"
Go to the source code of this file.
Classes | |
class | EncodeBench |
Macros | |
#define | PNG(FLAG, ZLIBLEVEL) |
Functions | |
static bool | encode_jpeg (SkWStream *dst, const SkPixmap &src) |
static bool | encode_webp_lossy (SkWStream *dst, const SkPixmap &src) |
static bool | encode_webp_lossless (SkWStream *dst, const SkPixmap &src) |
static bool | encode_png (SkWStream *dst, const SkPixmap &src, SkPngEncoder::FilterFlag filters, int zlibLevel) |
DEF_BENCH (return new EncodeBench(srcs[0], &encode_jpeg, "JPEG")) | |
DEF_BENCH (return new EncodeBench(srcs[1], &encode_jpeg, "JPEG")) | |
DEF_BENCH (return new EncodeBench(srcs[0], encode_webp_lossy, "WEBP")) | |
DEF_BENCH (return new EncodeBench(srcs[1], encode_webp_lossy, "WEBP")) | |
DEF_BENCH (return new EncodeBench(srcs[0], encode_webp_lossless, "WEBP_LL")) | |
DEF_BENCH (return new EncodeBench(srcs[1], encode_webp_lossless, "WEBP_LL")) | |
DEF_BENCH (return new EncodeBench(srcs[0], PNG(kAll, 6), "PNG")) | |
DEF_BENCH (return new EncodeBench(srcs[0], PNG(kAll, 3), "PNG_3")) | |
DEF_BENCH (return new EncodeBench(srcs[0], PNG(kAll, 1), "PNG_1")) | |
DEF_BENCH (return new EncodeBench(srcs[0], PNG(kSub, 6), "PNG_6s")) | |
DEF_BENCH (return new EncodeBench(srcs[0], PNG(kSub, 3), "PNG_3s")) | |
DEF_BENCH (return new EncodeBench(srcs[0], PNG(kSub, 1), "PNG_1s")) | |
DEF_BENCH (return new EncodeBench(srcs[0], PNG(kNone, 6), "PNG_6n")) | |
DEF_BENCH (return new EncodeBench(srcs[0], PNG(kNone, 3), "PNG_3n")) | |
DEF_BENCH (return new EncodeBench(srcs[0], PNG(kNone, 1), "PNG_1n")) | |
DEF_BENCH (return new EncodeBench(srcs[1], PNG(kAll, 6), "PNG")) | |
DEF_BENCH (return new EncodeBench(srcs[1], PNG(kAll, 3), "PNG_3")) | |
DEF_BENCH (return new EncodeBench(srcs[1], PNG(kAll, 1), "PNG_1")) | |
DEF_BENCH (return new EncodeBench(srcs[1], PNG(kSub, 6), "PNG_6s")) | |
DEF_BENCH (return new EncodeBench(srcs[1], PNG(kSub, 3), "PNG_3s")) | |
DEF_BENCH (return new EncodeBench(srcs[1], PNG(kSub, 1), "PNG_1s")) | |
DEF_BENCH (return new EncodeBench(srcs[1], PNG(kNone, 6), "PNG_6n")) | |
DEF_BENCH (return new EncodeBench(srcs[1], PNG(kNone, 3), "PNG_3n")) | |
DEF_BENCH (return new EncodeBench(srcs[1], PNG(kNone, 1), "PNG_1n")) | |
Variables | |
static const char * | srcs [2] = {"images/mandrill_512.png", "images/color_wheel.jpg"} |
#define PNG | ( | FLAG, | |
ZLIBLEVEL | |||
) |
Definition at line 85 of file EncodeBench.cpp.
DEF_BENCH | ( | return new | EncodeBenchsrcs[0], &encode_jpeg, "JPEG" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[0], encode_webp_lossless, "WEBP_LL" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[0], encode_webp_lossy, "WEBP" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[0], PNG(kAll, 1), "PNG_1" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[0], PNG(kAll, 3), "PNG_3" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[0], PNG(kAll, 6), "PNG" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[0], PNG(kNone, 1), "PNG_1n" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[0], PNG(kNone, 3), "PNG_3n" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[0], PNG(kNone, 6), "PNG_6n" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[0], PNG(kSub, 1), "PNG_1s" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[0], PNG(kSub, 3), "PNG_3s" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[0], PNG(kSub, 6), "PNG_6s" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[1], &encode_jpeg, "JPEG" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[1], encode_webp_lossless, "WEBP_LL" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[1], encode_webp_lossy, "WEBP" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[1], PNG(kAll, 1), "PNG_1" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[1], PNG(kAll, 3), "PNG_3" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[1], PNG(kAll, 6), "PNG" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[1], PNG(kNone, 1), "PNG_1n" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[1], PNG(kNone, 3), "PNG_3n" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[1], PNG(kNone, 6), "PNG_6n" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[1], PNG(kSub, 1), "PNG_1s" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[1], PNG(kSub, 3), "PNG_3s" | ) |
DEF_BENCH | ( | return new | EncodeBenchsrcs[1], PNG(kSub, 6), "PNG_6s" | ) |
Definition at line 55 of file EncodeBench.cpp.
|
static |
Definition at line 75 of file EncodeBench.cpp.
Definition at line 68 of file EncodeBench.cpp.
Definition at line 61 of file EncodeBench.cpp.
|
static |
Definition at line 88 of file EncodeBench.cpp.