diff options
author | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-09 22:59:37 +0000 |
---|---|---|
committer | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-09 22:59:37 +0000 |
commit | c1bf07dd1da400c45c8b0af7aa3f24dfdbbfc615 (patch) | |
tree | d7df97e6184d7be23e1710be728332f1d0077f68 /o3d/tests | |
parent | 013a4d61cc1d89a24690dfead3e6b22377d5993a (diff) | |
download | chromium_src-c1bf07dd1da400c45c8b0af7aa3f24dfdbbfc615.zip chromium_src-c1bf07dd1da400c45c8b0af7aa3f24dfdbbfc615.tar.gz chromium_src-c1bf07dd1da400c45c8b0af7aa3f24dfdbbfc615.tar.bz2 |
Add ClientInfo
This allows an app to ask a few things from the client.
1) How many objects the client is tracking. This is useful
for a quick way to check that you're freeing resources.
While the developer could use client.objects.length or
client.packs[ii].objects.length that wouldend up creating
hundreds of thousands of NPObjects.
2) Check if the software renderer is being used
3) Check the approximate amount of memory used by textures.
Again, they could compute this with
client.getObjectsByClassName('o3d.Texture') but it seemed
like it might be useful.
I say approximate because I would have to dig down into
the indivdual renderers to get better info since a NPOT
card will use more memory but it didn't seem worth it.
4) check the approximate amount of memory used by hardware
buffers.
Review URL: http://codereview.chromium.org/155276
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20334 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/tests')
-rw-r--r-- | o3d/tests/build.scons | 1 | ||||
-rw-r--r-- | o3d/tests/common/linux/testing_common.cc | 2 | ||||
-rw-r--r-- | o3d/tests/common/mac/testing_common.cc | 2 | ||||
-rw-r--r-- | o3d/tests/common/win/testing_common.cc | 2 |
4 files changed, 7 insertions, 0 deletions
diff --git a/o3d/tests/build.scons b/o3d/tests/build.scons index 58b897c..0780cad 100644 --- a/o3d/tests/build.scons +++ b/o3d/tests/build.scons @@ -172,6 +172,7 @@ tests = [ 'core/cross/buffer_test.cc', 'core/cross/class_manager_test.cc', 'core/cross/client_test.cc', + 'core/cross/client_info_test.cc', 'core/cross/counter_test.cc', 'core/cross/curve_test.cc', 'core/cross/draw_element_test.cc', diff --git a/o3d/tests/common/linux/testing_common.cc b/o3d/tests/common/linux/testing_common.cc index 318b278..d563ce6 100644 --- a/o3d/tests/common/linux/testing_common.cc +++ b/o3d/tests/common/linux/testing_common.cc @@ -34,6 +34,7 @@ // used in the unit tests. Defines WinMain and a WindowProc for running // the GUnit tests +#include "core/cross/client_info.h" #include "core/cross/class_manager.h" #include "core/cross/evaluation_counter.h" #include "core/cross/install_check.h" @@ -89,6 +90,7 @@ int main(int argc, char *argv[]) { o3d::EvaluationCounter evaluation_counter(g_service_locator); o3d::ClassManager class_manager(g_service_locator); + o3d::ClientInfoManager client_info_manager(g_service_locator); o3d::ObjectManager object_manager(g_service_locator); o3d::Profiler profiler(g_service_locator); o3d::Features features(g_service_locator); diff --git a/o3d/tests/common/mac/testing_common.cc b/o3d/tests/common/mac/testing_common.cc index e102fc8..2f7cffa 100644 --- a/o3d/tests/common/mac/testing_common.cc +++ b/o3d/tests/common/mac/testing_common.cc @@ -39,6 +39,7 @@ #include <GLUT/glut.h> #include <AGL/agl.h> +#include "core/cross/client_info.h" #include "core/cross/class_manager.h" #include "core/cross/evaluation_counter.h" #include "core/cross/install_check.h" @@ -92,6 +93,7 @@ int main(int argc, char *argv[]) { o3d::EvaluationCounter evaluation_counter(g_service_locator); o3d::ClassManager class_manager(g_service_locator); + o3d::ClientInfoManager client_info_manager(g_service_locator); o3d::ObjectManager object_manager(g_service_locator); o3d::Profiler profiler(g_service_locator); o3d::Features features(g_service_locator); diff --git a/o3d/tests/common/win/testing_common.cc b/o3d/tests/common/win/testing_common.cc index cf09ffb..44c12658 100644 --- a/o3d/tests/common/win/testing_common.cc +++ b/o3d/tests/common/win/testing_common.cc @@ -42,6 +42,7 @@ #include "core/cross/install_check.h" #include "core/cross/service_locator.h" #include "core/cross/evaluation_counter.h" +#include "core/cross/client_info.h" #include "core/cross/class_manager.h" #include "core/cross/features.h" #include "core/cross/object_manager.h" @@ -145,6 +146,7 @@ int WINAPI WinMain(HINSTANCE instance, o3d::EvaluationCounter evaluation_counter(g_service_locator); o3d::ClassManager class_manager(g_service_locator); + o3d::ClientInfoManager client_info_manager(g_service_locator); o3d::ObjectManager object_manager(g_service_locator); o3d::Profiler profiler(g_service_locator); o3d::Features features(g_service_locator); |