From 26ecfe0af8da1d17a079e17af85c5c576bfeca84 Mon Sep 17 00:00:00 2001 From: Matt Sarett Date: Mon, 23 Jan 2017 15:51:01 +0000 Subject: Revert "Refactor trimming logic for read/writePixels()" This reverts commit 977f64cbfad1ecd7fd4b1231c694c7e828fda1f0. Reason for revert: Triggering nanobench asserts Original change's description: > Refactor trimming logic for read/writePixels() > > (1) Move trimming logic into Bitmap/Pixmap level for > raster. Everything goes through here, so we'll > only do the work once. > (2) This means it also goes to GPU level. > (3) Always use SkReadPixelsRec rather than inlining > the logic. > (4) Create an SkWritePixelsRec to encapsulate write > trimming. > (5) Disabled kIndex8 as a dst - always. > > BUG=skia:6021 > > Change-Id: I748f50c3b726f7c6de5462e2b1ccb54bc387a510 > Reviewed-on: https://skia-review.googlesource.com/7326 > Reviewed-by: Mike Reed > Commit-Queue: Matt Sarett > TBR=msarett@google.com,brianosman@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:6021 Change-Id: If9aacc6ce8b20e3dfe8a0f22ebca653f28356175 Reviewed-on: https://skia-review.googlesource.com/7379 Commit-Queue: Matt Sarett Reviewed-by: Matt Sarett --- tests/BitmapCopyTest.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests/BitmapCopyTest.cpp') diff --git a/tests/BitmapCopyTest.cpp b/tests/BitmapCopyTest.cpp index d69f7df76e..ab0ec30e16 100644 --- a/tests/BitmapCopyTest.cpp +++ b/tests/BitmapCopyTest.cpp @@ -184,7 +184,7 @@ static void writeCoordPixels(SkBitmap& bm, const Coordinates& coords) { static const Pair gPairs[] = { { kUnknown_SkColorType, "000000" }, { kAlpha_8_SkColorType, "010000" }, - { kIndex_8_SkColorType, "010111" }, + { kIndex_8_SkColorType, "011111" }, { kRGB_565_SkColorType, "010101" }, { kARGB_4444_SkColorType, "010111" }, { kN32_SkColorType, "010111" }, @@ -235,8 +235,7 @@ DEF_TEST(BitmapCopy_extractSubset, reporter) { if (!success) { // Skip checking that success matches fValid, which is redundant // with the code below. - REPORTER_ASSERT(reporter, kIndex_8_SkColorType == gPairs[i].fColorType || - gPairs[i].fColorType != gPairs[j].fColorType); + REPORTER_ASSERT(reporter, gPairs[i].fColorType != gPairs[j].fColorType); continue; } -- cgit v1.2.3