aboutsummaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorIan Cottrell <iancottrell@google.com>2015-06-26 16:12:20 +0100
committerIan Cottrell <iancottrell@google.com>2015-06-29 13:28:15 +0100
commit507f7b1e477bf280f45b2fafa29a8f2ae8618970 (patch)
tree1b3d54fc64bb8395f43d16ecfaa483f5272b023b /server
parentbafe1fa8d26758a86e2055836807bb71ef9327f0 (diff)
downloadgpu-507f7b1e477bf280f45b2fafa29a8f2ae8618970.tar.gz
Use the individual gfxapi namespaces to build a common one, then use that to satisfy the GetSchema rpc call.
This reduces the schema to just the ones needed, and avoids exposing internal details. Change-Id: Idee86cb3709408f6c4cd4c3b198ed99cf3f11dd7
Diffstat (limited to 'server')
-rw-r--r--server/gapis/main.go3
-rw-r--r--server/rpc_server.go3
2 files changed, 2 insertions, 4 deletions
diff --git a/server/gapis/main.go b/server/gapis/main.go
index 6685eb905..695984687 100644
--- a/server/gapis/main.go
+++ b/server/gapis/main.go
@@ -24,9 +24,6 @@ import (
"android.googlesource.com/platform/tools/gpu/server"
)
-// Register known graphics APIs.
-import _ "android.googlesource.com/platform/tools/gpu/gfxapi/all"
-
var (
http = flag.String("http", "localhost:8080", "TCP host:port of the server's HTTP listener")
rpc = flag.String("rpc", "localhost:6700", "TCP host:port of the server's RPC listener")
diff --git a/server/rpc_server.go b/server/rpc_server.go
index febcdef66..3f347efe3 100644
--- a/server/rpc_server.go
+++ b/server/rpc_server.go
@@ -26,6 +26,7 @@ import (
"android.googlesource.com/platform/tools/gpu/binary/vle"
"android.googlesource.com/platform/tools/gpu/builder"
"android.googlesource.com/platform/tools/gpu/database"
+ "android.googlesource.com/platform/tools/gpu/gfxapi/all"
"android.googlesource.com/platform/tools/gpu/log"
"android.googlesource.com/platform/tools/gpu/memory"
"android.googlesource.com/platform/tools/gpu/replay"
@@ -59,7 +60,7 @@ func (s rpcServer) ListenAndServe(addr string, mtu int, logger log.Logger) error
// This includes all the types included in or referenced from the atom stream.
func (s rpcServer) GetSchema(l log.Logger) (service.ClassPtrArray, error) {
classes := make(service.ClassPtrArray, 0, registry.Global.Count())
- registry.Global.Visit(func(c binary.Class) {
+ all.GraphicsNamespace.Visit(func(c binary.Class) {
class := schema.Lookup(c.ID())
if class != nil {
classes = append(classes, class)