aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar brianosman <brianosman@google.com>2016-06-06 13:10:58 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-06 13:10:58 -0700
commit982eb7f377a0c771345276558072deb2fcea0d3e (patch)
tree02ae878610160d6b6c91629424aaf895e5f17497 /tests
parentdc27a648d2ff23b2e96232c00c15976c46e1d48d (diff)
Add new SkSourceGammaTreatment enum, used in situations like mipmap construction, where we need to know if we should respect (vs. ignore) the gamma encoding of sRGB tagged images. Plumb that extensively.
Diffstat (limited to 'tests')
-rw-r--r--tests/ReadPixelsTest.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/ReadPixelsTest.cpp b/tests/ReadPixelsTest.cpp
index 28650e2427..a4c36ffa5d 100644
--- a/tests/ReadPixelsTest.cpp
+++ b/tests/ReadPixelsTest.cpp
@@ -587,7 +587,8 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ReadPixels_Subset_Gpu, reporter, ctxInfo)
// ... one from a texture-subset
SkAutoTUnref<GrTexture> fullTx(GrRefCachedBitmapTexture(ctxInfo.grContext(), bitmap,
- GrTextureParams::ClampNoFilter()));
+ GrTextureParams::ClampNoFilter(),
+ SkSourceGammaTreatment::kRespect));
SkBitmap tx_full;
GrWrapTextureInBitmap(fullTx, bitmap.width(), bitmap.height(), true, &tx_full);
tx_full.extractSubset(&tx_subset, subset);
@@ -596,7 +597,8 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ReadPixels_Subset_Gpu, reporter, ctxInfo)
SkBitmap tmp_subset;
bitmap.extractSubset(&tmp_subset, subset);
SkAutoTUnref<GrTexture> subsetTx(GrRefCachedBitmapTexture(ctxInfo.grContext(), tmp_subset,
- GrTextureParams::ClampNoFilter()));
+ GrTextureParams::ClampNoFilter(),
+ SkSourceGammaTreatment::kRespect));
GrWrapTextureInBitmap(subsetTx, tmp_subset.width(), tmp_subset.height(), true, &bm_subset);
// did we get the same subset?