Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Unified Diff: gm/colorspacexform.cpp

Issue 2353363008: Add BGRA as input format to SkColorSpaceXform (Closed)
Patch Set: Response to comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bench/ColorCodecBench.cpp ('k') | src/codec/SkCodecPriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/colorspacexform.cpp
diff --git a/gm/colorspacexform.cpp b/gm/colorspacexform.cpp
index e1afb1cbfbbd4804fdedcdd58bd947fbb4c183ad..7e3285efbd57c4236d63e731db0bea4e009b01aa 100644
--- a/gm/colorspacexform.cpp
+++ b/gm/colorspacexform.cpp
@@ -24,9 +24,6 @@ protected:
for (int i = 0; i < kNumColors; i++) {
fSRGBColors[i] = SkColor4f::FromColor(colors[i]);
-
- // FIXME (msarett): SkColorSpaceXform does not support BGRA.
- colors[i] = SkSwizzle_RB(colors[i]);
}
static constexpr float kWideGamutRGB_toXYZD50[]{
@@ -45,7 +42,8 @@ protected:
dstSpace.get());
xform->apply(fWideGamutColors, colors, kNumColors,
- SkColorSpaceXform::kRGBA_F32_ColorFormat, kOpaque_SkAlphaType);
+ SkColorSpaceXform::kRGBA_F32_ColorFormat,
+ SkColorSpaceXform::kBGRA_8888_ColorFormat, kOpaque_SkAlphaType);
}
SkString onShortName() override {
« no previous file with comments | « bench/ColorCodecBench.cpp ('k') | src/codec/SkCodecPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698