33 return ((
size + 3) & ~3) >> 2;
41 return (r5 << 11) | (g6 << 5) | b5;
67 byte = (0x0 << 0) | (0x2 << 2) | (0x3 << 4) | (0x1 << 6);
73 byte = (0x1 << 0) | (0x3 << 2) | (0x2 << 4) | (0x0 << 6);
76 block->
fIndices = (
byte << 24) | (
byte << 16) | (
byte << 8) |
byte;
97 for (
int y = 0;
y < numYBlocks; ++
y) {
98 for (
int x = 0;
x < numXBlocks; ++
x) {
99 dstBlocks[
y*numXBlocks +
x] = (
y < numYBlocks/2) ? transBlock : opaqueBlock;
119 bool isCompressed =
false;
175 if (dContext && dContext->abandoned()) {
184 fRGBAImage =
data_to_img(dContext, std::move(bc1Data),
186 if (!fRGBImage || !fRGBAImage) {
187 *errorMsg =
"Failed to create BC1 images.";
196 fRGBAImage =
nullptr;
208 using INHERITED =
GM;
213DEF_GM(
return new BC1TransparencyGM;)
static GrDirectContext * GrAsDirectContext(GrContext_Base *base)
#define SkColorGetR(color)
#define SkColorGetG(color)
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
#define SkColorGetB(color)
constexpr SkColor SK_ColorWHITE
size_t SkCompressedDataSize(SkTextureCompressionType type, SkISize dimensions, TArray< size_t > *individualMipOffsets, bool mipmapped)
static SkImage_Base * as_IB(SkImage *image)
static U8CPU SkMulDiv255Round(U16CPU a, U16CPU b)
static uint16_t to565(SkColor col)
static int num_4x4_blocks(int size)
static sk_sp< SkImage > data_to_img(GrDirectContext *direct, sk_sp< SkData > data, SkTextureCompressionType compression)
static sk_sp< SkData > make_compressed_data()
static void create_BC1_block(BC1Block *block, bool transparent)
static void draw_image(SkCanvas *canvas, sk_sp< SkImage > image, int x, int y)
const GrCaps * caps() const
bool isFormatCompressed(const GrBackendFormat &format) const
GrImageContextPriv priv()
const GrBackendFormat & backendFormat() const
void drawRect(const SkRect &rect, const SkPaint &paint)
virtual GrRecordingContext * recordingContext() const
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
static sk_sp< SkData > MakeUninitialized(size_t length)
virtual GrImageContext * context() const
virtual bool isTextureBacked() const =0
void setStyle(Style style)
void setColor(SkColor color)
@ kStroke_Style
set to stroke geometry
void setStrokeWidth(SkScalar width)
SkString getName() const override
void onGpuTeardown() override
void onDraw(SkCanvas *canvas) override
DrawResult onGpuSetup(SkCanvas *canvas, SkString *errorMsg, GraphiteTestContext *) override
SkISize getISize() override
GM(SkColor backgroundColor=SK_ColorWHITE)
SK_API sk_sp< SkImage > TextureFromCompressedTextureData(GrDirectContext *direct, sk_sp< SkData > data, int width, int height, SkTextureCompressionType type, skgpu::Mipmapped mipmapped=skgpu::Mipmapped::kNo, GrProtected isProtected=GrProtected::kNo)
SK_API sk_sp< SkImage > RasterFromCompressedTextureData(sk_sp< SkData > data, int width, int height, SkTextureCompressionType type)
sk_sp< const SkImage > image
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
GrTextureProxy * GetTextureImageProxy(SkImage *image, GrRecordingContext *rContext)
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
static constexpr SkISize Make(int32_t w, int32_t h)
void outset(float dx, float dy)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
std::shared_ptr< const fml::Mapping > data