Flutter Engine
The Flutter Engine
|
#include "include/core/SkAlphaType.h"
#include "include/core/SkColorSpace.h"
#include "include/core/SkColorType.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkScalar.h"
#include "include/core/SkSize.h"
#include "include/core/SkString.h"
#include "include/core/SkTypes.h"
#include "include/gpu/GpuTypes.h"
#include "include/gpu/GrBackendSurface.h"
#include "include/gpu/GrDirectContext.h"
#include "include/gpu/GrTypes.h"
#include "include/private/gpu/ganesh/GrTypesPriv.h"
#include "src/gpu/SkBackingFit.h"
#include "src/gpu/ganesh/GrCaps.h"
#include "src/gpu/ganesh/GrDirectContextPriv.h"
#include "src/gpu/ganesh/GrImageInfo.h"
#include "src/gpu/ganesh/GrPixmap.h"
#include "src/gpu/ganesh/GrShaderCaps.h"
#include "src/gpu/ganesh/SurfaceContext.h"
#include "tests/CtsEnforcement.h"
#include "tests/Test.h"
#include "tests/TestUtils.h"
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <initializer_list>
#include <memory>
Go to the source code of this file.
Typedefs | |
typedef bool(* | CheckFn) (uint32_t orig, uint32_t actual, float error) |
Functions | |
template<float(*)(float) CONVERT> | |
static bool | check_conversion (uint32_t input, uint32_t output, float error) |
template<float(*)(float) FORWARD, float(*)(float) BACKWARD> | |
static bool | check_double_conversion (uint32_t input, uint32_t output, float error) |
static bool | check_srgb_to_linear_conversion (uint32_t srgb, uint32_t linear, float error) |
static bool | check_linear_to_srgb_conversion (uint32_t linear, uint32_t srgb, float error) |
static bool | check_linear_to_srgb_to_linear_conversion (uint32_t input, uint32_t output, float error) |
static bool | check_srgb_to_linear_to_srgb_conversion (uint32_t input, uint32_t output, float error) |
static bool | check_no_conversion (uint32_t input, uint32_t output, float error) |
void | read_and_check_pixels (skiatest::Reporter *reporter, GrDirectContext *dContext, skgpu::ganesh::SurfaceContext *sc, uint32_t *origData, const SkImageInfo &dstInfo, CheckFn checker, float error, const char *subtestName) |
static sk_sp< SkColorSpace > | encoding_as_color_space (Encoding encoding) |
static const char * | encoding_as_str (Encoding encoding) |
static std::unique_ptr< uint32_t[]> | make_data () |
static std::unique_ptr< skgpu::ganesh::SurfaceContext > | make_surface_context (Encoding contextEncoding, GrRecordingContext *rContext, skiatest::Reporter *reporter) |
static void | test_write_read (Encoding contextEncoding, Encoding writeEncoding, Encoding readEncoding, float error, CheckFn check, GrDirectContext *dContext, skiatest::Reporter *reporter) |
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS (SRGBReadWritePixels, reporter, ctxInfo, CtsEnforcement::kApiLevel_T) | |
Variables | |
static constexpr int | kW = 255 |
static constexpr int | kH = 255 |
typedef bool(* CheckFn) (uint32_t orig, uint32_t actual, float error) |
Definition at line 145 of file SRGBReadWritePixelsTest.cpp.
|
static |
tests a conversion with an error tolerance
Definition at line 65 of file SRGBReadWritePixelsTest.cpp.
|
static |
tests a forward and backward conversion with an error tolerance
Definition at line 91 of file SRGBReadWritePixelsTest.cpp.
|
static |
Definition at line 128 of file SRGBReadWritePixelsTest.cpp.
|
static |
Definition at line 132 of file SRGBReadWritePixelsTest.cpp.
|
static |
Definition at line 140 of file SRGBReadWritePixelsTest.cpp.
|
static |
Definition at line 124 of file SRGBReadWritePixelsTest.cpp.
|
static |
Definition at line 136 of file SRGBReadWritePixelsTest.cpp.
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS | ( | SRGBReadWritePixels | , |
reporter | , | ||
ctxInfo | , | ||
CtsEnforcement::kApiLevel_T | |||
) |
Definition at line 263 of file SRGBReadWritePixelsTest.cpp.
|
static |
Definition at line 186 of file SRGBReadWritePixelsTest.cpp.
|
static |
Definition at line 195 of file SRGBReadWritePixelsTest.cpp.
|
static |
Definition at line 207 of file SRGBReadWritePixelsTest.cpp.
|
static |
Definition at line 217 of file SRGBReadWritePixelsTest.cpp.
void read_and_check_pixels | ( | skiatest::Reporter * | reporter, |
GrDirectContext * | dContext, | ||
skgpu::ganesh::SurfaceContext * | sc, | ||
uint32_t * | origData, | ||
const SkImageInfo & | dstInfo, | ||
CheckFn | checker, | ||
float | error, | ||
const char * | subtestName | ||
) |
Definition at line 147 of file SRGBReadWritePixelsTest.cpp.
|
static |
Definition at line 235 of file SRGBReadWritePixelsTest.cpp.
|
staticconstexpr |
Definition at line 205 of file SRGBReadWritePixelsTest.cpp.
|
staticconstexpr |
Definition at line 204 of file SRGBReadWritePixelsTest.cpp.