gpu: Fix gpu_perftests ozone initialization

gpu_perftests GPU initialization is not working if ozone is not
initialized first.

Test: gpu_perftests on a cros device
Change-Id: I42c1cb080097259b7123d658d18be0dd712d470f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1529021
Reviewed-by: Kenneth Russell <[email protected]>
Commit-Queue: Daniele Castagna <[email protected]>
Cr-Commit-Position: refs/heads/master@{#644528}
diff --git a/gpu/BUILD.gn b/gpu/BUILD.gn
index 486cbc4..0c9e7a5 100644
--- a/gpu/BUILD.gn
+++ b/gpu/BUILD.gn
@@ -579,6 +579,10 @@
     "//ui/gl/init",
   ]
 
+  if (use_ozone) {
+    deps += [ "//ui/ozone" ]
+  }
+
   data_deps = [
     # Needed for isolate script to execute.
     "//testing:run_perf_test",
@@ -609,6 +613,10 @@
     "//ui/gl/init",
   ]
 
+  if (use_ozone) {
+    deps += [ "//ui/ozone" ]
+  }
+
   data_deps = [
     # Needed for isolate script to execute.
     "//testing:run_perf_test",