remove SkColorSpaceXform fast path
SkColorSpaceXform is no longer a particularly fast path compared to the raster pipeline default case. Guarded with SK_LEGACY_CONVERT_PIXELS_IMPL for layout tests. Change-Id: I4beb2f536013058257728558886a754ad49bf16a Reviewed-on: https://skia-review.googlesource.com/146522 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
8b1bf5244d
commit
141d408bb0
@ -86,6 +86,7 @@ void swizzle_and_multiply(const SkImageInfo& dstInfo, void* dstPixels, size_t ds
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SK_LEGACY_CONVERT_PIXELS_IMPL
|
||||
// Fast Path 3: Color space xform.
|
||||
static inline bool optimized_color_xform(const SkImageInfo& dstInfo, const SkImageInfo& srcInfo) {
|
||||
// Unpremultiplication is unsupported by SkColorSpaceXform. Note that if |src| is non-linearly
|
||||
@ -157,6 +158,7 @@ static inline bool apply_color_xform(const SkImageInfo& dstInfo, void* dstPixels
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Fast Path 4: Alpha 8 dsts.
|
||||
static void convert_to_alpha8(uint8_t* dst, size_t dstRB, const SkImageInfo& srcInfo,
|
||||
@ -421,12 +423,14 @@ void SkConvertPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRB,
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef SK_LEGACY_CONVERT_PIXELS_IMPL
|
||||
// Fast Path 3: Color space xform.
|
||||
if (isColorAware && optimized_color_xform(dstInfo, srcInfo)) {
|
||||
if (apply_color_xform(dstInfo, dstPixels, dstRB, srcInfo, srcPixels, srcRB)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Fast Path 4: Alpha 8 dsts.
|
||||
if (kAlpha_8_SkColorType == dstInfo.colorType()) {
|
||||
|
Loading…
Reference in New Issue
Block a user