Revert "SkRasterPipelineBlitter: support A8"
This reverts commit f44373c119
.
Reason for revert: MSAN
Original change's description:
> SkRasterPipelineBlitter: support A8
>
> This adds support for loading and storing A8, then uses it in SkRasterPipelineBlitter.
>
> I think this handles all dst formats now: A8, 565, 8888 (by policy, sRGB only) and F16.
>
> CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
>
>
> Change-Id: Id207f6e6c56b6bfcc301d77dd23e0959bb7afba8
> Reviewed-on: https://skia-review.googlesource.com/6554
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
>
TBR=mtklein@chromium.org,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I9ead3c3335e1776e9a1639ca0481253821505d67
Reviewed-on: https://skia-review.googlesource.com/6625
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
This commit is contained in:
parent
f44373c119
commit
4a224f6011
@ -65,7 +65,6 @@
|
||||
M(from_srgb) M(from_srgb_d) M(to_srgb) \
|
||||
M(from_2dot2) M(to_2dot2) \
|
||||
M(constant_color) M(store_f32) \
|
||||
M(load_a8) M(load_a8_d) M(store_a8) \
|
||||
M(load_565) M(load_565_d) M(store_565) \
|
||||
M(load_f16) M(load_f16_d) M(store_f16) \
|
||||
M(load_8888) M(load_8888_d) M(store_8888) \
|
||||
|
@ -79,10 +79,9 @@ SkBlitter* SkCreateRasterPipelineBlitter(const SkPixmap& dst,
|
||||
|
||||
static bool supported(const SkImageInfo& info) {
|
||||
switch (info.colorType()) {
|
||||
case kAlpha_8_SkColorType: return true;
|
||||
case kRGB_565_SkColorType: return true;
|
||||
case kN32_SkColorType: return info.gammaCloseToSRGB();
|
||||
case kRGBA_F16_SkColorType: return true;
|
||||
case kRGB_565_SkColorType: return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
@ -188,7 +187,6 @@ void SkRasterPipelineBlitter::append_load_d(SkRasterPipeline* p) const {
|
||||
SkASSERT(supported(fDst.info()));
|
||||
|
||||
switch (fDst.info().colorType()) {
|
||||
case kAlpha_8_SkColorType: p->append(SkRasterPipeline::load_a8_d, &fDstPtr); break;
|
||||
case kRGB_565_SkColorType: p->append(SkRasterPipeline::load_565_d, &fDstPtr); break;
|
||||
case kBGRA_8888_SkColorType:
|
||||
case kRGBA_8888_SkColorType: p->append(SkRasterPipeline::load_8888_d, &fDstPtr); break;
|
||||
@ -213,7 +211,6 @@ void SkRasterPipelineBlitter::append_store(SkRasterPipeline* p) const {
|
||||
|
||||
SkASSERT(supported(fDst.info()));
|
||||
switch (fDst.info().colorType()) {
|
||||
case kAlpha_8_SkColorType: p->append(SkRasterPipeline::store_a8, &fDstPtr); break;
|
||||
case kRGB_565_SkColorType: p->append(SkRasterPipeline::store_565, &fDstPtr); break;
|
||||
case kBGRA_8888_SkColorType:
|
||||
case kRGBA_8888_SkColorType: p->append(SkRasterPipeline::store_8888, &fDstPtr); break;
|
||||
|
@ -650,10 +650,6 @@ public:
|
||||
hi = _mm256_extractf128_si256(src.fVec, 1);
|
||||
return _mm_packus_epi32(lo, hi);
|
||||
}
|
||||
template<> AI /*static*/ Sk8b SkNx_cast<uint8_t>(const Sk8i& src) {
|
||||
auto _16 = SkNx_cast<uint16_t>(src);
|
||||
return _mm_packus_epi16(_16.fVec, _16.fVec);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -503,16 +503,6 @@ STAGE_CTX(lerp_565, const uint16_t**) {
|
||||
a = 1.0f;
|
||||
}
|
||||
|
||||
STAGE_CTX(load_a8, const uint8_t**) {
|
||||
auto ptr = *ctx + x;
|
||||
r = g = b = 0.0f;
|
||||
a = SkNf_from_byte(load(tail, ptr));
|
||||
}
|
||||
STAGE_CTX(store_a8, uint8_t**) {
|
||||
auto ptr = *ctx + x;
|
||||
store(tail, SkNx_cast<uint8_t>(SkNf_round(255.0f, a)), ptr);
|
||||
}
|
||||
|
||||
STAGE_CTX(load_565, const uint16_t**) {
|
||||
auto ptr = *ctx + x;
|
||||
from_565(load(tail, ptr), &r,&g,&b);
|
||||
|
Loading…
Reference in New Issue
Block a user