GrSurfaceContext not ref counted.
Also don't specify redundant width/height to SkGpuDevice.
Change-Id: I389df5c4b073c2c05632ba6b7c95b02a22dfaf98
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235824
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/tests/LazyProxyTest.cpp b/tests/LazyProxyTest.cpp
index 256dbc9..5aae8e9 100644
--- a/tests/LazyProxyTest.cpp
+++ b/tests/LazyProxyTest.cpp
@@ -43,7 +43,7 @@
}
void preFlush(GrOnFlushResourceProvider*, const uint32_t*, int,
- SkTArray<sk_sp<GrRenderTargetContext>>*) override {
+ SkTArray<std::unique_ptr<GrRenderTargetContext>>*) override {
REPORTER_ASSERT(fReporter, !fHasOpTexture);
REPORTER_ASSERT(fReporter, !fHasClipTexture);
}
@@ -209,10 +209,10 @@
for (bool nullTexture : {false, true}) {
LazyProxyTest test(reporter);
ctx->priv().addOnFlushCallbackObject(&test);
- sk_sp<GrRenderTargetContext> rtc = ctx->priv().makeDeferredRenderTargetContext(
- SkBackingFit::kExact, 100, 100, GrColorType::kRGBA_8888, nullptr);
+ auto rtc = ctx->priv().makeDeferredRenderTargetContext(SkBackingFit::kExact, 100, 100,
+ GrColorType::kRGBA_8888, nullptr);
REPORTER_ASSERT(reporter, rtc);
- sk_sp<GrRenderTargetContext> mockAtlas = ctx->priv().makeDeferredRenderTargetContext(
+ auto mockAtlas = ctx->priv().makeDeferredRenderTargetContext(
SkBackingFit::kExact, 10, 10, GrColorType::kAlpha_F16, nullptr);
REPORTER_ASSERT(reporter, mockAtlas);
rtc->priv().testingOnly_addDrawOp(LazyProxyTest::Clip(&test, mockAtlas->asTextureProxy()),
@@ -375,8 +375,8 @@
sk_sp<GrContext> ctx = GrContext::MakeMock(&mockOptions, GrContextOptions());
GrProxyProvider* proxyProvider = ctx->priv().proxyProvider();
for (bool failInstantiation : {false, true}) {
- sk_sp<GrRenderTargetContext> rtc = ctx->priv().makeDeferredRenderTargetContext(
- SkBackingFit::kExact, 100, 100, GrColorType::kRGBA_8888, nullptr);
+ auto rtc = ctx->priv().makeDeferredRenderTargetContext(SkBackingFit::kExact, 100, 100,
+ GrColorType::kRGBA_8888, nullptr);
REPORTER_ASSERT(reporter, rtc);
rtc->clear(nullptr, SkPMColor4f::FromBytes_RGBA(0xbaaaaaad),
@@ -446,8 +446,8 @@
using LazyType = GrSurfaceProxy::LazyInstantiationType;
for (auto lazyType : {LazyType::kSingleUse, LazyType::kMultipleUse, LazyType::kDeinstantiate}) {
- sk_sp<GrRenderTargetContext> rtc = ctx->priv().makeDeferredRenderTargetContext(
- SkBackingFit::kExact, 100, 100, GrColorType::kRGBA_8888, nullptr);
+ auto rtc = ctx->priv().makeDeferredRenderTargetContext(SkBackingFit::kExact, 100, 100,
+ GrColorType::kRGBA_8888, nullptr);
REPORTER_ASSERT(reporter, rtc);
rtc->clear(nullptr, SkPMColor4f::FromBytes_RGBA(0xbaaaaaad),