Update additional tools to take a GrDirectContext
GM was updated in:
https://skia-review.googlesource.com/c/skia/+/300172 (Make GM::onGpuSetup take a GrDirectContext)
This CL updates: skpbench, nanobench, and some testing infrastructure.
Only minor changes were made to the unit tests as they will be updated
en masse in a follow up cl.
Change-Id: Ieffc98865d4c9fc73e292d3c807ed4ae2081745a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300220
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/tools/gpu/ProxyUtils.cpp b/tools/gpu/ProxyUtils.cpp
index a5a01bf..6724707 100644
--- a/tools/gpu/ProxyUtils.cpp
+++ b/tools/gpu/ProxyUtils.cpp
@@ -21,18 +21,13 @@
namespace sk_gpu_test {
-sk_sp<GrTextureProxy> MakeTextureProxyFromData(GrContext* context,
+sk_sp<GrTextureProxy> MakeTextureProxyFromData(GrDirectContext* direct,
GrRenderable renderable,
GrSurfaceOrigin origin,
const GrImageInfo& imageInfo,
const void* data,
size_t rowBytes) {
- if (context->abandoned()) {
- return nullptr;
- }
-
- auto direct = context->asDirectContext();
- if (!direct) {
+ if (direct->abandoned()) {
return nullptr;
}