Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Issue 155276: Add ClientInfo... (Closed)

Created:
11 years, 5 months ago by gman
Modified:
9 years, 7 months ago
Reviewers:
apatrick
CC:
o3d-review_googlegroups.com
Visibility:
Public.

Description

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. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=20334

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+443 lines, -15 lines) Patch
M converter/cross/converter.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M core/build.scons View 1 chunk +1 line, -0 lines 0 comments Download
M core/cross/buffer.h View 1 chunk +2 lines, -0 lines 0 comments Download
M core/cross/buffer.cc View 1 6 chunks +26 lines, -3 lines 1 comment Download
M core/cross/client.cc View 1 chunk +8 lines, -8 lines 0 comments Download
A core/cross/client_info.h View 1 1 chunk +118 lines, -0 lines 0 comments Download
A core/cross/client_info.cc View 1 1 chunk +58 lines, -0 lines 0 comments Download
A core/cross/client_info_test.cc View 1 1 chunk +137 lines, -0 lines 1 comment Download
M core/cross/object_manager.h View 1 3 chunks +5 lines, -2 lines 0 comments Download
M core/cross/texture.cc View 5 chunks +27 lines, -0 lines 1 comment Download
M core/win/d3d9/renderer_d3d9.cc View 6 chunks +8 lines, -2 lines 1 comment Download
M plugin/cross/o3d_glue.h View 3 chunks +3 lines, -0 lines 0 comments Download
M plugin/cross/o3d_glue.cc View 1 chunk +1 line, -0 lines 0 comments Download
M plugin/idl/client.idl View 3 chunks +40 lines, -0 lines 1 comment Download
M tests/build.scons View 1 chunk +1 line, -0 lines 0 comments Download
M tests/common/linux/testing_common.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M tests/common/mac/testing_common.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M tests/common/win/testing_common.cc View 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
gman
11 years, 5 months ago (2009-07-09 07:38:00 UTC) #1
apatrick
11 years, 5 months ago (2009-07-09 18:21:59 UTC) #2
LGTM

http://codereview.chromium.org/155276/diff/54/1011
File core/cross/buffer.cc (right):

http://codereview.chromium.org/155276/diff/54/1011#newcode125
Line 125: ServiceDependency<ClientInfoManager>
client_info_manager(service_locator());
You don't need to use a ServiceDependency here. GetService() is simpler. A
ServiceDependency is for when you need to connect with a service that
potentially hasn't been created yet or will change in the future.

http://codereview.chromium.org/155276/diff/54/1016
File core/cross/client_info_test.cc (right):

http://codereview.chromium.org/155276/diff/54/1016#newcode111
Line 111: /*
This is commented out.

http://codereview.chromium.org/155276/diff/54/1014
File core/cross/texture.cc (right):

http://codereview.chromium.org/155276/diff/54/1014#newcode70
Line 70: ServiceDependency<ClientInfoManager>
client_info_manager(service_locator);
Just use GetService here and below.

http://codereview.chromium.org/155276/diff/54/1018
File core/win/d3d9/renderer_d3d9.cc (right):

http://codereview.chromium.org/155276/diff/54/1018#newcode436
Line 436: ServiceDependency<ClientInfoManager>
client_info_manager(service_locator);
GetService.

http://codereview.chromium.org/155276/diff/54/1019
File plugin/idl/client.idl (right):

http://codereview.chromium.org/155276/diff/54/1019#newcode565
Line 565: o3d::ServiceDependency<o3d::ClientInfoManager>
GetService

Powered by Google App Engine
This is Rietveld 408576698