diff options
author | Ben Clayton <bclayton@google.com> | 2015-03-19 15:36:52 +0000 |
---|---|---|
committer | Ben Clayton <bclayton@google.com> | 2015-03-20 14:33:23 +0000 |
commit | c49f04b45593a06076e85220b757df9739cd7b96 (patch) | |
tree | 6d84cfb2fb6fe5736366b1cf3092e74f2efd0d90 /integration | |
parent | 21068931cf661bbf18436ac982e75d1d9da00de7 (diff) | |
download | gpu-c49f04b45593a06076e85220b757df9739cd7b96.tar.gz |
Allow an API per context.
State a struct containing global state (for all contexts) and per-context
state.
State mutation is no longer performed by a dedicated state mutator object,
but by each atom. The same is now true for replay.
The RPC api has been simplified due to these structural changes. Java
still need to be updated.
All of this will allow things like EGL to be separated from the GLES contexts.
Change-Id: Ie7555731afff3618dba60fa6685dd9d1adb55900
Diffstat (limited to 'integration')
-rw-r--r-- | integration/replay/gles/gles_test.go | 2 | ||||
-rw-r--r-- | integration/replay/utils/store_capture.go | 19 |
2 files changed, 5 insertions, 16 deletions
diff --git a/integration/replay/gles/gles_test.go b/integration/replay/gles/gles_test.go index 20a5425c6..127023d49 100644 --- a/integration/replay/gles/gles_test.go +++ b/integration/replay/gles/gles_test.go @@ -79,7 +79,7 @@ func TestClear(t *testing.T) { device := utils.FindLocalDevice(t, mgr) ctx := &replay.Context{ - CaptureID: utils.StoreCapture(t, atoms, gles.API(), db, logger), + CaptureID: utils.StoreCapture(t, atoms, db, logger), DeviceID: device.ID(), } diff --git a/integration/replay/utils/store_capture.go b/integration/replay/utils/store_capture.go index 4699eaee2..16b766006 100644 --- a/integration/replay/utils/store_capture.go +++ b/integration/replay/utils/store_capture.go @@ -19,22 +19,12 @@ import ( "android.googlesource.com/platform/tools/gpu/atom" "android.googlesource.com/platform/tools/gpu/database" - "android.googlesource.com/platform/tools/gpu/gfxapi" "android.googlesource.com/platform/tools/gpu/log" "android.googlesource.com/platform/tools/gpu/service" ) -func storeSchema(t *testing.T, api gfxapi.API, db database.Database, l log.Logger) service.SchemaId { - schema := api.Schema() - id, err := db.Store(&schema, l) - if err != nil { - t.Fatalf("Failed to store schema: %v", err) - } - return service.SchemaId{id} -} - -func storeAtoms(t *testing.T, atoms atom.List, api gfxapi.API, db database.Database, l log.Logger) service.AtomStreamId { - stream, err := service.NewAtomStream(atoms, storeSchema(t, api, db, l)) +func storeAtoms(t *testing.T, atoms atom.List, db database.Database, l log.Logger) service.AtomStreamId { + stream, err := service.NewAtomStream(atoms) if err != nil { t.Fatalf("Failed to build atom stream: %v", err) } @@ -47,11 +37,10 @@ func storeAtoms(t *testing.T, atoms atom.List, api gfxapi.API, db database.Datab // StoreCapture encodes and writes the atom list to the database, returning an // identifier to the newly constructed and stored Capture. -func StoreCapture(t *testing.T, atoms atom.List, api gfxapi.API, db database.Database, l log.Logger) service.CaptureId { +func StoreCapture(t *testing.T, atoms atom.List, db database.Database, l log.Logger) service.CaptureId { capture := service.Capture{ Name: "test-capture", - API: api.Name(), - Atoms: storeAtoms(t, atoms, api, db, l), + Atoms: storeAtoms(t, atoms, db, l), } id, err := db.Store(&capture, l) if err != nil { |