aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Mike Klein <mtklein@chromium.org>2017-10-31 17:42:08 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-31 17:42:16 +0000
commitb7ea3da8cf722e017661710f25a83babd745a04d (patch)
treebff89863fb96261553980f1f6f47bfb185ac1c2c
parenta097173bb16f6dd83f114a051a0a4ba839f79bf2 (diff)
Revert "gbr- has been brg- this whole time..."
This reverts commit 5b9a037bf41591e0076843f619ee47c9ad30e42d. Reason for revert: I got confused in here somewhere and everything is drawing wrong. Original change's description: > gbr- has been brg- this whole time... > > Rewrite things to make that a little clearer. > > A red pixel ends up in channel 2, what would naively draw as blue > without a rotation. A green pixel ends up in channel 0, which would > naively draw as red without rotation. A blue pixel ends up in channel > 1, which would naively draw as green without this rotation. > > So this transformation is: > > r -> b > g -> r > b -> g > > i.e. rgb_to_brg > > Change-Id: I12331ff2622194e34a44f421f656fbe4db5d3dca > Reviewed-on: https://skia-review.googlesource.com/65521 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Osman <brianosman@google.com> TBR=mtklein@chromium.org,brianosman@google.com Change-Id: Ib29800b242bf736b20d61375d3c437c8f4ffdce0 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/65781 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
-rw-r--r--dm/DM.cpp22
-rw-r--r--dm/DMSrcSink.cpp10
-rw-r--r--infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN.json6
-rw-r--r--infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-MSAN.json6
-rw-r--r--infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-SK_USE_DISCARDABLE_SCALEDIMAGECACHE.json6
-rw-r--r--infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-UBSAN_float_cast_overflow.json6
-rw-r--r--infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-shard_00_10-Coverage.json6
-rw-r--r--infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-TSAN.json6
-rw-r--r--infra/bots/recipes/test.expected/Test-Debian9-GCC-GCE-CPU-AVX2-x86-Debug-All.json6
-rw-r--r--infra/bots/recipes/test.expected/Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug-All.json6
-rw-r--r--infra/bots/recipes/test.expected/failed_dm.json6
-rw-r--r--infra/bots/recipes/test.expected/trybot.json6
-rw-r--r--infra/bots/recipes/test.py6
13 files changed, 51 insertions, 47 deletions
diff --git a/dm/DM.cpp b/dm/DM.cpp
index ce4eb367fd..cb5332d77a 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -912,22 +912,26 @@ static sk_sp<SkColorSpace> adobe_rgb() {
SkColorSpace::kAdobeRGB_Gamut);
}
-static sk_sp<SkColorSpace> rgb_to_brg() {
- auto m = gSRGB_toXYZD50;
- float brg[9] = {
- m[1], m[2], m[0],
- m[4], m[5], m[3],
- m[7], m[8], m[6],
- };
+static sk_sp<SkColorSpace> rgb_to_gbr() {
+ float gbr[9];
+ gbr[0] = gSRGB_toXYZD50[1];
+ gbr[1] = gSRGB_toXYZD50[2];
+ gbr[2] = gSRGB_toXYZD50[0];
+ gbr[3] = gSRGB_toXYZD50[4];
+ gbr[4] = gSRGB_toXYZD50[5];
+ gbr[5] = gSRGB_toXYZD50[3];
+ gbr[6] = gSRGB_toXYZD50[7];
+ gbr[7] = gSRGB_toXYZD50[8];
+ gbr[8] = gSRGB_toXYZD50[6];
SkMatrix44 toXYZD50(SkMatrix44::kUninitialized_Constructor);
- toXYZD50.set3x3RowMajorf(brg);
+ toXYZD50.set3x3RowMajorf(gbr);
return SkColorSpace::MakeRGB(SkColorSpace::kSRGB_RenderTargetGamma, toXYZD50);
}
static Sink* create_via(const SkString& tag, Sink* wrapped) {
#define VIA(t, via, ...) if (tag.equals(t)) { return new via(__VA_ARGS__); }
VIA("adobe", ViaCSXform, wrapped, adobe_rgb(), false);
- VIA("brg", ViaCSXform, wrapped, rgb_to_brg(), true);
+ VIA("gbr", ViaCSXform, wrapped, rgb_to_gbr(), true);
VIA("lite", ViaLite, wrapped);
VIA("pipe", ViaPipe, wrapped);
VIA("twice", ViaTwice, wrapped);
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 656237dede..8e36f0c669 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -2168,11 +2168,11 @@ Error ViaCSXform::draw(const Src& src, SkBitmap* bitmap, SkWStream* stream, SkSt
uint32_t* row = pixels.getAddr32(0,y);
for (int x = 0; x < pixels.width(); x++) {
uint32_t pixel = *row;
- uint8_t g = (pixel >> 0) & 0xff,
- b = (pixel >> 8) & 0xff,
- r = (pixel >> 16) & 0xff,
- a = (pixel >> 24) & 0xff;
- *row++ = SkSwizzle_RGBA_to_PMColor(r << 0 | g << 8 | b << 16 | a << 24);
+ uint8_t r = SkGetPackedR32(pixel);
+ uint8_t g = SkGetPackedG32(pixel);
+ uint8_t b = SkGetPackedB32(pixel);
+ uint8_t a = SkGetPackedA32(pixel);
+ *row++ = SkSwizzle_RGBA_to_PMColor(b << 0 | r << 8 | g << 16 | a << 24);
}
}
diff --git a/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN.json b/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN.json
index fe6574ec3b..022147c63d 100644
--- a/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN.json
+++ b/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN.json
@@ -168,7 +168,7 @@
"sp-8888",
"2ndpic-8888",
"lite-8888",
- "brg-8888",
+ "gbr-8888",
"serialize-8888",
"tiles_rt-8888",
"pic-8888",
@@ -187,11 +187,11 @@
"_",
"_",
"dstreadshuffle",
- "brg-8888",
+ "gbr-8888",
"image",
"_",
"_",
- "brg-8888",
+ "gbr-8888",
"colorImage",
"_",
"_",
diff --git a/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-MSAN.json b/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-MSAN.json
index 1d98e1a92d..8ac71887e8 100644
--- a/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-MSAN.json
+++ b/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-MSAN.json
@@ -167,7 +167,7 @@
"sp-8888",
"2ndpic-8888",
"lite-8888",
- "brg-8888",
+ "gbr-8888",
"serialize-8888",
"tiles_rt-8888",
"pic-8888",
@@ -181,11 +181,11 @@
"_",
"_",
"dstreadshuffle",
- "brg-8888",
+ "gbr-8888",
"image",
"_",
"_",
- "brg-8888",
+ "gbr-8888",
"colorImage",
"_",
"_",
diff --git a/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-SK_USE_DISCARDABLE_SCALEDIMAGECACHE.json b/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-SK_USE_DISCARDABLE_SCALEDIMAGECACHE.json
index 2e3609cae2..69b1fbb26c 100644
--- a/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-SK_USE_DISCARDABLE_SCALEDIMAGECACHE.json
+++ b/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-SK_USE_DISCARDABLE_SCALEDIMAGECACHE.json
@@ -239,7 +239,7 @@
"sp-8888",
"2ndpic-8888",
"lite-8888",
- "brg-8888",
+ "gbr-8888",
"serialize-8888",
"tiles_rt-8888",
"pic-8888",
@@ -253,11 +253,11 @@
"_",
"_",
"dstreadshuffle",
- "brg-8888",
+ "gbr-8888",
"image",
"_",
"_",
- "brg-8888",
+ "gbr-8888",
"colorImage",
"_",
"_",
diff --git a/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-UBSAN_float_cast_overflow.json b/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-UBSAN_float_cast_overflow.json
index fe976d2cff..a1094a9f37 100644
--- a/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-UBSAN_float_cast_overflow.json
+++ b/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-UBSAN_float_cast_overflow.json
@@ -168,7 +168,7 @@
"sp-8888",
"2ndpic-8888",
"lite-8888",
- "brg-8888",
+ "gbr-8888",
"serialize-8888",
"tiles_rt-8888",
"pic-8888",
@@ -182,11 +182,11 @@
"_",
"_",
"dstreadshuffle",
- "brg-8888",
+ "gbr-8888",
"image",
"_",
"_",
- "brg-8888",
+ "gbr-8888",
"colorImage",
"_",
"_",
diff --git a/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-shard_00_10-Coverage.json b/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-shard_00_10-Coverage.json
index 5d0e0d028a..079594d7d0 100644
--- a/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-shard_00_10-Coverage.json
+++ b/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-shard_00_10-Coverage.json
@@ -173,7 +173,7 @@
"sp-8888",
"2ndpic-8888",
"lite-8888",
- "brg-8888",
+ "gbr-8888",
"serialize-8888",
"tiles_rt-8888",
"pic-8888",
@@ -187,11 +187,11 @@
"_",
"_",
"dstreadshuffle",
- "brg-8888",
+ "gbr-8888",
"image",
"_",
"_",
- "brg-8888",
+ "gbr-8888",
"colorImage",
"_",
"_",
diff --git a/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-TSAN.json b/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-TSAN.json
index 473e00546f..74f3fb5bd0 100644
--- a/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-TSAN.json
+++ b/infra/bots/recipes/test.expected/Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-TSAN.json
@@ -168,7 +168,7 @@
"sp-8888",
"2ndpic-8888",
"lite-8888",
- "brg-8888",
+ "gbr-8888",
"serialize-8888",
"tiles_rt-8888",
"pic-8888",
@@ -182,11 +182,11 @@
"_",
"_",
"dstreadshuffle",
- "brg-8888",
+ "gbr-8888",
"image",
"_",
"_",
- "brg-8888",
+ "gbr-8888",
"colorImage",
"_",
"_",
diff --git a/infra/bots/recipes/test.expected/Test-Debian9-GCC-GCE-CPU-AVX2-x86-Debug-All.json b/infra/bots/recipes/test.expected/Test-Debian9-GCC-GCE-CPU-AVX2-x86-Debug-All.json
index 5c348e9f2f..96c8077332 100644
--- a/infra/bots/recipes/test.expected/Test-Debian9-GCC-GCE-CPU-AVX2-x86-Debug-All.json
+++ b/infra/bots/recipes/test.expected/Test-Debian9-GCC-GCE-CPU-AVX2-x86-Debug-All.json
@@ -237,7 +237,7 @@
"sp-8888",
"2ndpic-8888",
"lite-8888",
- "brg-8888",
+ "gbr-8888",
"serialize-8888",
"tiles_rt-8888",
"pic-8888",
@@ -251,11 +251,11 @@
"_",
"_",
"dstreadshuffle",
- "brg-8888",
+ "gbr-8888",
"image",
"_",
"_",
- "brg-8888",
+ "gbr-8888",
"colorImage",
"_",
"_",
diff --git a/infra/bots/recipes/test.expected/Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug-All.json b/infra/bots/recipes/test.expected/Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug-All.json
index 2d50d3c424..44b405ac10 100644
--- a/infra/bots/recipes/test.expected/Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug-All.json
+++ b/infra/bots/recipes/test.expected/Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug-All.json
@@ -235,7 +235,7 @@
"sp-8888",
"2ndpic-8888",
"lite-8888",
- "brg-8888",
+ "gbr-8888",
"serialize-8888",
"tiles_rt-8888",
"pic-8888",
@@ -249,11 +249,11 @@
"_",
"_",
"dstreadshuffle",
- "brg-8888",
+ "gbr-8888",
"image",
"_",
"_",
- "brg-8888",
+ "gbr-8888",
"colorImage",
"_",
"_",
diff --git a/infra/bots/recipes/test.expected/failed_dm.json b/infra/bots/recipes/test.expected/failed_dm.json
index ac594a05e8..b5eac8e755 100644
--- a/infra/bots/recipes/test.expected/failed_dm.json
+++ b/infra/bots/recipes/test.expected/failed_dm.json
@@ -235,7 +235,7 @@
"sp-8888",
"2ndpic-8888",
"lite-8888",
- "brg-8888",
+ "gbr-8888",
"serialize-8888",
"tiles_rt-8888",
"pic-8888",
@@ -249,11 +249,11 @@
"_",
"_",
"dstreadshuffle",
- "brg-8888",
+ "gbr-8888",
"image",
"_",
"_",
- "brg-8888",
+ "gbr-8888",
"colorImage",
"_",
"_",
diff --git a/infra/bots/recipes/test.expected/trybot.json b/infra/bots/recipes/test.expected/trybot.json
index f67e27ff6a..10eb6aa09c 100644
--- a/infra/bots/recipes/test.expected/trybot.json
+++ b/infra/bots/recipes/test.expected/trybot.json
@@ -236,7 +236,7 @@
"sp-8888",
"2ndpic-8888",
"lite-8888",
- "brg-8888",
+ "gbr-8888",
"serialize-8888",
"tiles_rt-8888",
"pic-8888",
@@ -250,11 +250,11 @@
"_",
"_",
"dstreadshuffle",
- "brg-8888",
+ "gbr-8888",
"image",
"_",
"_",
- "brg-8888",
+ "gbr-8888",
"colorImage",
"_",
"_",
diff --git a/infra/bots/recipes/test.py b/infra/bots/recipes/test.py
index ac3f8bd097..023afb7c81 100644
--- a/infra/bots/recipes/test.py
+++ b/infra/bots/recipes/test.py
@@ -95,7 +95,7 @@ def dm_flags(api, bot):
configs.extend(['f16'])
configs.extend(['sp-8888', '2ndpic-8888']) # Test niche uses of SkPicture.
configs.extend(['lite-8888']) # Experimental display list.
- configs.extend(['brg-8888'])
+ configs.extend(['gbr-8888'])
# NP is running out of RAM when we run all these modes. skia:3255
if 'NexusPlayer' not in bot:
@@ -272,8 +272,8 @@ def dm_flags(api, bot):
blacklist('glessrgb image _ _')
# Not any point to running these.
- blacklist('brg-8888 image _ _')
- blacklist('brg-8888 colorImage _ _')
+ blacklist('gbr-8888 image _ _')
+ blacklist('gbr-8888 colorImage _ _')
if 'Valgrind' in bot:
# These take 18+ hours to run.