aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ClearTest.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-10-17 19:20:28 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-17 19:20:33 +0000
commitbcc8e9bf3f70fb4adab34f898abaec1035fb5efb (patch)
tree0a4be6123e54b0bc8bca29c926064aee3be710e7 /tests/ClearTest.cpp
parentc24f5a3e6e504bbb4810981dcab1583b9a8d08aa (diff)
Revert "Add unit test for clear bug"
This reverts commit 2fb81c04d74973181208f4f33eb6be4d4bae0321. Reason for revert: Apparently no gpu can consistently perform a full screen clear Original change's description: > Add unit test for clear bug > > Bug: 768134 > Change-Id: Ifb5a0eaeb85a8f399204467c22d0845d630d0d3d > Reviewed-on: https://skia-review.googlesource.com/60562 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: I88434e55e5391e858ee7c37873d74d71f0c5b69f No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 768134 Reviewed-on: https://skia-review.googlesource.com/60684 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests/ClearTest.cpp')
-rw-r--r--tests/ClearTest.cpp62
1 files changed, 0 insertions, 62 deletions
diff --git a/tests/ClearTest.cpp b/tests/ClearTest.cpp
index 034ff95f73..bcd0899867 100644
--- a/tests/ClearTest.cpp
+++ b/tests/ClearTest.cpp
@@ -11,9 +11,6 @@
#include "GrContext.h"
#include "GrRenderTargetContext.h"
-#include "SkCanvas.h"
-#include "SkSurface.h"
-
static bool check_rect(GrRenderTargetContext* rtc, const SkIRect& rect, uint32_t expectedValue,
uint32_t* actualValue, int* failX, int* failY) {
int w = rect.width();
@@ -205,63 +202,4 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ClearOp, reporter, ctxInfo) {
failX, failY);
}
}
-
-// From crbug.com/768134
-DEF_GPUTEST_FOR_RENDERING_CONTEXTS(FullScreenClearWithLayers, reporter, ctxInfo) {
- GrContext* context = ctxInfo.grContext();
-
- const SkImageInfo ii = SkImageInfo::Make(400, 77, kRGBA_8888_SkColorType, kPremul_SkAlphaType);
-
- sk_sp<SkSurface> surf = SkSurface::MakeRenderTarget(context, SkBudgeted::kYes, ii);
- SkCanvas* canvas = surf->getCanvas();
-
- SkPaint paints[2];
- paints[0].setColor(SK_ColorGREEN);
- paints[1].setColor(SK_ColorGRAY);
-
- static const int kLeftX = 158;
- static const int kMidX = 258;
- static const int kRightX = 383;
- static const int kTopY = 26;
- static const int kBotY = 51;
-
- const SkRect rects[2] = {
- { kLeftX, kTopY, kMidX, kBotY },
- { kMidX, kTopY, kRightX, kBotY },
- };
-
- for (int i = 0; i < 2; ++i) {
- // the bounds parameter is required to cause a full screen clear
- canvas->saveLayer(&rects[i], nullptr);
- canvas->drawRect(rects[i], paints[i]);
- canvas->restore();
- }
-
- SkBitmap bm;
- bm.allocPixels(ii, 0);
-
- SkAssertResult(surf->readPixels(bm, 0, 0));
-
- bool isCorrect = true;
- for (int y = kTopY; isCorrect && y < kBotY; ++y) {
- const uint32_t* sl = bm.getAddr32(0, y);
-
- for (int x = kLeftX; x < kMidX; ++x) {
- if (SK_ColorGREEN != sl[x]) {
- isCorrect = false;
- break;
- }
- }
-
- for (int x = kMidX; x < kRightX; ++x) {
- if (SK_ColorGRAY != sl[x]) {
- isCorrect = false;
- break;
- }
- }
- }
-
- REPORTER_ASSERT(reporter, isCorrect);
-}
-
#endif