Flutter Engine
The Flutter Engine
|
#include "include/core/SkAlphaType.h"
#include "include/core/SkBlendMode.h"
#include "include/core/SkBlender.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkCapabilities.h"
#include "include/core/SkColor.h"
#include "include/core/SkColorFilter.h"
#include "include/core/SkColorType.h"
#include "include/core/SkData.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPixmap.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkScalar.h"
#include "include/core/SkShader.h"
#include "include/core/SkSize.h"
#include "include/core/SkSpan.h"
#include "include/core/SkStream.h"
#include "include/core/SkString.h"
#include "include/core/SkSurface.h"
#include "include/core/SkTypes.h"
#include "include/effects/SkBlenders.h"
#include "include/effects/SkGradientShader.h"
#include "include/effects/SkRuntimeEffect.h"
#include "include/gpu/GpuTypes.h"
#include "include/gpu/GrDirectContext.h"
#include "include/gpu/ganesh/SkSurfaceGanesh.h"
#include "include/private/SkColorData.h"
#include "include/private/SkSLSampleUsage.h"
#include "include/private/base/SkTArray.h"
#include "include/sksl/SkSLDebugTrace.h"
#include "include/sksl/SkSLVersion.h"
#include "src/base/SkStringView.h"
#include "src/base/SkTLazy.h"
#include "src/core/SkColorSpacePriv.h"
#include "src/core/SkRuntimeEffectPriv.h"
#include "src/gpu/KeyBuilder.h"
#include "src/gpu/SkBackingFit.h"
#include "src/gpu/ganesh/GrCaps.h"
#include "src/gpu/ganesh/GrColor.h"
#include "src/gpu/ganesh/GrDirectContextPriv.h"
#include "src/gpu/ganesh/GrFragmentProcessor.h"
#include "src/gpu/ganesh/GrImageInfo.h"
#include "src/gpu/ganesh/GrPixmap.h"
#include "src/gpu/ganesh/SurfaceFillContext.h"
#include "src/gpu/ganesh/effects/GrSkSLFP.h"
#include "src/sksl/SkSLString.h"
#include "tests/CtsEnforcement.h"
#include "tests/Test.h"
#include <array>
#include <cstdint>
#include <functional>
#include <initializer_list>
#include <memory>
#include <string>
#include <thread>
#include <utility>
Go to the source code of this file.
Classes | |
struct | GraphiteInfo |
class | TestEffect |
class | TestBlend |
Macros | |
#define | EMPTY_MAIN "half4 main(float2 p) { return half4(0); }" |
Typedefs | |
using | PreTestFn = std::function< void(SkCanvas *, SkPaint *)> |
Functions | |
void | test_invalid_effect (skiatest::Reporter *r, const char *src, const char *expected) |
DEF_TEST (SkRuntimeEffectInvalid_NoInVariables, r) | |
DEF_TEST (SkRuntimeEffectInvalid_UndefinedFunction, r) | |
DEF_TEST (SkRuntimeEffectInvalid_UndefinedMain, r) | |
DEF_TEST (SkRuntimeEffectInvalid_SkCapsDisallowed, r) | |
DEF_TEST (SkRuntimeEffect_DeadCodeEliminationStackOverflow, r) | |
DEF_TEST (SkRuntimeEffectCanDisableES2Restrictions, r) | |
DEF_TEST (SkRuntimeEffectCanEnableVersion300, r) | |
DEF_TEST (SkRuntimeEffectUniformFlags, r) | |
DEF_TEST (SkRuntimeEffectValidation, r) | |
DEF_TEST (SkRuntimeEffectForColorFilter, r) | |
DEF_TEST (SkRuntimeEffectForBlender, r) | |
DEF_TEST (SkRuntimeEffectForShader, r) | |
void | paint_canvas (SkCanvas *canvas, SkPaint *paint, const PreTestFn &preTestCallback) |
static bool | read_pixels (SkSurface *surface, GrColor *pixels) |
static void | verify_2x2_surface_results (skiatest::Reporter *r, const SkRuntimeEffect *effect, SkSurface *surface, std::array< GrColor, 4 > expected) |
static sk_sp< SkSurface > | make_surface (GrRecordingContext *grContext, const GraphiteInfo *graphite, SkISize size) |
static sk_sp< SkShader > | make_RGBW_shader () |
static void | test_RuntimeEffect_Shaders (skiatest::Reporter *r, GrRecordingContext *grContext, const GraphiteInfo *graphite) |
DEF_TEST (SkRuntimeEffectSimple, r) | |
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS (SkRuntimeEffectSimple_GPU, r, ctxInfo, CtsEnforcement::kApiLevel_T) | |
static void | verify_draw_obeys_capabilities (skiatest::Reporter *r, const SkRuntimeEffect *effect, SkSurface *surface, const SkPaint &paint) |
static void | test_RuntimeEffectObeysCapabilities (skiatest::Reporter *r, SkSurface *surface) |
DEF_TEST (SkRuntimeEffectObeysCapabilities_CPU, r) | |
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS (SkRuntimeEffectObeysCapabilities_GPU, r, ctxInfo, CtsEnforcement::kApiLevel_U) | |
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS (SkRuntimeColorFilterReturningInvalidAlpha_GPU, r, ctxInfo, CtsEnforcement::kNever) | |
DEF_TEST (SkRuntimeColorFilterLimitedToES2, r) | |
DEF_TEST (SkRuntimeEffectTraceShader, r) | |
DEF_TEST (SkRuntimeEffectTracesAreUnoptimized, r) | |
DEF_TEST (SkRuntimeEffectTraceCodeThatCannotBeUnoptimized, r) | |
static void | test_RuntimeEffect_Blenders (skiatest::Reporter *r, GrRecordingContext *grContext, const GraphiteInfo *graphite) |
DEF_TEST (SkRuntimeEffect_Blender_CPU, r) | |
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS (SkRuntimeEffect_Blender_GPU, r, ctxInfo, CtsEnforcement::kApiLevel_T) | |
DEF_TEST (SkRuntimeShaderBuilderReuse, r) | |
DEF_TEST (SkRuntimeBlendBuilderReuse, r) | |
DEF_TEST (SkRuntimeShaderBuilderSetUniforms, r) | |
DEF_TEST (SkRuntimeEffectThreaded, r) | |
DEF_TEST (SkRuntimeEffectAllowsPrivateAccess, r) | |
DEF_TEST (SkRuntimeColorFilterSingleColor, r) | |
static void | test_RuntimeEffectStructNameReuse (skiatest::Reporter *r, GrRecordingContext *rContext) |
DEF_TEST (SkRuntimeStructNameReuse, r) | |
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS (SkRuntimeStructNameReuse_GPU, r, ctxInfo, CtsEnforcement::kApiLevel_T) | |
DEF_TEST (SkRuntimeColorFilterFlags, r) | |
DEF_TEST (SkRuntimeShaderSampleCoords, r) | |
DEF_TEST (SkRuntimeShaderIsOpaque, r) | |
DEF_GANESH_TEST_FOR_ALL_CONTEXTS (GrSkSLFP_Specialized, r, ctxInfo, CtsEnforcement::kApiLevel_T) | |
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS (GrSkSLFP_UniformArray, r, ctxInfo, CtsEnforcement::kApiLevel_T) | |
Definition at line 99 of file SkRuntimeEffectTest.cpp.
using PreTestFn = std::function<void(SkCanvas*, SkPaint*)> |
Definition at line 387 of file SkRuntimeEffectTest.cpp.
DEF_GANESH_TEST_FOR_ALL_CONTEXTS | ( | GrSkSLFP_Specialized | , |
r | , | ||
ctxInfo | , | ||
CtsEnforcement::kApiLevel_T | |||
) |
Definition at line 1539 of file SkRuntimeEffectTest.cpp.
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS | ( | GrSkSLFP_UniformArray | , |
r | , | ||
ctxInfo | , | ||
CtsEnforcement::kApiLevel_T | |||
) |
Definition at line 1575 of file SkRuntimeEffectTest.cpp.
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS | ( | SkRuntimeColorFilterReturningInvalidAlpha_GPU | , |
r | , | ||
ctxInfo | , | ||
CtsEnforcement::kNever | |||
) |
Definition at line 852 of file SkRuntimeEffectTest.cpp.
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS | ( | SkRuntimeEffect_Blender_GPU | , |
r | , | ||
ctxInfo | , | ||
CtsEnforcement::kApiLevel_T | |||
) |
Definition at line 1147 of file SkRuntimeEffectTest.cpp.
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS | ( | SkRuntimeEffectObeysCapabilities_GPU | , |
r | , | ||
ctxInfo | , | ||
CtsEnforcement::kApiLevel_U | |||
) |
Definition at line 841 of file SkRuntimeEffectTest.cpp.
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS | ( | SkRuntimeEffectSimple_GPU | , |
r | , | ||
ctxInfo | , | ||
CtsEnforcement::kApiLevel_T | |||
) |
Definition at line 728 of file SkRuntimeEffectTest.cpp.
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS | ( | SkRuntimeStructNameReuse_GPU | , |
r | , | ||
ctxInfo | , | ||
CtsEnforcement::kApiLevel_T | |||
) |
Definition at line 1328 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeBlendBuilderReuse | , |
r | |||
) |
Definition at line 1172 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeColorFilterFlags | , |
r | |||
) |
Definition at line 1335 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeColorFilterLimitedToES2 | , |
r | |||
) |
Definition at line 871 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeColorFilterSingleColor | , |
r | |||
) |
Definition at line 1280 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeEffect_Blender_CPU | , |
r | |||
) |
Definition at line 1143 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeEffect_DeadCodeEliminationStackOverflow | , |
r | |||
) |
Definition at line 127 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeEffectAllowsPrivateAccess | , |
r | |||
) |
Definition at line 1238 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeEffectCanDisableES2Restrictions | , |
r | |||
) |
Definition at line 146 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeEffectCanEnableVersion300 | , |
r | |||
) |
Definition at line 157 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeEffectForBlender | , |
r | |||
) |
Definition at line 255 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeEffectForColorFilter | , |
r | |||
) |
Definition at line 204 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeEffectForShader | , |
r | |||
) |
Definition at line 311 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeEffectInvalid_NoInVariables | , |
r | |||
) |
Definition at line 101 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeEffectInvalid_SkCapsDisallowed | , |
r | |||
) |
Definition at line 119 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeEffectInvalid_UndefinedFunction | , |
r | |||
) |
Definition at line 109 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeEffectInvalid_UndefinedMain | , |
r | |||
) |
Definition at line 114 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeEffectObeysCapabilities_CPU | , |
r | |||
) |
Definition at line 834 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeEffectSimple | , |
r | |||
) |
Definition at line 715 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeEffectThreaded | , |
r | |||
) |
Definition at line 1217 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeEffectTraceCodeThatCannotBeUnoptimized | , |
r | |||
) |
Definition at line 986 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeEffectTracesAreUnoptimized | , |
r | |||
) |
Definition at line 937 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeEffectTraceShader | , |
r | |||
) |
Definition at line 899 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeEffectUniformFlags | , |
r | |||
) |
Definition at line 168 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeEffectValidation | , |
r | |||
) |
Definition at line 192 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeShaderBuilderReuse | , |
r | |||
) |
Definition at line 1154 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeShaderBuilderSetUniforms | , |
r | |||
) |
Definition at line 1189 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeShaderIsOpaque | , |
r | |||
) |
Definition at line 1454 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeShaderSampleCoords | , |
r | |||
) |
Definition at line 1400 of file SkRuntimeEffectTest.cpp.
DEF_TEST | ( | SkRuntimeStructNameReuse | , |
r | |||
) |
Definition at line 1324 of file SkRuntimeEffectTest.cpp.
Definition at line 595 of file SkRuntimeEffectTest.cpp.
|
static |
Definition at line 428 of file SkRuntimeEffectTest.cpp.
Definition at line 389 of file SkRuntimeEffectTest.cpp.
Definition at line 398 of file SkRuntimeEffectTest.cpp.
void test_invalid_effect | ( | skiatest::Reporter * | r, |
const char * | src, | ||
const char * | expected | ||
) |
Definition at line 91 of file SkRuntimeEffectTest.cpp.
|
static |
Definition at line 1023 of file SkRuntimeEffectTest.cpp.
|
static |
Definition at line 605 of file SkRuntimeEffectTest.cpp.
|
static |
Definition at line 751 of file SkRuntimeEffectTest.cpp.
|
static |
Definition at line 1298 of file SkRuntimeEffectTest.cpp.
|
static |
Definition at line 405 of file SkRuntimeEffectTest.cpp.
|
static |
Definition at line 735 of file SkRuntimeEffectTest.cpp.