Flutter Engine
The Flutter Engine
|
#include "include/core/SkAlphaType.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkBlurTypes.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
#include "include/core/SkColorPriv.h"
#include "include/core/SkColorType.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkMaskFilter.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPath.h"
#include "include/core/SkPathUtils.h"
#include "include/core/SkPixmap.h"
#include "include/core/SkPoint.h"
#include "include/core/SkRRect.h"
#include "include/core/SkRect.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkScalar.h"
#include "include/core/SkSize.h"
#include "include/core/SkSurface.h"
#include "include/core/SkTypes.h"
#include "include/effects/SkPerlinNoiseShader.h"
#include "include/gpu/GpuTypes.h"
#include "include/gpu/GrDirectContext.h"
#include "include/gpu/ganesh/SkSurfaceGanesh.h"
#include "include/private/base/SkTPin.h"
#include "src/base/SkFloatBits.h"
#include "src/base/SkMathPriv.h"
#include "src/core/SkBlurMask.h"
#include "src/core/SkMask.h"
#include "src/core/SkMaskFilterBase.h"
#include "src/effects/SkEmbossMaskFilter.h"
#include "src/gpu/ganesh/GrBlurUtils.h"
#include "tests/CtsEnforcement.h"
#include "tests/Test.h"
#include "tools/ToolUtils.h"
#include <math.h>
#include <string.h>
#include <array>
#include <cstddef>
#include <cstdint>
#include <initializer_list>
Go to the source code of this file.
Classes | |
struct | BlurTest |
Macros | |
#define | WRITE_CSV 0 |
Functions | |
static void | create (SkBitmap *bm, const SkIRect &bound) |
static void | drawBG (SkCanvas *canvas) |
static void | draw50x50Rect (SkPath *path) |
static bool | compare (const SkBitmap &ref, const SkIRect &iref, const SkBitmap &test, const SkIRect &itest) |
DEF_TEST (BlurDrawing, reporter) | |
static void | ground_truth_2d (int width, int height, SkScalar sigma, int *result, int resultCount) |
static int | step (int x, SkScalar min, SkScalar max) |
static float | gaussian (int x, SkScalar sigma) |
static void | brute_force_1d (SkScalar stepMin, SkScalar stepMax, SkScalar gaussianSigma, int *result, int resultCount) |
static void | blur_path (SkCanvas *canvas, const SkPath &path, SkScalar gaussianSigma) |
static void | readback (const SkBitmap &src, int *result, int resultCount) |
static void | cpu_blur_path (const SkPath &path, SkScalar gaussianSigma, int *result, int resultCount) |
static bool | match (int *first, int *second, int count, int tol) |
DEF_TEST (BlurSigmaRange, reporter) | |
DEF_TEST (BlurAsABlur, reporter) | |
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS (SmallBoxBlurBug, reporter, ctxInfo, CtsEnforcement::kNever) | |
DEF_TEST (BlurredRRectNinePatchComputation, reporter) | |
DEF_TEST (EmbossPerlinCrash, reporter) | |
DEF_TEST (BlurZeroSigma, reporter) | |
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS (BlurMaskBiggerThanDest, reporter, ctxInfo, CtsEnforcement::kApiLevel_T) | |
DEF_TEST (zero_blur, reporter) | |
Variables | |
static const int | outset = 100 |
static const SkColor | bgColor = SK_ColorWHITE |
static const int | strokeWidth = 4 |
static BlurTest | tests [] |
#define WRITE_CSV 0 |
Definition at line 54 of file BlurTest.cpp.
Definition at line 247 of file BlurTest.cpp.
|
static |
Definition at line 231 of file BlurTest.cpp.
|
static |
Assumes that the ref draw was completely inside ref canvas – implies that everything outside is "bgColor". Checks that all overlap is the same and that all non-overlap on the ref is "bgColor".
Definition at line 100 of file BlurTest.cpp.
|
static |
Definition at line 280 of file BlurTest.cpp.
Definition at line 62 of file BlurTest.cpp.
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS | ( | BlurMaskBiggerThanDest | , |
reporter | , | ||
ctxInfo | , | ||
CtsEnforcement::kApiLevel_T | |||
) |
Definition at line 548 of file BlurTest.cpp.
DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS | ( | SmallBoxBlurBug | , |
reporter | , | ||
ctxInfo | , | ||
CtsEnforcement::kNever | |||
) |
Definition at line 425 of file BlurTest.cpp.
DEF_TEST | ( | BlurAsABlur | , |
reporter | |||
) |
Definition at line 363 of file BlurTest.cpp.
DEF_TEST | ( | BlurDrawing | , |
reporter | |||
) |
Definition at line 127 of file BlurTest.cpp.
DEF_TEST | ( | BlurredRRectNinePatchComputation | , |
reporter | |||
) |
Definition at line 439 of file BlurTest.cpp.
DEF_TEST | ( | BlurSigmaRange | , |
reporter | |||
) |
Definition at line 314 of file BlurTest.cpp.
DEF_TEST | ( | BlurZeroSigma | , |
reporter | |||
) |
Definition at line 516 of file BlurTest.cpp.
DEF_TEST | ( | EmbossPerlinCrash | , |
reporter | |||
) |
Definition at line 501 of file BlurTest.cpp.
DEF_TEST | ( | zero_blur | , |
reporter | |||
) |
Definition at line 581 of file BlurTest.cpp.
|
static |
Definition at line 79 of file BlurTest.cpp.
|
static |
Definition at line 66 of file BlurTest.cpp.
Definition at line 223 of file BlurTest.cpp.
|
static |
Definition at line 181 of file BlurTest.cpp.
Definition at line 301 of file BlurTest.cpp.
Definition at line 264 of file BlurTest.cpp.
Definition at line 215 of file BlurTest.cpp.
|
static |
Definition at line 59 of file BlurTest.cpp.
|
static |
Definition at line 58 of file BlurTest.cpp.
|
static |
Definition at line 60 of file BlurTest.cpp.
|
static |
Definition at line 84 of file BlurTest.cpp.