diff options
author | Brian Salomon <bsalomon@google.com> | 2017-09-07 12:36:34 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-07 16:58:31 +0000 |
commit | 2bbdcc44c63974f29f3743bb58d929601a3f65c6 (patch) | |
tree | d420f298f606b061054e56866d1930ab84f00ed5 /tests/ImageTest.cpp | |
parent | 4df0092eac6e9bb5afc516773a0c618630193dc6 (diff) |
Rework GrSamplerParams to be more compact and use its own wrap mode enum.
The main change is to make GrSamplerParams smaller by making its enums have byte-sized underlying types. The rest is cosmetic.
Change-Id: Ib71ea50612d24619a85e463826c6b8dfb9b445e3
Reviewed-on: https://skia-review.googlesource.com/43200
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'tests/ImageTest.cpp')
-rw-r--r-- | tests/ImageTest.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp index 4ee28035ed..96b5b29405 100644 --- a/tests/ImageTest.cpp +++ b/tests/ImageTest.cpp @@ -927,19 +927,19 @@ DEF_GPUTEST(SkImage_MakeCrossContextRelease, reporter, /*factory*/) { // Any context should be able to borrow the texture at this point sk_sp<SkColorSpace> texColorSpace; sk_sp<GrTextureProxy> proxy = as_IB(refImg)->asTextureProxyRef( - ctx, GrSamplerParams::ClampNoFilter(), nullptr, &texColorSpace, nullptr); + ctx, GrSamplerState::ClampNearest(), nullptr, &texColorSpace, nullptr); REPORTER_ASSERT(reporter, proxy); // But once it's borrowed, no other context should be able to borrow otherTestContext->makeCurrent(); sk_sp<GrTextureProxy> otherProxy = as_IB(refImg)->asTextureProxyRef( - otherCtx, GrSamplerParams::ClampNoFilter(), nullptr, &texColorSpace, nullptr); + otherCtx, GrSamplerState::ClampNearest(), nullptr, &texColorSpace, nullptr); REPORTER_ASSERT(reporter, !otherProxy); // Original context (that's already borrowing) should be okay testContext->makeCurrent(); sk_sp<GrTextureProxy> proxySecondRef = as_IB(refImg)->asTextureProxyRef( - ctx, GrSamplerParams::ClampNoFilter(), nullptr, &texColorSpace, nullptr); + ctx, GrSamplerState::ClampNearest(), nullptr, &texColorSpace, nullptr); REPORTER_ASSERT(reporter, proxySecondRef); // Releae all refs from the original context @@ -948,8 +948,8 @@ DEF_GPUTEST(SkImage_MakeCrossContextRelease, reporter, /*factory*/) { // Now we should be able to borrow the texture from the other context otherTestContext->makeCurrent(); - otherProxy = as_IB(refImg)->asTextureProxyRef( - otherCtx, GrSamplerParams::ClampNoFilter(), nullptr, &texColorSpace, nullptr); + otherProxy = as_IB(refImg)->asTextureProxyRef(otherCtx, GrSamplerState::ClampNearest(), + nullptr, &texColorSpace, nullptr); REPORTER_ASSERT(reporter, otherProxy); // Release everything |