61 unsigned char innerY[16] = {149, 160, 130, 105,
65 unsigned char innerU[4] = {43, 75, 145, 200};
66 unsigned char innerV[4] = {88, 180, 200, 43};
67 int outerYUV[] = {128, 128, 128};
69 for (
int i = 0;
i < 3; ++
i) {
84#if defined(SK_GRAPHITE)
87 if (!context && !recorder) {
96#if defined(SK_GRAPHITE)
114#if defined(SK_GRAPHITE)
117 if (!context && !recorder) {
123 *errorMsg =
"No valid YUV image generated -- skipping";
144 const SkIRect* subset = j > 0 ? &kColorRect :
nullptr;
161#if defined(SK_GRAPHITE)
163 subsetImg = fYUVImage->
makeSubset(recorder, *subset, {
false});
167 subsetImg = fYUVImage->
makeSubset(context, *subset);
178 x +=
rect.width() + kTestPad;
181 y +=
rect.height() + kTestPad;
191 inline static constexpr SkScalar kTestPad = 10.f;
193 using INHERITED =
GM;
196DEF_GM(
return new YUVtoRGBSubsetEffect;)
static GrDirectContext * GrAsDirectContext(GrContext_Base *base)
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
constexpr SkColor SK_ColorBLACK
@ kJPEG_Full_SkYUVColorSpace
describes full range
static constexpr int kSkTileModeCount
bool installPixels(const SkImageInfo &info, void *pixels, size_t rowBytes, void(*releaseProc)(void *addr, void *context), void *context)
bool writePixels(const SkPixmap &src, int dstX, int dstY)
void eraseColor(SkColor4f) const
void drawRect(const SkRect &rect, const SkPaint &paint)
virtual GrRecordingContext * recordingContext() const
virtual skgpu::graphite::Recorder * recorder() const
void concat(const SkMatrix &matrix)
SkISize dimensions() const
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
virtual sk_sp< SkImage > makeSubset(GrDirectContext *direct, const SkIRect &subset) const =0
SkMatrix & postScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
static SkMatrix Translate(SkScalar dx, SkScalar dy)
static const SkMatrix & I()
@ kY_U_V
Plane 0: Y, Plane 1: U, Plane 2: V.
@ k420
1 set of UV values for each 2x2 block of Y values.
const SkPixmap & plane(int i) const
static SkYUVAPixmaps Allocate(const SkYUVAPixmapInfo &yuvaPixmapInfo)
static std::unique_ptr< LazyYUVImage > Make(sk_sp< SkData > data, skgpu::Mipmapped=skgpu::Mipmapped::kNo, sk_sp< SkColorSpace >=nullptr)
void reset(T *ptr=nullptr)
GM(SkColor backgroundColor=SK_ColorWHITE)
static constexpr char kErrorMsg_DrawSkippedGpuOnly[]
void onGpuTeardown() override
SkISize getISize() override
DrawResult onGpuSetup(SkCanvas *canvas, SkString *errorMsg, GraphiteTestContext *) override
SkString getName() const override
DrawResult onDraw(SkCanvas *canvas, SkString *errorMsg) override
sk_sp< SkBlender > blender SkRect rect
SkSamplingOptions sampling
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
static constexpr SkIRect MakeLTRB(int32_t l, int32_t t, int32_t r, int32_t b)
static SkImageInfo MakeA8(int width, int height)
static SkRect Make(const SkISize &size)