Flutter Engine
The Flutter Engine
|
#include "include/core/SkAlphaType.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkBlendMode.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkClipOp.h"
#include "include/core/SkColor.h"
#include "include/core/SkColorPriv.h"
#include "include/core/SkColorSpace.h"
#include "include/core/SkColorType.h"
#include "include/core/SkImage.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkPaint.h"
#include "include/core/SkPixmap.h"
#include "include/core/SkRect.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkSamplingOptions.h"
#include "include/core/SkScalar.h"
#include "include/core/SkSurface.h"
#include "include/core/SkTypes.h"
#include "include/private/SkColorData.h"
#include "include/private/base/SkAlign.h"
#include "include/private/base/SkCPUTypes.h"
#include "include/private/base/SkSafe32.h"
#include "src/base/SkHalf.h"
#include "src/base/SkMathPriv.h"
#include "src/core/SkImageInfoPriv.h"
#include "tests/Test.h"
#include <cstdint>
#include <cstring>
#include <initializer_list>
#include <memory>
#include <string>
Go to the source code of this file.
Enumerations | |
enum class | TightRowBytes : bool { kNo , kYes } |
Functions | |
static SkPMColor | get_src_color (int x, int y) |
static SkPMColor | get_dst_bmp_init_color (int x, int y, int w) |
static SkPMColor | convert_to_pmcolor (SkColorType ct, SkAlphaType at, const uint32_t *addr, bool *doUnpremul) |
static sk_sp< SkImage > | make_src_image () |
static void | fill_src_canvas (SkCanvas *canvas) |
static void | fill_dst_bmp_with_init_data (SkBitmap *bitmap) |
static bool | check_read_pixel (SkPMColor a, SkPMColor b, bool didPremulConversion) |
static bool | check_read (skiatest::Reporter *reporter, const SkBitmap &bitmap, int x, int y, bool checkSurfacePixels, bool checkBitmapPixels, const SkImageInfo &surfaceInfo) |
static void | init_bitmap (SkBitmap *bitmap, const SkIRect &rect, TightRowBytes tightRB, SkColorType ct, SkAlphaType at) |
bool | read_should_succeed (const SkIRect &srcRect, const SkImageInfo &dstInfo, const SkImageInfo &srcInfo) |
static void | test_readpixels (skiatest::Reporter *reporter, const sk_sp< SkSurface > &surface, const SkImageInfo &surfaceInfo) |
DEF_TEST (ReadPixels, reporter) | |
static const void * | five_reference_pixels (SkColorType colorType) |
static void | test_conversion (skiatest::Reporter *r, const SkImageInfo &dstInfo, const SkImageInfo &srcInfo) |
DEF_TEST (ReadPixels_ValidConversion, reporter) | |
DEF_TEST (ReadPixels_InvalidRowBytes, reporter) | |
Variables | |
static const int | DEV_W = 100 |
static const int | DEV_H = 100 |
static const SkIRect | DEV_RECT = SkIRect::MakeWH(DEV_W, DEV_H) |
static const SkRect | DEV_RECT_S |
struct { | |
SkColorType fColorType | |
SkAlphaType fAlphaType | |
} | gReadPixelsConfigs [] |
const SkIRect | gReadPixelsTestRects [] |
static const uint32_t | kNumPixels = 5 |
static const uint32_t | rgba [kNumPixels] |
static const uint32_t | bgra [kNumPixels] |
static const uint16_t | rgb565 [kNumPixels] |
static const uint16_t | rgba4444 [kNumPixels] = { 0xF00F, 0x0F0F, 0x00FF, 0xFFFF, 0x000F } |
static const uint64_t | kRed = (uint64_t) SK_Half1 << 0 |
static const uint64_t | kGreen = (uint64_t) SK_Half1 << 16 |
static const uint64_t | kBlue = (uint64_t) SK_Half1 << 32 |
static const uint64_t | kAlpha = (uint64_t) SK_Half1 << 48 |
static const uint64_t | f16 [kNumPixels] |
static const uint8_t | alpha8 [kNumPixels] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } |
static const uint8_t | gray8 [kNumPixels] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF } |
|
strong |
Enumerator | |
---|---|
kNo | |
kYes |
Definition at line 274 of file ReadPixelsTest.cpp.
|
static |
Definition at line 188 of file ReadPixelsTest.cpp.
Definition at line 165 of file ReadPixelsTest.cpp.
|
static |
Definition at line 87 of file ReadPixelsTest.cpp.
DEF_TEST | ( | ReadPixels | , |
reporter | |||
) |
Definition at line 395 of file ReadPixelsTest.cpp.
DEF_TEST | ( | ReadPixels_InvalidRowBytes | , |
reporter | |||
) |
Definition at line 539 of file ReadPixelsTest.cpp.
DEF_TEST | ( | ReadPixels_ValidConversion | , |
reporter | |||
) |
Definition at line 498 of file ReadPixelsTest.cpp.
|
static |
Definition at line 147 of file ReadPixelsTest.cpp.
|
static |
Definition at line 137 of file ReadPixelsTest.cpp.
|
static |
Definition at line 431 of file ReadPixelsTest.cpp.
Definition at line 48 of file ReadPixelsTest.cpp.
|
static |
Definition at line 276 of file ReadPixelsTest.cpp.
Definition at line 121 of file ReadPixelsTest.cpp.
bool read_should_succeed | ( | const SkIRect & | srcRect, |
const SkImageInfo & | dstInfo, | ||
const SkImageInfo & | srcInfo | ||
) |
Definition at line 344 of file ReadPixelsTest.cpp.
|
static |
Definition at line 457 of file ReadPixelsTest.cpp.
|
static |
Definition at line 349 of file ReadPixelsTest.cpp.
|
static |
Definition at line 428 of file ReadPixelsTest.cpp.
|
static |
Definition at line 411 of file ReadPixelsTest.cpp.
|
static |
Definition at line 43 of file ReadPixelsTest.cpp.
|
static |
Definition at line 44 of file ReadPixelsTest.cpp.
|
static |
Definition at line 45 of file ReadPixelsTest.cpp.
|
static |
Definition at line 43 of file ReadPixelsTest.cpp.
|
static |
Definition at line 424 of file ReadPixelsTest.cpp.
SkAlphaType fAlphaType |
Definition at line 288 of file ReadPixelsTest.cpp.
SkColorType fColorType |
Definition at line 287 of file ReadPixelsTest.cpp.
|
static |
Definition at line 429 of file ReadPixelsTest.cpp.
const struct { ... } gReadPixelsConfigs[] |
const SkIRect gReadPixelsTestRects[] |
Definition at line 297 of file ReadPixelsTest.cpp.
|
static |
Definition at line 423 of file ReadPixelsTest.cpp.
|
static |
Definition at line 422 of file ReadPixelsTest.cpp.
|
static |
Definition at line 421 of file ReadPixelsTest.cpp.
|
static |
Definition at line 403 of file ReadPixelsTest.cpp.
|
static |
Definition at line 420 of file ReadPixelsTest.cpp.
|
static |
Definition at line 414 of file ReadPixelsTest.cpp.
|
static |
Definition at line 408 of file ReadPixelsTest.cpp.
|
static |
Definition at line 418 of file ReadPixelsTest.cpp.