diff options
author | petersont@google.com <petersont@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-26 02:39:33 +0000 |
---|---|---|
committer | petersont@google.com <petersont@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-26 02:39:33 +0000 |
commit | e73d4f7b1f150436dae5d589fd73c8d17c2dcb56 (patch) | |
tree | abdc8f4fba62512c716f14b67badd7993c0394fe /o3d/core | |
parent | a4369599f7e9c15c66bcf66cc1c9bd158666eea4 (diff) | |
download | chromium_src-e73d4f7b1f150436dae5d589fd73c8d17c2dcb56.zip chromium_src-e73d4f7b1f150436dae5d589fd73c8d17c2dcb56.tar.gz chromium_src-e73d4f7b1f150436dae5d589fd73c8d17c2dcb56.tar.bz2 |
Created new build target for opengl command buffer service, fixed various bugs in opengl command buffers service code until unit tests passed on windows.
Review URL: http://codereview.chromium.org/165279
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24415 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/core')
-rw-r--r-- | o3d/core/cross/command_buffer/effect_cb.cc | 2 | ||||
-rw-r--r-- | o3d/core/cross/command_buffer/renderer_cb.cc | 2 | ||||
-rw-r--r-- | o3d/core/cross/effect_test.cc | 2 | ||||
-rw-r--r-- | o3d/core/win/command_buffer/win32_cb_server.cc | 6 | ||||
-rw-r--r-- | o3d/core/win/command_buffer/win32_cb_server.h | 12 |
5 files changed, 19 insertions, 5 deletions
diff --git a/o3d/core/cross/command_buffer/effect_cb.cc b/o3d/core/cross/command_buffer/effect_cb.cc index 27afbd7..ed35a77 100644 --- a/o3d/core/cross/command_buffer/effect_cb.cc +++ b/o3d/core/cross/command_buffer/effect_cb.cc @@ -200,7 +200,7 @@ void EffectCB::GetParameterInfo(EffectParameterInfoArray *array) { } array->push_back(EffectParameterInfo(desc.name, param_class, - 0, + desc.num_elements, desc.semantic, sem_class)); } diff --git a/o3d/core/cross/command_buffer/renderer_cb.cc b/o3d/core/cross/command_buffer/renderer_cb.cc index 69fdf2f..916bcd1 100644 --- a/o3d/core/cross/command_buffer/renderer_cb.cc +++ b/o3d/core/cross/command_buffer/renderer_cb.cc @@ -109,7 +109,7 @@ Renderer::InitStatus RendererCB::InitPlatformSpecific( // Creates a Win32CBServer based on the HWND, and creates the // command buffer helper, and initializes it. Also, create the // FencedAllocator for the transfer memory. - cb_server_ = new Win32CBServer(display_platform.hwnd()); + cb_server_ = new Win32CBServer(display_platform.hwnd(), features()); sync_interface_ = cb_server_->GetInterface(); RECT windowRect; diff --git a/o3d/core/cross/effect_test.cc b/o3d/core/cross/effect_test.cc index 2b1ca6c..e240296 100644 --- a/o3d/core/cross/effect_test.cc +++ b/o3d/core/cross/effect_test.cc @@ -367,7 +367,7 @@ TEST_F(EffectTest, CreateUniformParameters) { } else { ASSERT_TRUE(param != NULL); if (expected_info.num_elements > 0) { - ASSERT_TRUE(param->IsA(ParamParamArray::GetApparentClass())); + EXPECT_TRUE(param->IsA(ParamParamArray::GetApparentClass())); } else { EXPECT_TRUE(param->IsA(expected_info.type)); } diff --git a/o3d/core/win/command_buffer/win32_cb_server.cc b/o3d/core/win/command_buffer/win32_cb_server.cc index 01bfd26..7b70466 100644 --- a/o3d/core/win/command_buffer/win32_cb_server.cc +++ b/o3d/core/win/command_buffer/win32_cb_server.cc @@ -46,13 +46,17 @@ using command_buffer::IMCMessageProcessor; using command_buffer::BufferSyncProxy; using command_buffer::CommandBufferEngine; -Win32CBServer::Win32CBServer(HWND window) +Win32CBServer::Win32CBServer(HWND window, Features* features) : gapi_(), proxy_(NULL), imc_sender_(NULL), thread_(NULL) { gapi_.set_hwnd(window); +#if defined(CB_RENDERER_GL) + gapi_.set_anti_aliased(!features->not_anti_aliased()); +#endif + nacl::Handle handles[2]; nacl::SocketPair(handles); diff --git a/o3d/core/win/command_buffer/win32_cb_server.h b/o3d/core/win/command_buffer/win32_cb_server.h index 8d34e8d1..49a34f7 100644 --- a/o3d/core/win/command_buffer/win32_cb_server.h +++ b/o3d/core/win/command_buffer/win32_cb_server.h @@ -37,9 +37,15 @@ #define O3D_CORE_WIN_COMMAND_BUFFER_WIN32_CB_SERVER_H_ #include "core/cross/precompile.h" +#include "core/cross/features.h" #include "command_buffer/common/cross/rpc_imc.h" #include "command_buffer/client/cross/buffer_sync_proxy.h" +#if defined(CB_SERVICE_D3D9) #include "command_buffer/service/win/d3d9/gapi_d3d9.h" +#elif defined(CB_SERVICE_GL) +#include "command_buffer/service/cross/gl/gapi_gl.h" +#endif + namespace o3d { @@ -50,7 +56,7 @@ namespace o3d { // to connect to the service. class Win32CBServer { public: - explicit Win32CBServer(HWND window); + explicit Win32CBServer(HWND window, Features* features); ~Win32CBServer(); // Gets the (client-side) command buffer interface. @@ -59,7 +65,11 @@ class Win32CBServer { private: static DWORD WINAPI ThreadMain(LPVOID param); +#if defined(CB_SERVICE_D3D9) command_buffer::GAPID3D9 gapi_; +#elif defined(CB_SERVICE_GL) + command_buffer::GAPIGL gapi_; +#endif nacl::HtpHandle socket_pair_[2]; scoped_ptr<command_buffer::IMCSender> imc_sender_; scoped_ptr<command_buffer::BufferSyncProxy> proxy_; |