aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ReadPixelsTest.cpp
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2016-06-27 14:34:55 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-27 14:34:55 -0700
commit88e8aef3916454e5f6916cc8b3420345b1cf0584 (patch)
tree8dc8b1f9f09e35b6901cd5e38c741431e66e04c6 /tests/ReadPixelsTest.cpp
parent523a239e531d88564b1f58b0c11674efe4f6f21c (diff)
Fix Vulkan readPixels
Fixed bug with setting up tempReadTexture from previous CL. Also, previously we were not correctly handling the rowBytes during the read. BUG=skia:5461 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2102633003 Review-Url: https://codereview.chromium.org/2102633003
Diffstat (limited to 'tests/ReadPixelsTest.cpp')
-rw-r--r--tests/ReadPixelsTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/ReadPixelsTest.cpp b/tests/ReadPixelsTest.cpp
index a4dbae9eb7..20305cc3eb 100644
--- a/tests/ReadPixelsTest.cpp
+++ b/tests/ReadPixelsTest.cpp
@@ -200,8 +200,8 @@ static bool check_read(skiatest::Reporter* reporter,
bool didPremul;
SkPMColor pmPixel = convert_to_pmcolor(ct, at, pixel, &didPremul);
if (!check_read_pixel(pmPixel, canvasPixel, didPremul)) {
- ERRORF(reporter, "Expected readback pixel value 0x%08x, got 0x%08x. "
- "Readback was unpremul: %d", canvasPixel, pmPixel, didPremul);
+ ERRORF(reporter, "Expected readback pixel (%d, %d) value 0x%08x, got 0x%08x. "
+ "Readback was unpremul: %d", bx, by, canvasPixel, pmPixel, didPremul);
return false;
}
}
@@ -387,7 +387,7 @@ DEF_TEST(ReadPixels, reporter) {
test_readpixels(reporter, surface, kLastAligned_BitmapInit);
}
#if SK_SUPPORT_GPU
-DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ReadPixels_Gpu, reporter, ctxInfo) {
+DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadPixels_Gpu, reporter, ctxInfo) {
for (auto& origin : {kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin}) {
GrSurfaceDesc desc;
desc.fFlags = kRenderTarget_GrSurfaceFlag;
@@ -442,7 +442,7 @@ static void test_readpixels_texture(skiatest::Reporter* reporter, GrTexture* tex
}
}
}
-DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ReadPixels_Texture, reporter, ctxInfo) {
+DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadPixels_Texture, reporter, ctxInfo) {
// On the GPU we will also try reading back from a non-renderable texture.
for (auto& origin : {kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin}) {
SkAutoTUnref<GrTexture> texture;
@@ -577,7 +577,7 @@ static void dump_to_file(const char name[], SkData* data) {
*
* https://bug.skia.org/4351
*/
-DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ReadPixels_Subset_Gpu, reporter, ctxInfo) {
+DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadPixels_Subset_Gpu, reporter, ctxInfo) {
SkBitmap bitmap;
make_ringed_bitmap(&bitmap, 6, 6);
const SkIRect subset = SkIRect::MakeLTRB(2, 2, 4, 4);