diff options
author | 2016-06-06 13:10:58 -0700 | |
---|---|---|
committer | 2016-06-06 13:10:58 -0700 | |
commit | 982eb7f377a0c771345276558072deb2fcea0d3e (patch) | |
tree | 02ae878610160d6b6c91629424aaf895e5f17497 /tests | |
parent | dc27a648d2ff23b2e96232c00c15976c46e1d48d (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.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2037413002
Review-Url: https://codereview.chromium.org/2037413002
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ReadPixelsTest.cpp | 6 |
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? |