Run GrTextureMipMapInvalidationTest on rendering contexts
The logic being tested is implemented in the various Gr*Gpu classes, so running it on the NullGL context seems like an oversight. Bug: skia: Change-Id: I629010f0abde9347f06602a6b8774df7a19a3da7 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203704 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
7c59774d4f
commit
7eae5d74cd
@ -14,7 +14,12 @@
|
||||
#include "Test.h"
|
||||
|
||||
// Tests that MIP maps are created and invalidated as expected when drawing to and from GrTextures.
|
||||
DEF_GPUTEST_FOR_NULLGL_CONTEXT(GrTextureMipMapInvalidationTest, reporter, ctxInfo) {
|
||||
DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrTextureMipMapInvalidationTest, reporter, ctxInfo) {
|
||||
GrContext* context = ctxInfo.grContext();
|
||||
if (!context->priv().caps()->mipMapSupport()) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto isMipped = [] (SkSurface* surf) {
|
||||
const GrTexture* texture = surf->makeImageSnapshot()->getTexture();
|
||||
return GrMipMapped::kYes == texture->texturePriv().mipMapped();
|
||||
@ -24,7 +29,6 @@ DEF_GPUTEST_FOR_NULLGL_CONTEXT(GrTextureMipMapInvalidationTest, reporter, ctxInf
|
||||
return surf->makeImageSnapshot()->getTexture()->texturePriv().mipMapsAreDirty();
|
||||
};
|
||||
|
||||
GrContext* context = ctxInfo.grContext();
|
||||
auto info = SkImageInfo::MakeN32Premul(256, 256);
|
||||
for (auto allocateMips : {false, true}) {
|
||||
auto surf1 = SkSurface::MakeRenderTarget(context, SkBudgeted::kYes, info, 0,
|
||||
|
Loading…
Reference in New Issue
Block a user