Skip to content
This repository has been archived by the owner on Feb 25, 2025. It is now read-only.

Commit

Permalink
Add a version of the skbug6653 unit test that disables explicit resou…
Browse files Browse the repository at this point in the history
…rce allocation

We now suspect this bug is in Ganesh, so we're looking to see if this is
related.

Bug: skia:6653
Change-Id: Ic1c61091437903d1ffe0eba4a9f90dae01cedef7
Reviewed-on: https://skia-review.googlesource.com/149440
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
  • Loading branch information
brianosman authored and Skia Commit-Bot committed Aug 27, 2018
1 parent cd700e9 commit dd04bec
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions tests/skbug6653.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "SkSurface.h"

#include "GrContext.h"
#include "GrContextPriv.h"
#include "GrTest.h"
#include "Test.h"

Expand All @@ -29,10 +30,7 @@ static sk_sp<SkSurface> make_surface(GrContext* context) {
kBottomLeft_GrSurfaceOrigin, nullptr);
}

// Tests that readPixels returns up-to-date results. Demonstrates a bug on Galaxy S6
// (Mali T760), in MSAA mode.
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(skbug6653, reporter, ctxInfo) {
GrContext* ctx = ctxInfo.grContext();
static void test_bug_6653(GrContext* ctx, skiatest::Reporter* reporter) {
SkRect rect = SkRect::MakeWH(50, 50);

SkPaint paint;
Expand Down Expand Up @@ -94,3 +92,18 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(skbug6653, reporter, ctxInfo) {
REPORTER_ASSERT(reporter, match);
}
}

// Tests that readPixels returns up-to-date results. This has failed on several GPUs,
// from multiple vendors, in MSAA mode.
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(skbug6653, reporter, ctxInfo) {
GrContext* ctx = ctxInfo.grContext();
test_bug_6653(ctx, reporter);
}

// Same as above, but without explicit resource allocation.
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(skbug6653_noExplicitResourceAllocation, reporter, ctxInfo) {
GrContext* ctx = ctxInfo.grContext();
ctx->flush();
ctx->contextPriv().resourceProvider()->testingOnly_setExplicitlyAllocateGPUResources(false);
test_bug_6653(ctx, reporter);
}

0 comments on commit dd04bec

Please sign in to comment.