mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 23:26:24 +00:00
Create wire Client and Server classes with private impl
This creates proper Client and Server interfaces which will be necessary for adding additional features to the Wire for chrome integration Bug: dawn:103 Change-Id: I181e95079b0bac85c2c6152ad8066a94b80c8d28 Reviewed-on: https://dawn-review.googlesource.com/c/4002 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
62e83971ca
commit
e2c851372a
@@ -20,9 +20,11 @@
|
||||
#include "utils/TerribleCommandBuffer.h"
|
||||
|
||||
#include <dawn/dawn.h>
|
||||
#include <dawn/dawncpp.h>
|
||||
#include <dawn/dawn_wsi.h>
|
||||
#include <dawn/dawncpp.h>
|
||||
#include <dawn_native/DawnNative.h>
|
||||
#include <dawn_wire/WireClient.h>
|
||||
#include <dawn_wire/WireServer.h>
|
||||
#include "GLFW/glfw3.h"
|
||||
|
||||
#include <cstring>
|
||||
@@ -61,8 +63,8 @@ static utils::BackendBinding* binding = nullptr;
|
||||
|
||||
static GLFWwindow* window = nullptr;
|
||||
|
||||
static dawn_wire::CommandHandler* wireServer = nullptr;
|
||||
static dawn_wire::CommandHandler* wireClient = nullptr;
|
||||
static dawn_wire::WireServer* wireServer = nullptr;
|
||||
static dawn_wire::WireClient* wireClient = nullptr;
|
||||
static utils::TerribleCommandBuffer* c2sBuf = nullptr;
|
||||
static utils::TerribleCommandBuffer* s2cBuf = nullptr;
|
||||
|
||||
@@ -101,12 +103,12 @@ dawn::Device CreateCppDawnDevice() {
|
||||
c2sBuf = new utils::TerribleCommandBuffer();
|
||||
s2cBuf = new utils::TerribleCommandBuffer();
|
||||
|
||||
wireServer = dawn_wire::NewServerCommandHandler(backendDevice, backendProcs, s2cBuf);
|
||||
wireServer = new dawn_wire::WireServer(backendDevice, backendProcs, s2cBuf);
|
||||
c2sBuf->SetHandler(wireServer);
|
||||
|
||||
dawnDevice clientDevice;
|
||||
dawnProcTable clientProcs;
|
||||
wireClient = dawn_wire::NewClientDevice(&clientProcs, &clientDevice, c2sBuf);
|
||||
wireClient = new dawn_wire::WireClient(c2sBuf);
|
||||
dawnDevice clientDevice = wireClient->GetDevice();
|
||||
dawnProcTable clientProcs = wireClient->GetProcs();
|
||||
s2cBuf->SetHandler(wireClient);
|
||||
|
||||
procs = clientProcs;
|
||||
|
||||
Reference in New Issue
Block a user