aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/BlendTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/BlendTest.cpp')
-rw-r--r--tests/BlendTest.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/BlendTest.cpp b/tests/BlendTest.cpp
index 0acbd07957..20ea6e0f00 100644
--- a/tests/BlendTest.cpp
+++ b/tests/BlendTest.cpp
@@ -21,6 +21,7 @@
#include "GrResourceProvider.h"
#include "GrSurfaceContext.h"
#include "GrSurfaceProxy.h"
+#include "GrTest.h"
#include "GrTexture.h"
#endif
@@ -99,16 +100,16 @@ static sk_sp<SkSurface> create_gpu_surface_backend_texture_as_render_target(
return nullptr;
}
- GrBackendTextureDesc desc;
- desc.fFlags = kRenderTarget_GrBackendTextureFlag;
- desc.fOrigin = origin;
- desc.fWidth = width;
- desc.fHeight = height;
- desc.fConfig = config;
- desc.fSampleCnt = sampleCnt;
- desc.fTextureHandle = (*backingSurface)->getTextureHandle();
+ GrBackendTexture backendTex =
+ GrTest::CreateBackendTexture(context->contextPriv().getBackend(),
+ width,
+ height,
+ config,
+ (*backingSurface)->getTextureHandle());
sk_sp<SkSurface> surface =
- SkSurface::MakeFromBackendTextureAsRenderTarget(context, desc, nullptr);
+ SkSurface::MakeFromBackendTextureAsRenderTarget(context, backendTex, origin,
+ sampleCnt, nullptr, nullptr);
+
return surface;
}
}