aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/BlendTest.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-04-18 17:12:32 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-18 21:55:10 +0000
commit7da62b9059f3c1d31624a0e4da96ee5f908f9c12 (patch)
treefc57f951a4e8c1900311e8a1ffbdbbaf189715c2 /tests/BlendTest.cpp
parentb712a85aea212cf5bfe5514a4fefc184545a8d3c (diff)
Plumb GrBackendTexture throughout skia.
Bug: skia: Change-Id: I1bae6768ee7229818a83ba608035a1f7867e6875 Reviewed-on: https://skia-review.googlesource.com/13645 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
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;
}
}